mirror of
https://github.com/Ed94/Cog.git
synced 2026-06-13 00:01:37 -07:00
Move back toggle selection shortcut in selection window
This commit is contained in:
@@ -81,7 +81,6 @@ void UCogSubsystem::TryInitialize(UWorld& World)
|
||||
|
||||
UCogWindowConfig_Settings* SettingsPtr = Settings.Get();
|
||||
AddShortcut(SettingsPtr, &UCogWindowConfig_Settings::Shortcut_ToggleImguiInput).BindLambda([this] () { ToggleInputMode(); });
|
||||
AddShortcut(SettingsPtr, &UCogWindowConfig_Settings::Shortcut_ToggleSelection).BindLambda([this] (){ SetActivateSelectionMode(!GetActivateSelectionMode()); });
|
||||
AddShortcut(SettingsPtr, &UCogWindowConfig_Settings::Shortcut_LoadLayout1).BindLambda([this] (){ LoadLayout(1); });
|
||||
AddShortcut(SettingsPtr, &UCogWindowConfig_Settings::Shortcut_LoadLayout2).BindLambda([this] (){ LoadLayout(2); });
|
||||
AddShortcut(SettingsPtr, &UCogWindowConfig_Settings::Shortcut_LoadLayout3).BindLambda([this] (){ LoadLayout(3); });
|
||||
|
||||
@@ -99,9 +99,6 @@ public:
|
||||
UPROPERTY(Config)
|
||||
FInputChord Shortcut_ToggleImguiInput = FInputChord(EKeys::F1);
|
||||
|
||||
UPROPERTY(Config)
|
||||
FInputChord Shortcut_ToggleSelection = FInputChord(EKeys::F5);
|
||||
|
||||
UPROPERTY(Config)
|
||||
FInputChord Shortcut_LoadLayout1 = FInputChord(EKeys::F2);
|
||||
|
||||
@@ -155,7 +152,6 @@ public:
|
||||
WidgetAlignment = ECogWidgetAlignment::Right;
|
||||
ShowWidgetBorders = false;
|
||||
Shortcut_ToggleImguiInput = FInputChord(EKeys::F1);
|
||||
Shortcut_ToggleSelection = FInputChord(EKeys::F5);
|
||||
Shortcut_LoadLayout1 = FInputChord(EKeys::F2);
|
||||
Shortcut_LoadLayout2 = FInputChord(EKeys::F3);
|
||||
Shortcut_LoadLayout3 = FInputChord(EKeys::F4);
|
||||
|
||||
@@ -30,6 +30,8 @@ void FCogEngineWindow_Selection::Initialize()
|
||||
|
||||
Config = GetConfig<UCogEngineConfig_Selection>();
|
||||
|
||||
GetOwner()->AddShortcut(Config.Get(), &UCogEngineConfig_Selection::Shortcut_ToggleSelection).BindLambda([this] (){ GetOwner()->SetActivateSelectionMode(!GetOwner()->GetActivateSelectionMode()); });
|
||||
|
||||
Asset = GetAsset<UCogEngineDataAsset>();
|
||||
|
||||
FCogConsoleCommandManager::RegisterWorldConsoleCommand(
|
||||
@@ -339,9 +341,11 @@ void FCogEngineWindow_Selection::RenderPickButtonTooltip()
|
||||
{
|
||||
if (FCogWidgets::BeginItemTooltipWrappedText())
|
||||
{
|
||||
const FString Shortcut = FCogImguiInputHelper::InputChordToString(GetOwner()->GetSettings()->Shortcut_ToggleSelection);
|
||||
ImGui::Text("Enter selection mode to select an actor on screen. Change which actor type is selectable by clicking the selection combobox\n"
|
||||
"%s", TCHAR_TO_ANSI(*Shortcut));
|
||||
ImGui::Text("Enter selection mode to select an actor on screen. Change which actor type is selectable by clicking the selection combobox\n");
|
||||
ImGui::Spacing();
|
||||
ImGui::Separator();
|
||||
FCogWidgets::TextOfAllInputChordsOfConfig(*Config.Get());
|
||||
|
||||
FCogWidgets::EndItemTooltipWrappedText();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,13 +129,13 @@ void FCogEngineWindow_TimeScale::RenderMainMenuWidget()
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ImGui::BeginItemTooltip())
|
||||
if (FCogWidgets::BeginItemTooltipWrappedText())
|
||||
{
|
||||
ImGui::Text("Time Scale: x%g", TimeDilation);
|
||||
ImGui::Spacing();
|
||||
ImGui::Separator();
|
||||
FCogWidgets::TextOfAllInputChordsOfConfig(*Config.Get());
|
||||
ImGui::EndTooltip();
|
||||
FCogWidgets::EndItemTooltipWrappedText();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,6 +86,9 @@ public:
|
||||
UPROPERTY(Config)
|
||||
int32 SelectedClassIndex = 0;
|
||||
|
||||
UPROPERTY(Config)
|
||||
FInputChord Shortcut_ToggleSelection = FInputChord(EKeys::F5);
|
||||
|
||||
virtual void Reset() override
|
||||
{
|
||||
Super::Reset();
|
||||
@@ -93,5 +96,6 @@ public:
|
||||
bReapplySelection = true;
|
||||
SelectionName.Reset();
|
||||
SelectedClassIndex = 0;
|
||||
Shortcut_ToggleSelection = FInputChord(EKeys::F5);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user