You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 line
2.4 KiB

UWP Support Overhaul (#819) * Working build * Fix build again, stop deleting files * Hotfix crash, needs investigating * Remove VS2015.UWP, I cannot update the project * Lots of UWP work, added keyboard and mouse press support. Still need to finish scroll wheel, mouse position and cursor hiding, plus other stuff that I haven't seen yet. * Implemented a ton more things, added BaseApp.h to provide common code to UWP apps. * Remove constant window dimensions * Enable and Disable cursor support. * Actually use mouse delta * Gamepad Support * Cleaning and small tweaks * Restore original example. * Update comment * Use 'Messages' to handle the cursor functions so code is more portable. * Comment * Comment unused message fields and use vector for mouse pos instead. * Move messages to utils.h and use messages for everything. No more plat-specific code in raylib.h * Working build * Fix build again, stop deleting files * Hotfix crash, needs investigating * Remove VS2015.UWP, I cannot update the project * Lots of UWP work, added keyboard and mouse press support. Still need to finish scroll wheel, mouse position and cursor hiding, plus other stuff that I haven't seen yet. * Implemented a ton more things, added BaseApp.h to provide common code to UWP apps. * Remove constant window dimensions * Enable and Disable cursor support. * Actually use mouse delta * Gamepad Support * Cleaning and small tweaks * Restore original example. * Update comment * Use 'Messages' to handle the cursor functions so code is more portable. * Comment * Comment unused message fields and use vector for mouse pos instead. * Move messages to utils.h and use messages for everything. No more plat-specific code in raylib.h * Tested some desktop stuff and added projection matrix updates for window resizing. * Fixed big bad mouse bug * Fix alt buttons and add hack to combat flickery key presses (far from perfect) * Remove debug code * Final commit * Well, so I thought * Wow, i am bad * Remove packages folder * Remove useless include * Apply requested changes and fix linux build * Try to stop packages folder * Have we fixed the formatting properly? * Third time's the charm? * Where did this come from? * Re-fix * Autoformat is gonna kill * Fixed XBOX ONE Support * Fix tabs
5 年之前
UWP Support Overhaul (#819) * Working build * Fix build again, stop deleting files * Hotfix crash, needs investigating * Remove VS2015.UWP, I cannot update the project * Lots of UWP work, added keyboard and mouse press support. Still need to finish scroll wheel, mouse position and cursor hiding, plus other stuff that I haven't seen yet. * Implemented a ton more things, added BaseApp.h to provide common code to UWP apps. * Remove constant window dimensions * Enable and Disable cursor support. * Actually use mouse delta * Gamepad Support * Cleaning and small tweaks * Restore original example. * Update comment * Use 'Messages' to handle the cursor functions so code is more portable. * Comment * Comment unused message fields and use vector for mouse pos instead. * Move messages to utils.h and use messages for everything. No more plat-specific code in raylib.h * Working build * Fix build again, stop deleting files * Hotfix crash, needs investigating * Remove VS2015.UWP, I cannot update the project * Lots of UWP work, added keyboard and mouse press support. Still need to finish scroll wheel, mouse position and cursor hiding, plus other stuff that I haven't seen yet. * Implemented a ton more things, added BaseApp.h to provide common code to UWP apps. * Remove constant window dimensions * Enable and Disable cursor support. * Actually use mouse delta * Gamepad Support * Cleaning and small tweaks * Restore original example. * Update comment * Use 'Messages' to handle the cursor functions so code is more portable. * Comment * Comment unused message fields and use vector for mouse pos instead. * Move messages to utils.h and use messages for everything. No more plat-specific code in raylib.h * Tested some desktop stuff and added projection matrix updates for window resizing. * Fixed big bad mouse bug * Fix alt buttons and add hack to combat flickery key presses (far from perfect) * Remove debug code * Final commit * Well, so I thought * Wow, i am bad * Remove packages folder * Remove useless include * Apply requested changes and fix linux build * Try to stop packages folder * Have we fixed the formatting properly? * Third time's the charm? * Where did this come from? * Re-fix * Autoformat is gonna kill * Fixed XBOX ONE Support * Fix tabs
5 年之前
UWP Support Overhaul (#819) * Working build * Fix build again, stop deleting files * Hotfix crash, needs investigating * Remove VS2015.UWP, I cannot update the project * Lots of UWP work, added keyboard and mouse press support. Still need to finish scroll wheel, mouse position and cursor hiding, plus other stuff that I haven't seen yet. * Implemented a ton more things, added BaseApp.h to provide common code to UWP apps. * Remove constant window dimensions * Enable and Disable cursor support. * Actually use mouse delta * Gamepad Support * Cleaning and small tweaks * Restore original example. * Update comment * Use 'Messages' to handle the cursor functions so code is more portable. * Comment * Comment unused message fields and use vector for mouse pos instead. * Move messages to utils.h and use messages for everything. No more plat-specific code in raylib.h * Working build * Fix build again, stop deleting files * Hotfix crash, needs investigating * Remove VS2015.UWP, I cannot update the project * Lots of UWP work, added keyboard and mouse press support. Still need to finish scroll wheel, mouse position and cursor hiding, plus other stuff that I haven't seen yet. * Implemented a ton more things, added BaseApp.h to provide common code to UWP apps. * Remove constant window dimensions * Enable and Disable cursor support. * Actually use mouse delta * Gamepad Support * Cleaning and small tweaks * Restore original example. * Update comment * Use 'Messages' to handle the cursor functions so code is more portable. * Comment * Comment unused message fields and use vector for mouse pos instead. * Move messages to utils.h and use messages for everything. No more plat-specific code in raylib.h * Tested some desktop stuff and added projection matrix updates for window resizing. * Fixed big bad mouse bug * Fix alt buttons and add hack to combat flickery key presses (far from perfect) * Remove debug code * Final commit * Well, so I thought * Wow, i am bad * Remove packages folder * Remove useless include * Apply requested changes and fix linux build * Try to stop packages folder * Have we fixed the formatting properly? * Third time's the charm? * Where did this come from? * Re-fix * Autoformat is gonna kill * Fixed XBOX ONE Support * Fix tabs
5 年之前
  1. #pragma once
  2. #include <string>
  3. #include "pch.h"
  4. namespace raylibUWP
  5. {
  6. ref class App sealed : public Windows::ApplicationModel::Core::IFrameworkView
  7. {
  8. public:
  9. App();
  10. // IFrameworkView methods.
  11. void Initialize(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView) override;
  12. void SetWindow(Windows::UI::Core::CoreWindow^ window) override;
  13. void Load(Platform::String^ entryPoint) override;
  14. void Run() override;
  15. void Uninitialize() override;
  16. private:
  17. bool mWindowVisible = true;
  18. bool mSuspended = false;
  19. void GameLoop();
  20. void PreProcessInputs();
  21. void PostProcessInputs();
  22. // Helpers
  23. int GetRaylibKey(Windows::System::VirtualKey kVey);
  24. // Events
  25. void OnActivated(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView, Windows::ApplicationModel::Activation::IActivatedEventArgs^ args);
  26. void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ args);
  27. void OnResuming(Platform::Object^ sender, Platform::Object^ args);
  28. void OnWindowSizeChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::WindowSizeChangedEventArgs^ args);
  29. void OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ args);
  30. void OnPointerPressed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args);
  31. void OnPointerReleased(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args);
  32. void OnPointerWheelChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args);
  33. void OnPointerMoved(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args);
  34. void OnKeyDown(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ args);
  35. void OnKeyUp(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ args);
  36. void OnCharacterReceived(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::CharacterReceivedEventArgs^ args);
  37. void OnBackRequested(Platform::Object^ sender, Windows::UI::Core::BackRequestedEventArgs^ args);
  38. };
  39. ref class AppSource sealed : Windows::ApplicationModel::Core::IFrameworkViewSource
  40. {
  41. public:
  42. Windows::ApplicationModel::Core::IFrameworkView^ CreateView() override;
  43. };
  44. }