mirror of
https://github.com/Ed94/Cog.git
synced 2026-06-24 04:35:00 -07:00
1b5d63b0af
Add a new window CommandBindings to configure the shortcuts of console commands The first time it is created, this window add the bindings to control cog: [Tab] Cog.ToggleInput [F1] Cog.LoadLayout 1 [F2] Cog.LoadLayout 2 [F3] Cog.LoadLayout 3 [F4] Cog.LoadLayout 4 [F5] Cog.ToggleSelectionMode The selection window can now uses the Actor Label instead of Name (simpler to read) Fix Blackboard sorting
53 lines
1.6 KiB
C++
53 lines
1.6 KiB
C++
#include "CogWindow_Settings.h"
|
|
|
|
#include "CogImguiModule.h"
|
|
#include "CogWindowManager.h"
|
|
#include "CogWindowWidgets.h"
|
|
#include "InputCoreTypes.h"
|
|
|
|
//--------------------------------------------------------------------------------------------------------------------------
|
|
UCogWindow_Settings::UCogWindow_Settings()
|
|
{
|
|
bHasMenu = false;
|
|
}
|
|
|
|
//--------------------------------------------------------------------------------------------------------------------------
|
|
void UCogWindow_Settings::PostInitProperties()
|
|
{
|
|
Super::PostInitProperties();
|
|
}
|
|
|
|
//--------------------------------------------------------------------------------------------------------------------------
|
|
void UCogWindow_Settings::RenderContent()
|
|
{
|
|
FCogWindowWidgets::SetNextItemToShortWidth();
|
|
ImGui::SliderFloat("DPI Scale", &GetOwner()->DPIScale, 0.5f, 2.0f, "%.1f");
|
|
if (ImGui::IsItemDeactivatedAfterEdit())
|
|
{
|
|
GetOwner()->bRefreshDPIScale = true;
|
|
}
|
|
|
|
ImGui::Checkbox("Compact Mode", &GetOwner()->bCompactMode);
|
|
|
|
ImGui::Checkbox("Show Windows In Main Menu", &GetOwner()->bShowWindowsInMainMenu);
|
|
|
|
ImGui::Checkbox("Show Window Help", &GetOwner()->bShowHelp);
|
|
|
|
if (ImGui::IsItemHovered())
|
|
{
|
|
ImGui::BeginTooltip();
|
|
ImGui::TextUnformatted("Change DPi Scale [Mouse Wheel]");
|
|
ImGui::TextUnformatted("Reset DPi Scale [Middle Mouse]");
|
|
ImGui::EndTooltip();
|
|
}
|
|
|
|
ImGui::Separator();
|
|
|
|
ImGui::Spacing();
|
|
ImGui::Spacing();
|
|
if (ImGui::Button("Reset All Windows Config"))
|
|
{
|
|
GetOwner()->ResetAllWindowsConfig();
|
|
}
|
|
}
|