mirror of
https://github.com/kevinporetti/UnrealImGui.git
synced 2025-01-18 16:30:32 +00:00
c144658f37
- 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.
33 lines
706 B
C++
33 lines
706 B
C++
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
|
|
|
#pragma once
|
|
|
|
#include <Widgets/SCompoundWidget.h>
|
|
|
|
|
|
class FImGuiModuleManager;
|
|
class UGameViewportClient;
|
|
|
|
// Layout preset for ImGui Widget.
|
|
class SImGuiLayout : public SCompoundWidget
|
|
{
|
|
typedef SCompoundWidget Super;
|
|
|
|
public:
|
|
|
|
SLATE_BEGIN_ARGS(SImGuiLayout)
|
|
{}
|
|
SLATE_ARGUMENT(FImGuiModuleManager*, ModuleManager)
|
|
SLATE_ARGUMENT(UGameViewportClient*, GameViewport)
|
|
SLATE_ARGUMENT(int32, ContextIndex)
|
|
SLATE_END_ARGS()
|
|
|
|
void Construct(const FArguments& InArgs);
|
|
|
|
const TWeakObjectPtr<UGameViewportClient>& GetGameViewport() const { return GameViewport; }
|
|
|
|
private:
|
|
|
|
TWeakObjectPtr<UGameViewportClient> GameViewport;
|
|
};
|