Commit Graph

29 Commits

Author SHA1 Message Date
ben
91825ac883 Messing around trying to get input sharing to work 2022-03-26 07:45:04 -07:00
Sebastian
9f41d0906e Fixed potential for initialization fiasco when using delegates container. Fixed bug in code protecting redirecting handles from self-referencing. Updated project version and status. 2021-04-14 23:11:49 -04:00
Sebastian
16056820e9 Fixed Linux and standalone compile errors. 2020-08-26 22:31:30 +01:00
Sebastian
a76f4bc451 Improved hot-reload stability and support for reloading after recompiling outside of the editor:
- Hot-reloading from inside of the editor and after recompiling from the outside should be equally supported and work together.
- Improved robustness of the delegates redirections. There should be no lost delegates when reloading (either after in-editor or outside recompilation).
- Refactored code to use the same redirection template for context and delegates container.
2020-07-31 10:24:53 +01:00
Sebastian
04e6f9d844 Removed dependency on headers included in the PCH and fixed any non-unity issues. 2020-06-14 21:50:26 +01:00
Sebastian
bbd2c01071 Replaced includes of monolithic headers. 2020-06-14 20:21:49 +01:00
Sebastian
95d27334fe Updated input handler to ignore fake mouse events potentially raised when touch input is unhandled. 2019-08-08 18:06:07 +01:00
Sebastian
5f1dc964cf Added support for touch input (experimental and right now only non-shared):
- Added to SImGuiWidget and FImGuiInputHandler handling of touch started, move and ended events.
- Events are passed to FImGuiInputState to be copied to ImGui IO as a mouse move and left button down.
- Added one frame lag between touch ending event and ending processing, to allow ImGui handle mouse-up event.
2019-08-01 21:41:12 +01:00
kkawachi
5e4b7084de Fixed build errors when the plugin is placed in the engine directory. (#19)
Merged 4 commits fixing build errors when compiling this as an engine plugin:
- Changed include directives to use full paths (ex. <ICursor.h> -> <GenericPlatform/ICursor.h>).
- Added categories to FImGuiKeyInfo properties (required for all blueprint exposed types in engine plugins).
- Added explicit configuration of PCHUsage (without that it is assumed to be UseExplicitOrSharedPCHs in engine plugins and UseSharedPCHs in game ones) - amended to work also in the older engine versions.
2019-07-27 18:45:25 +01:00
Sebastian
10ce6386d4 Added support for shared mouse input:
- With the mouse sharing enabled, SImGuiWidget can update mouse position without enabling hit-tests. Actual input mode depends whether mouse cursor is hovering any ImGui window or not.
- Added to context proxy interface to read whether that context has mouse hovering any window.
- Added boilerplate code to support mouse sharing settings, properties and commands.
2019-07-08 20:46:28 +01:00
Sebastian
979903722a Moved the whole input handling from SImGuiWidget to UImGuiInputHandler:
- Moved responsibility for updating input state from the widget to the input handler.
- Changed the widget to fully delegate input events to the input handler and only manage its own input state.
- Changed the input handler interface to allow handling of all the necessary input events.
- Changed the input handler interface to use FReply as a response type and removed obsolete FImGuiInputResponse.
2019-06-30 18:25:58 +01:00
Sebastian
4a9d66889b Added ImGui early debug events:
- Added to FImGuiDelegates interface early debug delegates called during world tick start.
- Delegates are called in fixed order: multi-context early debug, world early debug (called during world tick start), world debug, multi-context debug (called during world post actor tick or if not available, during world tick start).
- Removed from build script configuration of debug delegates.
2019-04-14 12:16:15 +01:00
Sebastian
867a34e640 Changed interface to register ImGui debug delegates:
- Added new FImGuiDelegates interface for ImGui debug delegates.
- Added FImGuiDelegatesContainer for ImGui delegates.
- Added code preserving delegates during hot-reloading and moving them to a new module.
- Depreciated old FImGuiModule delegates interface and FImGuiDelegateHandle.
- Delegates registered with depreciated interface are redirected and get benefit of being preserved during hot-reloading. This can be controlled with IMGUI_REDIRECT_OBSOLETE_DELEGATES.
- Added IMGUI_WITH_OBSOLETE_DELEGATES allowing to strip depreciated interface from builds.
- Modified context manager and context proxy to work with FImGuiDelegatesContainer.
2019-04-10 20:19:11 +01:00
Sebastian
09572a8ef9 Refactorization of ImGui settings:
- Divided ImGui settings into UImGuiSettings persistent object and FImGuiModuleSettings proxy that provides interface for other classes and handles delayed loading of UImGuiSettings.
- Removed from FImGuiModuleProperties and FImGuiModuleCommands direct dependencies on UImGuiSettings.
- Simplified FImGuiModuleProperties making it more robust when moving data after hot-reloading.
- Inverted binding logic by injecting FImGuiModuleProperties and FImGuiModuleCommands into FImGuiModuleSettings and letting it take care of synchronization. Dependencies are setup by module manager.
- Added to module manager FImGuiModuleSettings and interface to access it.
- Cleaned interface of FImGuiInputHandlerFactory and removed direct dependency on settings.
2018-12-08 21:03:18 +00:00
Sebastian
51031d7d86 Changed input sharing properties to be initialized and updated from ImGui settings. 2018-12-02 20:32:42 +00:00
Sebastian
f4718e404a Introduced input sharing properties:
- Added properties defining whether keyboard or gamepad input should be shared between ImGui and game.
- Added interface and commands to dynamically change introduced properties.
- Updated ImGui Input Handler to base default input responses on sharing properties.
2018-12-02 18:42:28 +00:00
Sebastian
62d26f4ee5 Moved ImGui Module Properties to public directory and added to ImGui Module interface allowing access their instance. 2018-11-26 20:20:53 +00:00
Sebastian
a8ba10d074 Added code that moves module properties to hot-reloaded modules. 2018-11-25 21:26:06 +00:00
Sebastian
e00c1ff9e3 Renamed SwitchInputMode to ToggleInput command and interface to provide a better consistency with the engine and between module functions.
Note that this commit contains a minor breaking change for custom implementations of UImGuiInputHandler.
- Changed "ImGui.SwitchInputMode" command name to "ImGui.ToggleInput".
- Changed SwitchInputModeKey property in settings to ToggleInput.
- Added temporary mechanism protecting from losing data by moving it from SwitchInputModeKey to ToggleInput and removing deprecated entry from the default config file.
- Renamed UImGuiInputHandler protected function from IsSwitchInputModeEvent to IsToggleInputEvent, so custom implementations of that class may require update.
2018-11-24 21:16:25 +00:00
Sebastian
588428507a Added missing UObject/WeakObjectPtr.h include to ImGuiInputHandler.h to improve backward compatibility. 2018-09-02 13:38:44 +01:00
Sebastian
dd06fcbbdf Added support for registering in module user textures to them in ImGui:
- Added ImGuiTextureHandle that is implicitly convertible to ImTextureID and can be used directly with ImGui interface.
- Added to ImGui Module interface allowing to register, update and release textures or find handles to existing resources.
- Refactored Texture Manager and added functions allowing create, update or release resources for user textures.
- Loosened resource verification policy in Texture Manager to work smoothly with external requests and to handle gracefully situations when invalid texture id is passed to ImGui.
- Introduced ‘error texture’ that is used for invalid resources.
2018-08-15 22:20:46 +01:00
Sebastian
74c794b53e Fixed hot-reloading issues. Hot-reloading may be useful when developing this plug-in but it doesn't play well with free functions used in ImGui interface (limitation of the system I guess). Switched to a custom GImGui which after hot-reload can be redirected to a new module. This fixes a crash caused by GImGui in obsolete module pointing to released resources and guarantees that ImGui code remains functional. 2018-08-10 23:53:03 +01:00
Sebastian
9ab12850fb Added custom property type layout for FImGuiKeyInfo. 2018-07-31 22:09:01 +01:00
Sebastian
a90f217ab3 Added 'ImGui.SwitchInputMode' command and configurable key binding to DebugExecBindings. 2018-07-30 22:05:59 +01:00
Sebastian
eabff7b839 Replaced in ImGui Input Handler hard-coded assumptions about console open and stop play session shortcuts with values taken from input settings and input binding manager. Testing functions are available for inheriting classes. 2018-07-10 20:21:35 +01:00
Sebastian
5968c3ce84 Added ImGui Input Handler and ImGui Settings:
- Added ImGui Input Handler class that allows to customize handling of the keyboard and gamepad input.
- Added ImGui Settings to allow specify custom input handler implementation.
- Added editor support for ImGui Settings.
- Input handling in ImGui Widget is divided for querying the handler (more customizable) and actual input processing based on the handler’s response (fixed and simplified).
- Removed a need for checking console state in different input handling functions in ImGui Widget by suppressing keyboard focus support when console is opened.
2018-07-10 17:40:57 +01:00
Sebastian
933b7f1b3b Added interface to modify from code console variables that control whether to enable ImGui Input Mode and show ImGui Demo. 2018-01-10 23:36:12 +00:00
Sebastian
00ad746267 Added interface to register ImGui debug delegates. 2017-10-03 21:16:17 +01:00
Sebastian
cd98f86005 Initial commit:
- License file and initial readme file.
- Plugin and module base configuration.
- Repository configuration.
2017-03-17 23:22:13 +00:00