Skip to content

Commit

Permalink
Radios - Localize some radio UI tooltips (#1288)
Browse files Browse the repository at this point in the history
  • Loading branch information
PabstMirror authored Sep 25, 2023
1 parent 0be9a90 commit 7758c21
Show file tree
Hide file tree
Showing 12 changed files with 50 additions and 20 deletions.
4 changes: 2 additions & 2 deletions addons/sys_bf888s/bf888s_RadioDialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class BF888S_RadioDialog {
colorBackground[] = {1, 0, 0, 0};
text = "";
onMouseButtonUp = "[_this,0] call acre_sys_bf888s_fnc_onChannelKnobPress";
toolTip = QUOTE(Change channel);
toolTip = ECSTRING(sys_radio,ui_ChangeChannel);
END_CONTROL

BEGIN_CONTROL(VolumeKnob, BF888S_RscPicture, 107)
Expand All @@ -75,7 +75,7 @@ class BF888S_RadioDialog {
colorBackground[] = {0, 1, 0, 0};
text = "";
onMouseButtonUp = QUOTE(_this call FUNC(onVolumeKnobPress));
toolTip = QUOTE(Change volume);
toolTip = ECSTRING(sys_radio,ui_ChangeVolume);
END_CONTROL
};
};
4 changes: 2 additions & 2 deletions addons/sys_bf888s/functions/fnc_render.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ _currentViewFrame = 0;

RADIO_CTRL(106) ctrlSetText format ["\idi\acre\addons\sys_bf888s\Data\knobs\channel\bf888s_ui_pre_%1.paa", _currentChannel + 1];
RADIO_CTRL(107) ctrlSetText format ["\idi\acre\addons\sys_bf888s\Data\knobs\volume\bf888s_ui_vol_%1.paa", _currentVolumeKnobState];
RADIO_CTRL(201) ctrlSetTooltip format ["Current Channel: %1", _currentChannel + 1];
RADIO_CTRL(202) ctrlSetTooltip format ["Current Volume: %1%2", round (_currentVolume * 100), "%"];
RADIO_CTRL(201) ctrlSetTooltip format ["%1: %2", LELSTRING(sys_radio,ui_CurrentChannel), _currentChannel + 1];
RADIO_CTRL(202) ctrlSetTooltip format ["%1: %2%3", LELSTRING(sys_radio,ui_CurrentVolume), round (_currentVolume * 100), "%"];
RADIO_CTRL(99999) ctrlSetText QPATHTOF(Data\static\bf888s_ui_backplate.paa);

{_x ctrlEnable true;} forEach [RADIO_CTRL(201), RADIO_CTRL(202)];
Expand Down
2 changes: 1 addition & 1 deletion addons/sys_intercom/vic3/vic3_ffcs_intercomDialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class VIC3FFCS_IntercomDialog {
h = QUOTE((1.15/0.8)*0.050*SafeZoneH);
text = "";
onMouseButtonUp = QUOTE(_this call FUNC(vic3ffcsOnVolumeKnobPress));
toolTip = QUOTE(Change volume);
toolTip = ECSTRING(sys_radio,ui_ChangeVolume);
END_CONTROL

BEGIN_CONTROL(WorkKnobButton, VIC3FFCS_RscButton, 204)
Expand Down
2 changes: 1 addition & 1 deletion addons/sys_prc148/fnc_render.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ SCRATCH_SET(GVAR(currentRadioId), "animations", []);
[_display, BIG_LINE_4, " ", LEFT_ALIGN] call FUNC(displayLine);

private _currentVolume = GET_STATE("volume"); //from 0 to 1
RADIO_CTRL(12010+201) ctrlSetTooltip format ["Current Volume: %1%2", round(_currentVolume * 100), "%"];
RADIO_CTRL(12010+201) ctrlSetTooltip format ["%1: %2%3", LELSTRING(sys_radio,ui_CurrentVolume), round (_currentVolume * 100), "%"];

private _knobImageStr = format["\idi\acre\addons\sys_prc148\Data\knobs\volume\prc148_ui_vol_%1.paa", round(_currentVolume * 5)];
TRACE_1("VolumeKnob",_knobImageStr);
Expand Down
4 changes: 2 additions & 2 deletions addons/sys_prc148/menus/fnc_onVolumeKnobPress.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ if (_currentVolume != _newVolume) then {
if (_newVolume >= 0.2) then {
["Acre_GenericClick", [0, 0, 0], [0, 0, 0], _newVolume^3, false] call EFUNC(sys_sounds,playSound);
["setVolume", _newVolume] call GUI_DATA_EVENT;
RADIO_CTRL(12010+201) ctrlSetTooltip format ["Current Volume: %1%2", round (_newVolume*100), "%"];
RADIO_CTRL(12010+201) ctrlSetTooltip format ["%1: %2%3", LELSTRING(sys_radio,ui_CurrentVolume), round (_newVolume*100), "%"];
};
if (_newVolume < 0.2 /*&& _ctrl*/) then {
["setVolume", 0] call GUI_DATA_EVENT;
["setOnOffState", 0] call GUI_DATA_EVENT;
RADIO_CTRL(12010+201) ctrlSetTooltip format ["Radio off"];
RADIO_CTRL(12010+201) ctrlSetTooltip LELSTRING(sys_radio,ui_Radiooff);
} else {
if (_newVolume > 0 && _currentVolume < 0.2) then {
//acre_player sideChat "STARTING RADIO!";
Expand Down
2 changes: 1 addition & 1 deletion addons/sys_prc148/prc148_RadioDialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ class PRC148_RadioDialog {
onMouseEnter = "[_this, 'Channel'] call acre_sys_prc148_fnc_onKnobMouseEnter;";
onMouseExit = "[_this, 'Channel'] call acre_sys_prc148_fnc_onKnobMouseExit;";
onMouseButtonUp = "_this call acre_sys_prc148_fnc_onChannelKnobPress;";
toolTip = QUOTE(Change channel);
toolTip = ECSTRING(sys_radio,ui_ChangeChannel);
END_CONTROL
};

Expand Down
4 changes: 2 additions & 2 deletions addons/sys_prc152/prc152_RadioDialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ class Prc152_RadioDialog {
colorBackground[] = {1,1,1,0};
text = "";
onMouseButtonUp = QUOTE((['KNOB'] + _this) call FUNC(onButtonPress));
tooltip = QUOTE(Change channel);
toolTip = ECSTRING(sys_radio,ui_ChangeChannel);
END_CONTROL


Expand All @@ -369,7 +369,7 @@ class Prc152_RadioDialog {
onMouseEnter = QUOTE((['VOLUME'] + _this) call FUNC(onKnobMouseEnter));
onMouseExit = QUOTE((['VOLUME'] + _this) call FUNC(onKnobMouseExit));
onMouseButtonUp = QUOTE((['VOLUME'] + _this) call FUNC(onButtonPress));
tooltip = QUOTE(Change volume);
toolTip = ECSTRING(sys_radio,ui_ChangeVolume);
END_CONTROL

};
Expand Down
8 changes: 4 additions & 4 deletions addons/sys_prc343/functions/fnc_render.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ if (_currentView == 0) then {
RADIO_CTRL(203) ctrlSetPosition [(0.3 * safeZoneW + safeZoneX), (0.277 * safeZoneH + safeZoneY), 0.1*SafeZoneW, 0.5*SafeZoneW];
RADIO_CTRL(203) ctrlCommit 0.01;

RADIO_CTRL(203) ctrlSetTooltip "Attach handle";
RADIO_CTRL(204) ctrlSetTooltip format ["Current channel block: %1", _currentBlock + 1];
RADIO_CTRL(203) ctrlSetTooltip LELSTRING(sys_radio,ui_handleAttach);
RADIO_CTRL(204) ctrlSetTooltip format ["%1: %2", LELSTRING(sys_radio,ui_CurrentChannelBlock), _currentBlock + 1];

{
(RADIO_CTRL(_x)) ctrlSetFade 1;
Expand All @@ -59,7 +59,7 @@ if (_currentView == 0) then {
RADIO_CTRL(203) ctrlSetPosition [(0.35 * safeZoneW + safeZoneX), (0.377 * safeZoneH + safeZoneY), 0.07*SafeZoneW, 0.4*SafeZoneW];
RADIO_CTRL(203) ctrlCommit 0.01;

RADIO_CTRL(203) ctrlSetTooltip "Detach handle";
RADIO_CTRL(203) ctrlSetTooltip LELSTRING(sys_radio,ui_handleDetach);
RADIO_CTRL(204) ctrlSetTooltip "";

{
Expand All @@ -69,7 +69,7 @@ if (_currentView == 0) then {

RADIO_CTRL(106) ctrlSetText format ["\idi\acre\addons\sys_prc343\Data\knobs\channel\prc343_ui_pre_%1.paa", _currentChannel + 1];
RADIO_CTRL(107) ctrlSetText format ["\idi\acre\addons\sys_prc343\Data\knobs\volume\prc343_ui_vol_%1.paa", _currentVolumeKnobState];
RADIO_CTRL(202) ctrlSetTooltip format ["Current Volume: %1%2", round (_currentVolume * 100), "%"];
RADIO_CTRL(202) ctrlSetTooltip format ["%1: %2%3", LELSTRING(sys_radio,ui_CurrentVolume), round (_currentVolume * 100), "%"];
RADIO_CTRL(99999) ctrlSetText QPATHTOF(Data\static\prc343_ui_backplate.paa);

{_x ctrlEnable true;} forEach [RADIO_CTRL(201), RADIO_CTRL(202), RADIO_CTRL(203)];
Expand Down
4 changes: 2 additions & 2 deletions addons/sys_prc343/prc343_RadioDialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class PRC343_RadioDialog {
colorBackground[] = {1, 0, 0, 0};
text = "";
onMouseButtonUp = "[_this,0] call acre_sys_prc343_fnc_onChannelKnobPress";
toolTip = QUOTE(Change channel);
toolTip = ECSTRING(sys_radio,ui_ChangeChannel);
END_CONTROL

BEGIN_CONTROL(VolumeKnob, Prc343_RscPicture, 107)
Expand All @@ -73,7 +73,7 @@ class PRC343_RadioDialog {
colorBackground[] = {0, 1, 0, 0};
text = "";
onMouseButtonUp = QUOTE(_this call FUNC(onVolumeKnobPress));
toolTip = QUOTE(Change volume);
toolTip = ECSTRING(sys_radio,ui_ChangeVolume);
END_CONTROL

BEGIN_CONTROL(PTTHandleButton, Prc343_RscButton, 203)
Expand Down
30 changes: 30 additions & 0 deletions addons/sys_radio/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -159,5 +159,35 @@
<Portuguese>Rádio configurado a %1</Portuguese>
<Turkish>Telsiz Ayarı Şuna Atandı: %1</Turkish>
</Key>
<Key ID="STR_ACRE_sys_radio_ui_ChangeVolume">
<English>Change Volume</English>
</Key>
<Key ID="STR_ACRE_sys_radio_ui_CurrentVolume">
<English>Current Volume</English>
</Key>
<Key ID="STR_ACRE_sys_radio_ui_Radiooff">
<English>Radio off</English>
</Key>
<Key ID="STR_ACRE_sys_radio_ui_ChangeChannel">
<English>Change Channel</English>
</Key>
<Key ID="STR_ACRE_sys_radio_ui_CurrentChannel">
<English>Current Channel</English>
<German>Aktueller Kanal</German>
<Italian>Canale Corrente</Italian>
<Spanish>Canal actual</Spanish>
<French>Canal actuel</French>
<Turkish>Şu Anki Kanal</Turkish>
<Portuguese>Canal atual</Portuguese>
</Key>
<Key ID="STR_ACRE_sys_radio_ui_CurrentChannelBlock">
<English>Current Channel Block</English>
</Key>
<Key ID="STR_ACRE_sys_radio_ui_handleAttach">
<English>Attach handle</English>
</Key>
<Key ID="STR_ACRE_sys_radio_ui_handleDetach">
<English>Detach handle</English>
</Key>
</Package>
</Project>
4 changes: 2 additions & 2 deletions addons/sys_sem52sl/sem52sl_RadioDialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class SEM52SL_RadioDialog {
h = QUOTE((1.15/0.8)*0.050*SafeZoneH);
text = "";
onMouseButtonUp = QUOTE(_this call FUNC(onChannelKnobPress));
toolTip = QUOTE(Change channel);
toolTip = ECSTRING(sys_radio,ui_ChangeChannel);
END_CONTROL

BEGIN_CONTROL(VolumeKnobButton, SEM52SL_RscButton, 202)
Expand All @@ -116,7 +116,7 @@ class SEM52SL_RadioDialog {
h = QUOTE((1.15/0.8)*0.050*SafeZoneH);
text = "";
onMouseButtonUp = QUOTE(_this call FUNC(onVolumeKnobPress));
toolTip = QUOTE(Change volume);
toolTip = ECSTRING(sys_radio,ui_ChangeVolume);
END_CONTROL

BEGIN_CONTROL(PTTButton, SEM52SL_RscButton, 203)
Expand Down
2 changes: 1 addition & 1 deletion addons/sys_sem70/sem70_RadioDialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ class SEM70_RadioDialog {
colorBackground[] = {1, 0, 0, 0};
text = "";
onMouseButtonUp = QUOTE(_this call FUNC(onVolumeKnobTurn));
toolTip = QUOTE(Change Volume);
toolTip = ECSTRING(sys_radio,ui_ChangeVolume);
END_CONTROL

BEGIN_CONTROL(MainButton, SEM70_RscButton, 202)
Expand Down

0 comments on commit 7758c21

Please sign in to comment.