Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interact menu - Convert 'use list menu' setting to 'use wheel menu' #6656

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions addons/interact_menu/ACE_Settings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ class ACE_Settings {
category = CSTRING(Category_InteractionMenu);
displayName = CSTRING(AlwaysUseCursorInteraction);
};
class GVAR(useListMenu) {
class GVAR(UseRadialMenu) {
value = 0;
typeName = "BOOL";
isClientSettable = 1;
category = CSTRING(Category_InteractionMenu);
displayName = CSTRING(UseListMenu);
displayName = CSTRING(UseRadialMenu);
};
class GVAR(colorTextMax) {
value[] = {1, 1, 1, 1};
Expand Down
4 changes: 2 additions & 2 deletions addons/interact_menu/functions/fnc_renderIcon.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if (_iconFile isEqualTo "") then {
_iconFile = DEFAULT_ICON;
};

_text = if (GVAR(UseListMenu)) then {
_text = if !(GVAR(UseRadialMenu)) then {
format ["<img image='%1' align='left' color='%2'/><t %3>%4</t>", _iconFile, _iconColor, _textSettings, _text]
} else {
format ["<img image='%1' align='center' color='%2'/><br/><t %3 align='center'>%4</t>", _iconFile, _iconColor, _textSettings, "ace_break_line" callExtension _text];
Expand All @@ -47,7 +47,7 @@ _text = if (GVAR(UseListMenu)) then {
[_ctrl, GVAR(iconCount), _text] call FUNC(ctrlSetParsedTextCached);
GVAR(iconCount) = GVAR(iconCount) + 1;

private _pos = if (GVAR(UseListMenu)) then {
private _pos = if !(GVAR(UseRadialMenu)) then {
[(_sPos select 0) - (0.0095 * SafeZoneW), (_sPos select 1) - (0.0095 * SafeZoneW), 0.20 * SafeZoneW, 0.035 * SafeZoneW]
} else {
[(_sPos select 0) - (0.0750 * SafeZoneW), (_sPos select 1) - (0.0095 * SafeZoneW), 0.15 * SafeZoneW, 0.100 * SafeZoneW]
Expand Down
4 changes: 2 additions & 2 deletions addons/interact_menu/functions/fnc_renderMenu.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ if (_numChildren == 1) then {
private _scaleX = 1;
private _scaleY = 1;

if (GVAR(UseListMenu)) then {
if !(GVAR(UseRadialMenu)) then {
private _textSize = [0.75, 0.875, 1, 1.2, 1.4] select GVAR(textSize);
_scaleX = _textSize * 0.17 * 1.1;
_scaleY = 0.17 * 0.30 * 4/3;
Expand All @@ -112,7 +112,7 @@ private _player = ACE_player;
//END_COUNTER(children);
private _angle = _centerAngle - _angleSpan / 2;
{
private _newPos = if (GVAR(UseListMenu)) then {
private _newPos = if !(GVAR(UseRadialMenu)) then {
[(_sPos select 0) + _scaleX,
(_sPos select 1) + _scaleY * (_forEachIndex - _numChildren/2 + 0.5)];
} else {
Expand Down
2 changes: 1 addition & 1 deletion addons/interact_menu/functions/fnc_renderSelector.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if(GVAR(iconCount) > (count GVAR(iconCtrls))-1) then {

private _ctrl = GVAR(iconCtrls) select GVAR(iconCount);

private _pos = if (GVAR(UseListMenu)) then {
private _pos = if !(GVAR(UseRadialMenu)) then {
[_ctrl, GVAR(iconCount), format ["<img image='%1' color='%2' size='1.6'/>", _icon, GVAR(selectorColorHex)]] call FUNC(ctrlSetParsedTextCached);
[(_sPos select 0)-(0.014*SafeZoneW), (_sPos select 1)-(0.014*SafeZoneW), 0.05*SafeZoneW, 0.035*SafeZoneW]
} else {
Expand Down
18 changes: 3 additions & 15 deletions addons/interact_menu/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,9 @@
<Chinesesimp>互动时永远显示游标</Chinesesimp>
<Chinese>互動時永遠顯示游標</Chinese>
</Key>
<Key ID="STR_ACE_Interact_Menu_UseListMenu">
<English>Display interaction menus as lists</English>
<Spanish>Mostrar los menus de interacción como listas</Spanish>
<Russian>Меню взаимодействий в виде списка</Russian>
<French>Afficher le menu d'interaction sous forme de liste</French>
<Italian>Mostra il menù di interazione come lista</Italian>
<Polish>Wyświetlaj menu interakcji jako listę</Polish>
<Czech>Zobrazit menu interakce jako seznam</Czech>
<German>Interaktionsmenü in Listen anzeigen</German>
<Hungarian>Cselekvő menük listaként való megjelenítése</Hungarian>
<Portuguese>Mostrar menu de interação como listas</Portuguese>
<Japanese>インタラクション メニューを一覧表示</Japanese>
<Korean>상호작용메뉴를 리스트화 해서 보이기</Korean>
<Chinesesimp>以列表方式显示互动表单</Chinesesimp>
<Chinese>以列表方式顯示互動表單</Chinese>
<Key ID="STR_ACE_Interact_Menu_UseRadialMenu">
<English>Display interaction menus as radial points</English>
<French>Afficher le menu d'interaction sous forme circulaire</French>
</Key>
<Key ID="STR_ACE_Interact_Menu_InteractKey">
<English>Interact Key</English>
Expand Down