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.
- 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.
- 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.
Moving input state to context proxy decouples it a bit from a particular input source and although not used right now, it allows multiple sources to send input in parallel.
- Removed mouse status update.
- Removed mouse notifications.
- Removed unused function to copy modifier keys on mouse events (key down/up versions are still in use).
Current implementation of the IsInGameThread() doesn't make exceptions for a loading thread and lazy initialization of the Unreal resources ensures that plugin doesn't do any work before the game starts.
- 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.
- 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.
- Added SImGuiLayout to resets layout and house SImGuiWidget.
- Module manager creates SImGuiLayout instead of SImGuiWidget (eventually it should be replaced with a higher level object, like AHUD).
- Reworked ImGui canvas dragging and scaling and moved to SImGuiCanvasControl.
- Removed dependency on ImGui internal cursor data. New presentation is cleaner and doesn't use cursor data.
- Rendering code could be simplified after layout reset provided by SImGuiLayout.
- SImGuiWidget still handles input, rendering of ImGui draw data and activation of SImGuiCanvasControl.
- All widgets are in own subfolder.
Instead of throwing assertion unsupported keys are mapped to 0, what guarantees that ImGui key map is always initialized and unsupported keys mapped to index that cannot be reached from key input events that have non-zero key codes.
- 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.
- 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.
- Removed ImGui Module Properties singleton interface and released construction constraints.
- Added ImGui Module Properties to ImGui Module Manager.
- Moved ImGui Demo to ImGui Module Manager.
- ImGui Demo and ImGui Module Commands keep reference to ImGui Module Manager that gives them access to properties.
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.
- Moved property variables to ImGui Module Properties.
- Moved console command to ImGui Module Commands (one for now but more will be added).
- ImGui Module Commands is created by ImGui Module Manager, what means that commands are registered after module is loaded and unregistered when it is unloaded.
- Updated settings to allow more convenient use: Added global pointer to default object and event raised when it is loaded.
- Added common debug config file for module-wide debug symbols and loggers.
- Added IMGUI_MODULE_DEVELOPER symbol to enable or disable module developer mode, that is intended to add additional module debug options hidden from normal usage.
- ImGui Widget debug is only available in developer mode because in normal usage it adds noise to ImGui console variables while not being very useful.
- Merged LogImGuiInputHandler and LogImGuiInputHandlerFactory loggers as they are part of the same feature.
- Renamed LogImGuiInputState to LogImGuiInput.
- Replaced 'ImGui.DebugDrawOnWorldTick' with DRAW_EVENTS_ON_WORLD_TICK_START switch to enforce consistency in project setup.
- Added DRAW_EVENTS_ON_POST_ACTOR_TICK to support post actor tick events (only for UE 4.18 or later).
- Added DRAW_EVENTS_ORDER_WORLD_BEFORE_MULTI_CONTEXT to allow explicitly define order between multi-context and world-context draw events.
- Rules can be configured in ImGui.Build.cs file.
- Changed module type to 'Developer'.
- Added runtime loader that handles automatic module loading in runtime builds (feature can be selectively enabled).
- 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.
- Fixed rather embarrassing overlook in deallocation of data array passed from to CreateTexture from other function.
- Changed CreateTexture to use cleanup function passed with data (optional and only needed if data need to be released). Keeping data allocation and deallocation code together should make bugs like this easier to spot and avoid. Additionally this allows for more generic usage.
- 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.
- Split tick and textures initializations.
- Supporting deferred tick initialization, if Slate application is not ready during module startup.
- Textures are lazy-loaded before the first use.
- ImGui Context Manager initializes font atlas to make sure that ImGui resources are always initialized.
- Updated InputNavigation CVar to support 1: keyboard navigation, 2: gamepad navigation and 3: keyboard + gamepad navigation simultaneously.
- Added ImGui interoperability utilities mapping gamepad input events to values in ImGui navigation inputs array.
- Added to ImGui Input State support for gamepad navigation inputs.
- Refactored ImGui Input State to keep consistent interface for keyboard, mouse and gamepad updates.
- Upgraded ImGui framework to 1.61 WIP, which adds a few improvements to context management.
- Removed from plugin implementation all the references to default ImGui context.
- Removed from ImGui Context Proxy destructor code switching to default ImGui context (there is no default context and decision is left for a higher level manager when to switch and to what context).
- Added own font atlas that is shared by all contexts and used explicitly to create Slate resources.
- Removed from ImGui Context Proxy workaround that was previously needed for copying cursor data to dynamically created contexts.
- Removed explicit saving of context settings before its destruction as this is now handled in ImGui::DestroyContext().
- Reimplemented ImGuiImplementation::GetCursorData() to use new interface.
Map mode allows to reach areas of the canvas that otherwise would be inaccessible (for instance modal windows positioned in the centre of the canvas) and to modify which part should be visible by default.
- ImGui Context Proxy Tick function has been split for Tick and Draw. Both functions may now be called separately from different places but they will be processed only once per frame. This opens possibility to define own mechanisms to trigger draw events and to independently update contexts.
- Multi-context draw event delegate is passed to ImGui Context Proxy during construction rather than as an argument of Tick function.
- To minimise lag between ending ImGui frame and rendering its output, ImGui Widget updates its own context just before painting.
- Contexts without widget (editor, dedicated server) are updated by manager during post-tick event.
- Instead of setting global CurrentContextIndex by ImGui Context Manager, information about context is passed to ImGui Demo as part of a closure.
- Fixed bug in ImGui Demo where inactive contexts were triggering multi-PIE warning.
Using ImGui to draw cursor helps to reduce visual error between mouse cursor and position in ImGui. But it has been reported that this works really bad when frame-rate drops and becomes unusable below ~20 FPS. Taking that into account hardware cursor seems like a better default option. Old behaviour can be enabled with ImGui.DrawMouseCursor console variable.
- Removed usage of per-vertex ClipRect.
- Replaced usage of GSlateScissorRect with new FSlateWindowElementList::PushClip/PopClip functions.
- Defined WITH_OBSOLETE_CLIPPING_API to switch to old implementation for older engine versions.
- Added to ImGui Context Proxy a name that is mapped to ini file set in ImGui context.
- ImGui Context Manager generates unique context names from world type and context index.
- Refactored ImGui Context Manager to have a cleaner separation between editor and non-editor bits.
- Fixed context update rules in ImGui Context Manager.
- Changed widgets management in ImGui Module Manager to allow automatic garbage collection after viewports are closed and manual removal when module is shutting down.
- ImGui Widgets are in full control of communication with context proxies.
- Added basic world context utilities.
- Refactored world context index utilities and replaced ambiguous 'default context index' with 'editor' and 'game' ones.
- Different handling of 'Esc' key. If ImGui has active items then it is used to exit edit mode, otherwise it is passed to editor to cancel session.
- Suppressing keyboard input when console is opened and retaking it when it is closed.
- Fixed issue with losing input when console is closed.
- Added ImGui.Debug.Widget console variable to enable/disable widget state debugging.
- Added ImGui ImGui debug for widget state.
- Added logging for widget state transitions.
- Added ImGui Context Manager to create and manage ImGui Context Proxies.
- Changed ImGui Context Proxy to dynamically create context and allow pairing with input state.
- Changed ImGui Module Manager to create one widget per context.
- Changed ImGui Widget to work in different input modes.
- Changed ImGui Input State to allow partial reset (only mouse or keyboard).
- Separate modifier keys interface and data from generic keys.
- Cleaned interface to better differentiate between full reset and clearing update data.
- Fixed bug in code clearing characters.
- Added ImGui Input State to collect and store input updates.
- Changed Slate ImGui Widget to handle Slate input events and store them in input state.
- Changed ImGui Context Proxy to copy input state to its context.
- Added ImGui Module Manager that that implements module logic and manages other module resources.
- Added Texture Manager to manage texture resources and maps them to index that can be passed to ImGui context.
- Added Context Proxy that represents and manages a single ImGui context.
- Added Slate ImGui Widget to render ImGui output.
- Added ImGui framework source directory.
- Added to ImGui module include paths pointing to ImGui source directory.
- Added to ImGui module implementation file that includes ImGui source code to be built as part of the module.