mirror of
https://github.com/kevinporetti/UnrealImGui.git
synced 2025-01-19 00:40:32 +00:00
35f2d342a0
- 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.
32 lines
851 B
C++
32 lines
851 B
C++
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
|
|
|
#pragma once
|
|
|
|
#include <Widgets/SLeafWidget.h>
|
|
|
|
class FImGuiModuleManager;
|
|
|
|
// Slate widget for rendering ImGui output.
|
|
class SImGuiWidget : public SLeafWidget
|
|
{
|
|
public:
|
|
|
|
SLATE_BEGIN_ARGS(SImGuiWidget)
|
|
{}
|
|
SLATE_ARGUMENT(FImGuiModuleManager*, ModuleManager)
|
|
SLATE_END_ARGS()
|
|
|
|
void Construct(const FArguments& InArgs);
|
|
|
|
private:
|
|
|
|
virtual int32 OnPaint(const FPaintArgs& Args, const FGeometry& AllottedGeometry, const FSlateRect& MyClippingRect, FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& WidgetStyle, bool bParentEnabled) const override;
|
|
|
|
virtual FVector2D ComputeDesiredSize(float) const override;
|
|
|
|
FImGuiModuleManager* ModuleManager = nullptr;
|
|
|
|
mutable TArray<FSlateVertex> VertexBuffer;
|
|
mutable TArray<SlateIndex> IndexBuffer;
|
|
};
|