Skip to content

Commit

Permalink
Medical GUI - Improve toggle button icon and tooltip (#9485)
Browse files Browse the repository at this point in the history
Improve toggle button icon and tooltip
  • Loading branch information
amsteadrayle authored Oct 13, 2023
1 parent 5a2fd70 commit 503373b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 17 deletions.
Binary file removed addons/medical_gui/data/categories/toggle_self.paa
Binary file not shown.
Binary file not shown.
Binary file not shown.
10 changes: 10 additions & 0 deletions addons/medical_gui/functions/fnc_onMenuOpen.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,13 @@ private _offsetX = POS_X(1.5) + 0.5 * (POS_X(12) - POS_X(_countEnabled * 1.5));
_ctrl ctrlShow false;
};
} forEach _list;

// Set toggle button icon and tooltip
private _ctrl = _display displayCtrl IDC_TOGGLE;
if (GVAR(target) == ACE_player) then {
_ctrl ctrlSetText QPATHTOF(data\categories\toggle_to_other.paa);
_ctrl ctrlSetTooltip LLSTRING(ToggleToOther);
} else {
_ctrl ctrlSetText QPATHTOF(data\categories\toggle_to_self.paa);
_ctrl ctrlSetTooltip LLSTRING(ToggleToSelf);
};
3 changes: 1 addition & 2 deletions addons/medical_gui/gui.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,7 @@ class ACE_Medical_Menu {
class Toggle: Triage {
idc = IDC_TOGGLE;
onButtonClick = QUOTE(call FUNC(handleToggle));
text = QPATHTOF(data\categories\toggle_self.paa);
tooltip = CSTRING(ToggleSelf);
text = QPATHTOF(data\categories\toggle_to_other.paa);
x = QUOTE(POS_X(12));
};
class TriageCard: RscListBox {
Expand Down
20 changes: 5 additions & 15 deletions addons/medical_gui/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -534,21 +534,11 @@
<Chinese>拖 / 背</Chinese>
<Turkish>Sürükle / Taşı</Turkish>
</Key>
<Key ID="STR_ACE_Medical_GUI_ToggleSelf">
<English>Toggle (Self)</English>
<German>Umschalter (Selbst)</German>
<Russian>Лечить себя/другого раненого</Russian>
<French>Basculer (soi-même)</French>
<Polish>Przełącz (na siebie)</Polish>
<Spanish>Alternar</Spanish>
<Portuguese>Alternar (Si mesmo)</Portuguese>
<Czech>Přepnout (na sebe)</Czech>
<Italian>Attiva (Te Stesso)</Italian>
<Japanese>切り替え (自分)</Japanese>
<Korean>토글 (자신)</Korean>
<Chinesesimp>切换(自己)</Chinesesimp>
<Chinese>切換 (自己)</Chinese>
<Turkish>Değiştir (Şahsi)</Turkish>
<Key ID="STR_ACE_Medical_GUI_ToggleToSelf">
<English>Switch to self</English>
</Key>
<Key ID="STR_ACE_Medical_GUI_ToggleToOther">
<English>Switch to target</English>
</Key>
<Key ID="STR_ACE_Medical_GUI_Head">
<English>Head</English>
Expand Down

0 comments on commit 503373b

Please sign in to comment.