From e57b8912db9ac8d44e6ab3f448c29341aedc0170 Mon Sep 17 00:00:00 2001 From: aBlueShadow Date: Sun, 8 Mar 2026 22:37:31 +0100 Subject: [PATCH 1/3] hotkeys for aiming step-by-step --- src/gui/hotkeyConfig.cpp | 4 ++++ src/gui/hotkeyConfig.h | 2 ++ src/screens/crew1/singlePilotScreen.cpp | 11 +++++++++++ src/screens/crew4/tacticalScreen.cpp | 11 +++++++++++ src/screens/crew6/weaponsScreen.cpp | 11 +++++++++++ 5 files changed, 39 insertions(+) diff --git a/src/gui/hotkeyConfig.cpp b/src/gui/hotkeyConfig.cpp index 5e3727823d..84e7ea8c17 100644 --- a/src/gui/hotkeyConfig.cpp +++ b/src/gui/hotkeyConfig.cpp @@ -219,6 +219,8 @@ Keys::Keys() : weapons_disable_aim_lock("WEAPONS_AIM_LOCK_DISABLE"), weapons_aim_left("WEAPONS_AIM_LEFT", "G"), weapons_aim_right("WEAPONS_AIM_RIGHT", "H"), + weapons_aim_left_step("WEAPONS_AIM_LEFT_STEP"), + weapons_aim_right_step("WEAPONS_AIM_RIGHT_STEP"), //Science science_scan_object("SCIENCE_SCAN_OBJECT", "S"), @@ -417,6 +419,8 @@ void Keys::init() weapons_disable_aim_lock.setLabel(tr("hotkey_menu", "Weapons"), tr("hotkey_Weapons", "Disable missile aim lock")); weapons_aim_left.setLabel(tr("hotkey_menu", "Weapons"), tr("hotkey_Weapons", "Turn missile aim to the left")); weapons_aim_right.setLabel(tr("hotkey_menu", "Weapons"), tr("hotkey_Weapons", "Turn missile aim to the right")); + weapons_aim_left_step.setLabel(tr("hotkey_menu", "Weapons"), tr("hotkey_Weapons", "Turn missile aim left (15° steps)")); + weapons_aim_right_step.setLabel(tr("hotkey_menu", "Weapons"), tr("hotkey_Weapons", "Turn missile aim right (15° steps)")); //Science science_scan_object.setLabel(tr("hotkey_menu", "Science"), tr("hotkey_Science", "Scan object")); diff --git a/src/gui/hotkeyConfig.h b/src/gui/hotkeyConfig.h index 0a17ddc74c..45149919fb 100644 --- a/src/gui/hotkeyConfig.h +++ b/src/gui/hotkeyConfig.h @@ -110,6 +110,8 @@ class Keys sp::io::Keybinding weapons_disable_aim_lock; sp::io::Keybinding weapons_aim_left; sp::io::Keybinding weapons_aim_right; + sp::io::Keybinding weapons_aim_left_step; + sp::io::Keybinding weapons_aim_right_step; //Science sp::io::Keybinding science_scan_object; diff --git a/src/screens/crew1/singlePilotScreen.cpp b/src/screens/crew1/singlePilotScreen.cpp index 6346025d09..28c912f46a 100644 --- a/src/screens/crew1/singlePilotScreen.cpp +++ b/src/screens/crew1/singlePilotScreen.cpp @@ -187,6 +187,17 @@ void SinglePilotScreen::onUpdate() } auto aim_adjust = keys.weapons_aim_left.getValue() - keys.weapons_aim_right.getValue(); + // when using 15° steps, make sure the angle is a multiple of 15 + if (keys.weapons_aim_left_step.getDown()) + { + missile_aim->setValue(std::round(missile_aim->getValue()/15)*15); + aim_adjust =3.0f; + } + if (keys.weapons_aim_right_step.getDown()) + { + missile_aim->setValue(std::round(missile_aim->getValue()/15)*15); + aim_adjust =-3.0f; + } if (aim_adjust != 0.0f) { missile_aim->setValue(missile_aim->getValue() - 5.0f * aim_adjust); diff --git a/src/screens/crew4/tacticalScreen.cpp b/src/screens/crew4/tacticalScreen.cpp index e727013544..029eb1c0f5 100644 --- a/src/screens/crew4/tacticalScreen.cpp +++ b/src/screens/crew4/tacticalScreen.cpp @@ -168,6 +168,17 @@ void TacticalScreen::onUpdate() } auto aim_adjust = keys.weapons_aim_left.getValue() - keys.weapons_aim_right.getValue(); + // when using 15° steps, make sure the angle is a multiple of 15 + if (keys.weapons_aim_left_step.getDown()) + { + missile_aim->setValue(std::round(missile_aim->getValue()/15)*15); + aim_adjust =3.0f; + } + if (keys.weapons_aim_right_step.getDown()) + { + missile_aim->setValue(std::round(missile_aim->getValue()/15)*15); + aim_adjust =-3.0f; + } if (aim_adjust != 0.0f) { missile_aim->setValue(missile_aim->getValue() - 5.0f * aim_adjust); diff --git a/src/screens/crew6/weaponsScreen.cpp b/src/screens/crew6/weaponsScreen.cpp index 872625630c..2703acf0cb 100644 --- a/src/screens/crew6/weaponsScreen.cpp +++ b/src/screens/crew6/weaponsScreen.cpp @@ -156,6 +156,17 @@ void WeaponsScreen::onUpdate() } } auto aim_adjust = keys.weapons_aim_left.getValue() - keys.weapons_aim_right.getValue(); + // when using 15° steps, make sure the angle is a multiple of 15 + if (keys.weapons_aim_left_step.getDown()) + { + missile_aim->setValue(std::round(missile_aim->getValue()/15)*15); + aim_adjust =3.0f; + } + if (keys.weapons_aim_right_step.getDown()) + { + missile_aim->setValue(std::round(missile_aim->getValue()/15)*15); + aim_adjust =-3.0f; + } if (aim_adjust != 0.0f) { missile_aim->setValue(missile_aim->getValue() - 5.0f * aim_adjust); From 2d3943efd495ca79c1e7a3272753ee639314c538 Mon Sep 17 00:00:00 2001 From: aBlueShadow Date: Mon, 9 Mar 2026 00:58:54 +0100 Subject: [PATCH 2/3] add stepwise keybinding for scanning --- src/gui/hotkeyConfig.cpp | 14 ++++++++++++++ src/gui/hotkeyConfig.h | 2 ++ src/screenComponents/scanningDialog.cpp | 4 ++++ 3 files changed, 20 insertions(+) diff --git a/src/gui/hotkeyConfig.cpp b/src/gui/hotkeyConfig.cpp index 84e7ea8c17..3e3fbfa4b0 100644 --- a/src/gui/hotkeyConfig.cpp +++ b/src/gui/hotkeyConfig.cpp @@ -244,6 +244,18 @@ Keys::Keys() : {"SCIENCE_SCAN_PARAM_SET_3"}, {"SCIENCE_SCAN_PARAM_SET_4"}, }}, + science_scan_param_increase_step{{ + {"SCIENCE_SCAN_PARAM_INCREASE_STEP_1"}, + {"SCIENCE_SCAN_PARAM_INCREASE_STEP_2"}, + {"SCIENCE_SCAN_PARAM_INCREASE_STEP_3"}, + {"SCIENCE_SCAN_PARAM_INCREASE_STEP_4"}, + }}, + science_scan_param_decrease_step{{ + {"SCIENCE_SCAN_PARAM_DECREASE_STEP_1"}, + {"SCIENCE_SCAN_PARAM_DECREASE_STEP_2"}, + {"SCIENCE_SCAN_PARAM_DECREASE_STEP_3"}, + {"SCIENCE_SCAN_PARAM_DECREASE_STEP_4"}, + }}, //Engineering engineering_select_system{ @@ -431,6 +443,8 @@ void Keys::init() science_scan_param_increase[n].setLabel(tr("hotkey_menu", "Science"), tr("hotkey_Science", "Scanning parameter {number} increase").format({{"number", string(n+1)}})); science_scan_param_decrease[n].setLabel(tr("hotkey_menu", "Science"), tr("hotkey_Science", "Scanning parameter {number} decrease").format({{"number", string(n+1)}})); science_scan_param_set[n].setLabel(tr("hotkey_menu", "Science"), tr("hotkey_Science", "Set scanning parameter {number} (joystick)").format({{"number", string(n+1)}})); + science_scan_param_increase_step[n].setLabel(tr("hotkey_menu", "Science"), tr("hotkey_Science", "Scan parameter {number} increase stepwise").format({{"number", string(n+1)}})); + science_scan_param_decrease_step[n].setLabel(tr("hotkey_menu", "Science"), tr("hotkey_Science", "Scan parameter {number} decrease stepwise").format({{"number", string(n+1)}})); } //Engineering diff --git a/src/gui/hotkeyConfig.h b/src/gui/hotkeyConfig.h index 45149919fb..1dd93e78fc 100644 --- a/src/gui/hotkeyConfig.h +++ b/src/gui/hotkeyConfig.h @@ -120,6 +120,8 @@ class Keys std::array science_scan_param_increase; std::array science_scan_param_decrease; std::array science_scan_param_set; + std::array science_scan_param_increase_step; + std::array science_scan_param_decrease_step; //Engineering sp::io::Keybinding engineering_select_system[ShipSystem::COUNT]; diff --git a/src/screenComponents/scanningDialog.cpp b/src/screenComponents/scanningDialog.cpp index ad10f47dc4..dfc1f0029a 100644 --- a/src/screenComponents/scanningDialog.cpp +++ b/src/screenComponents/scanningDialog.cpp @@ -91,6 +91,10 @@ void GuiScanningDialog::onUpdate() for(int n=0; nsetValue(sliders[n]->getValue() + adjust); From 7c1eab5d77c8c675a4ce89b30d00dc90289404b5 Mon Sep 17 00:00:00 2001 From: aBlueShadow Date: Wed, 13 May 2026 21:33:48 +0200 Subject: [PATCH 3/3] add stepwise keybinding for coolant and power adjustments --- src/gui/hotkeyConfig.cpp | 8 ++++++++ src/gui/hotkeyConfig.h | 4 ++++ src/screens/crew6/engineeringScreen.cpp | 8 ++++++++ 3 files changed, 20 insertions(+) diff --git a/src/gui/hotkeyConfig.cpp b/src/gui/hotkeyConfig.cpp index e85fabb0b8..79b9e3fae4 100644 --- a/src/gui/hotkeyConfig.cpp +++ b/src/gui/hotkeyConfig.cpp @@ -288,9 +288,13 @@ Keys::Keys() : engineering_set_power_300("ENGINEERING_POWER_300"), engineering_increase_power("ENGINEERING_POWER_INCREASE", "]"), engineering_decrease_power("ENGINEERING_POWER_DECREASE", "["), + engineering_increase_power_stepped("ENGINEERING_POWER_INCREASE_STEPPED"), + engineering_decrease_power_stepped("ENGINEERING_POWER_DECREASE_STEPPED"), engineering_set_power("ENGINEERING_POWER_SET"), engineering_increase_coolant("ENGINEERING_COOLANT_INCREASE", "="), engineering_decrease_coolant("ENGINEERING_COOLANT_DECREASE", "-"), + engineering_increase_coolant_stepped("ENGINEERING_COOLANT_INCREASE_STEPPED"), + engineering_decrease_coolant_stepped("ENGINEERING_COOLANT_DECREASE_STEPPED"), engineering_set_coolant("ENGINEERING_COOLANT_SET"), engineering_next_repair_crew("ENGINEERING_REPAIR_CREW_NEXT", "C"), engineering_repair_crew_up("ENGINEERING_REPAIR_CREW_UP", "Up"), @@ -483,9 +487,13 @@ void Keys::init() engineering_set_power_300.setLabel(tr("hotkey_menu", "Engineering"), tr("hotkey_Engineering", "Set system power to 300%")); engineering_increase_power.setLabel(tr("hotkey_menu", "Engineering"), tr("hotkey_Engineering", "Increase system power")); engineering_decrease_power.setLabel(tr("hotkey_menu", "Engineering"), tr("hotkey_Engineering", "Decrease system power")); + engineering_increase_power_stepped.setLabel(tr("hotkey_menu", "Engineering"), tr("hotkey_Engineering", "Increase system power stepwise")); + engineering_decrease_power_stepped.setLabel(tr("hotkey_menu", "Engineering"), tr("hotkey_Engineering", "Decrease system power stepwise")); engineering_set_power.setLabel(tr("hotkey_menu", "Engineering"), tr("hotkey_Engineering", "Set system power (joystick)")); engineering_increase_coolant.setLabel(tr("hotkey_menu", "Engineering"), tr("hotkey_Engineering", "Increase system coolant")); engineering_decrease_coolant.setLabel(tr("hotkey_menu", "Engineering"), tr("hotkey_Engineering", "Decrease system coolant")); + engineering_increase_coolant_stepped.setLabel(tr("hotkey_menu", "Engineering"), tr("hotkey_Engineering", "Increase system coolant stepwise")); + engineering_decrease_coolant_stepped.setLabel(tr("hotkey_menu", "Engineering"), tr("hotkey_Engineering", "Decrease system coolant stepwise")); engineering_set_coolant.setLabel(tr("hotkey_menu", "Engineering"), tr("hotkey_Engineering", "Set system coolant (joystick)")); engineering_next_repair_crew.setLabel(tr("hotkey_menu", "Engineering"), tr("hotkey_Engineering", "Next repair crew")); engineering_repair_crew_up.setLabel(tr("hotkey_menu", "Engineering"), tr("hotkey_Engineering", "Crew move up")); diff --git a/src/gui/hotkeyConfig.h b/src/gui/hotkeyConfig.h index 21a0b355c2..003189d252 100644 --- a/src/gui/hotkeyConfig.h +++ b/src/gui/hotkeyConfig.h @@ -142,9 +142,13 @@ class Keys sp::io::Keybinding engineering_set_power_300; sp::io::Keybinding engineering_increase_power; sp::io::Keybinding engineering_decrease_power; + sp::io::Keybinding engineering_increase_power_stepped; + sp::io::Keybinding engineering_decrease_power_stepped; sp::io::Keybinding engineering_set_power; sp::io::Keybinding engineering_increase_coolant; sp::io::Keybinding engineering_decrease_coolant; + sp::io::Keybinding engineering_increase_coolant_stepped; + sp::io::Keybinding engineering_decrease_coolant_stepped; sp::io::Keybinding engineering_set_coolant; sp::io::Keybinding engineering_next_repair_crew; sp::io::Keybinding engineering_repair_crew_up; diff --git a/src/screens/crew6/engineeringScreen.cpp b/src/screens/crew6/engineeringScreen.cpp index e0a9221cf9..dd0defb6e0 100644 --- a/src/screens/crew6/engineeringScreen.cpp +++ b/src/screens/crew6/engineeringScreen.cpp @@ -459,6 +459,10 @@ void EngineeringScreen::onUpdate() } auto power_adjust = (keys.engineering_increase_power.getValue() - keys.engineering_decrease_power.getValue()) * 0.1f; + if (keys.engineering_decrease_power_stepped.getDown()) + power_adjust =-0.1f; + if (keys.engineering_increase_power_stepped.getDown()) + power_adjust = 0.1f; if (power_adjust != 0.0f) { auto sys = ShipSystem::get(my_spaceship, selected_system); @@ -468,6 +472,10 @@ void EngineeringScreen::onUpdate() } } auto coolant_adjust = (keys.engineering_increase_coolant.getValue() - keys.engineering_decrease_coolant.getValue()) * 0.5f; + if (keys.engineering_decrease_coolant_stepped.getDown()) + coolant_adjust =-0.5f; + if (keys.engineering_increase_coolant_stepped.getDown()) + coolant_adjust = 0.5f; if (coolant_adjust != 0.0f) { auto sys = ShipSystem::get(my_spaceship, selected_system);