Add spawning window

This commit is contained in:
Arnaud Jamin
2023-10-02 15:28:35 -04:00
parent 1aabdb5c4e
commit 28cef19935
81 changed files with 325 additions and 131 deletions
@@ -37,7 +37,7 @@ void FCogImguiModule::Initialize()
}
//--------------------------------------------------------------------------------------------------------------------------
TSharedPtr<SCogImguiWidget> FCogImguiModule::CreateImGuiViewport(UGameViewportClient* GameViewport, FCogImguiRender Render, ImFontAtlas* FontAtlas /*= nullptr*/)
TSharedPtr<SCogImguiWidget> FCogImguiModule::CreateImGuiViewport(UGameViewportClient* GameViewport, FCogImguiRenderFunction Render, ImFontAtlas* FontAtlas /*= nullptr*/)
{
if (bIsInitialized == false)
{
@@ -23,7 +23,7 @@ public:
virtual void ShutdownModule() override;
//----------------------------------------------------------------------------------------------------------------------
TSharedPtr<SCogImguiWidget> CreateImGuiViewport(UGameViewportClient* GameViewport, FCogImguiRender Render, ImFontAtlas* FontAtlas = nullptr);
TSharedPtr<SCogImguiWidget> CreateImGuiViewport(UGameViewportClient* GameViewport, FCogImguiRenderFunction Render, ImFontAtlas* FontAtlas = nullptr);
FCogImguiTextureManager& GetTextureManager() { return TextureManager; }
ImFontAtlas& GetDefaultFontAtlas() { return DefaultFontAtlas; }
@@ -13,7 +13,7 @@ struct ImFontAtlas;
struct ImGuiContext;
struct ImPlotContext;
using FCogImguiRender = TFunction<void(float DeltaTime)>;
using FCogImguiRenderFunction = TFunction<void(float DeltaTime)>;
//--------------------------------------------------------------------------------------------------------------------------
class COGIMGUI_API SCogImguiWidget : public SCompoundWidget
@@ -25,7 +25,7 @@ public:
SLATE_BEGIN_ARGS(SCogImguiWidget) {}
SLATE_ARGUMENT(UGameViewportClient*, GameViewport)
SLATE_ARGUMENT(ImFontAtlas*, FontAtlas)
SLATE_ARGUMENT(FCogImguiRender, Render)
SLATE_ARGUMENT(FCogImguiRenderFunction, Render)
SLATE_END_ARGS()
void Construct(const FArguments& InArgs);
@@ -103,7 +103,7 @@ protected:
ImPlotContext* ImPlotContext = nullptr;
FCogImguiRender Render;
FCogImguiRenderFunction Render;
float DpiScale = 1.f;