reset config

This commit is contained in:
Arnaud Jamin
2023-10-11 21:59:44 -04:00
parent 88481c3dcc
commit bfaf0c0058
20 changed files with 143 additions and 2 deletions
@@ -24,6 +24,22 @@ void UCogInputWindow_Gamepad::PreRender(ImGuiWindowFlags& WindowFlags)
}
}
//--------------------------------------------------------------------------------------------------------------------------
void UCogInputWindow_Gamepad::ResetConfig()
{
Super::ResetConfig();
bShowAsOverlay = false;
bInvertRightStickY = false;
bInvertLeftStickY = false;
BackgroundColor = FVector4f(0.03f, 0.03f, 0.03f, 1.0f);
ButtonColor = FVector4f(0.2f, 0.2f, 0.2f, 1.0f);
BorderColor = FVector4f(0.03f, 0.03f, 0.03f, 1.0f);
PressedColor = FVector4f(0.6f, 0.6f, 0.6f, 1.0f);
InjectColor = FVector4f(1.0f, 0.5f, 0.0f, 0.5f);
Border = 0.02f;
}
//--------------------------------------------------------------------------------------------------------------------------
void UCogInputWindow_Gamepad::InputContextMenu(const FKey& Key, FCogInjectActionInfo* ActionInfoButton, FCogInjectActionInfo* ActionInfo2D)
{
@@ -17,14 +17,18 @@ public:
UCogInputWindow_Gamepad();
TWeakObjectPtr<const UCogInputDataAsset> Asset;
protected:
virtual void ResetConfig() override;
virtual void PreRender(ImGuiWindowFlags& WindowFlags) override;
virtual void RenderContent() override;
virtual void RenderTick(float DeltaSeconds) override;
TWeakObjectPtr<const UCogInputDataAsset> Asset;
private:
void AddButton(const FKey& Key, const ImVec2& Position, const ImVec2& Size, const ImVec2& Alignment, float Rounding, ImDrawFlags Flags = 0);