forked from diwako/diwako_dui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
108 changed files
with
3,610 additions
and
1,593 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
|
||
*.biprivatekey | ||
|
||
hemtt\.exe | ||
keys/ | ||
releases/ | ||
tools/ | ||
*.pbo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
z\diwako_dui\addons\main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
class Extended_PreStart_EventHandlers { | ||
class ADDON { | ||
init = QUOTE(call COMPILE_FILE(XEH_preStart)); | ||
}; | ||
}; | ||
class Extended_PreInit_EventHandlers { | ||
class ADDON { | ||
init = QUOTE(call COMPILE_FILE(XEH_preInit)); | ||
}; | ||
}; | ||
class Extended_PostInit_EventHandlers { | ||
class ADDON { | ||
init = QUOTE(call COMPILE_FILE(XEH_postInit)); | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
PREP(canHudBeShown); | ||
PREP(toHex); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#include "script_component.hpp" | ||
if (is3DEN || !hasInterface) exitWith {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
#include "script_component.hpp" | ||
ADDON = false; | ||
#include "XEH_PREP.hpp" | ||
|
||
#include "\a3\ui_f\hpp\defineDIKCodes.inc" | ||
#define CBA_SETTINGS_CAT localize "STR_dui_mod" + " - Main" | ||
|
||
GVAR(toggled_off) = false; | ||
GVAR(inFeatureCamera) = false; | ||
|
||
private _curCat = localize "STR_dui_cat_general"; | ||
|
||
private _availableFonts = [ | ||
"PuristaBold", | ||
"PuristaLight", | ||
"PuristaMedium", | ||
"PuristaSemibold", | ||
"RobotoCondensed", | ||
"RobotoCondensedBold", | ||
"RobotoCondensedLight", | ||
"EtelkaMonospacePro", | ||
// "EtelkaMonospaceProBold", | ||
// "EtelkaNarrowMediumPro", | ||
"LCD14" | ||
// "TahomaB" | ||
]; | ||
|
||
[ | ||
"diwako_dui_font" | ||
,"LIST" | ||
,[localize "STR_dui_font", localize "STR_dui_font_desc"] | ||
,[CBA_SETTINGS_CAT, _curCat] | ||
,[ | ||
_availableFonts, | ||
_availableFonts, | ||
4 | ||
] | ||
,false | ||
,{ | ||
[QGVAR(refreshUI),[]] call CBA_fnc_localEvent; | ||
} | ||
] call CBA_Settings_fnc_init; | ||
|
||
#include "include\getIconStyles.sqf" | ||
[ | ||
"diwako_dui_icon_style" | ||
,"LIST" | ||
,[localize "STR_dui_icon", localize "STR_dui_icon_desc"] | ||
,[CBA_SETTINGS_CAT, _curCat] | ||
,[ | ||
_iconIdent, | ||
_iconNames, | ||
0 | ||
] | ||
,false | ||
] call CBA_Settings_fnc_init; | ||
|
||
#include "include\getColorStyles.sqf" | ||
[ | ||
"diwako_dui_colors" | ||
,"LIST" | ||
,[localize "STR_dui_color", localize "STR_dui_color_desc"] | ||
,[CBA_SETTINGS_CAT, _curCat] | ||
,[ | ||
_colorIdent, | ||
_colorNames, | ||
0 | ||
] | ||
,false | ||
] call CBA_Settings_fnc_init; | ||
|
||
if (isClass(configfile >> "CfgPatches" >> "ace_interact_menu")) then { | ||
[ | ||
"diwako_dui_ace_hide_interaction" | ||
,"CHECKBOX" | ||
,[localize "STR_dui_ace_hide_interaction", localize "STR_dui_ace_hide_interaction_desc"] | ||
,[CBA_SETTINGS_CAT, _curCat] | ||
,true | ||
,false | ||
] call CBA_Settings_fnc_init; | ||
} else { | ||
diwako_dui_ace_hide_interaction = false; | ||
}; | ||
|
||
if !(hasInterface) exitWith {}; | ||
|
||
// cba eh for hiding the hud when in certain camera modes | ||
["featureCamera", { | ||
params ["_player", "_featureCamera"]; | ||
GVAR(inFeatureCamera) = !(_featureCamera isEqualTo ""); | ||
}, true] call CBA_fnc_addPlayerEventHandler; | ||
|
||
// player remote controls another unit or changes avatar | ||
// mainly used for the change in avatar / switch unit part as displays will be closed | ||
["unit", { | ||
params ["_newPlayerUnit", "_oldPlayerUnit"]; | ||
[QGVAR(refreshUI),[]] call CBA_fnc_localEvent; | ||
}, true] call CBA_fnc_addPlayerEventHandler; | ||
|
||
if (isClass (configfile >> "CfgPatches" >> "ace_nametags")) then { | ||
["CBA_SettingChanged", { | ||
params ["_setting", "_value"]; | ||
switch (_setting) do { | ||
case "ace_nametags_nametagColorMain": { | ||
EGVAR(main,colors_ace) setVariable ["main_compass", _value select [0, 3]]; | ||
EGVAR(main,colors_ace) setVariable ["main", [(_value select 0) * 255,(_value select 1) * 255,(_value select 2) * 255] call EFUNC(main,toHex)]; | ||
}; | ||
case "ace_nametags_nametagColorRed": { | ||
EGVAR(main,colors_ace) setVariable ["red_compass", _value select [0, 3]]; | ||
EGVAR(main,colors_ace) setVariable ["red", [(_value select 0) * 255,(_value select 1) * 255,(_value select 2) * 255] call EFUNC(main,toHex)]; | ||
}; | ||
case "ace_nametags_nametagColorGreen": { | ||
EGVAR(main,colors_ace) setVariable ["green_compass", _value select [0, 3]]; | ||
EGVAR(main,colors_ace) setVariable ["green", [(_value select 0) * 255,(_value select 1) * 255,(_value select 2) * 255] call EFUNC(main,toHex)]; | ||
}; | ||
case "ace_nametags_nametagColorBlue": { | ||
EGVAR(main,colors_ace) setVariable ["blue_compass", _value select [0, 3]]; | ||
EGVAR(main,colors_ace) setVariable ["blue", [(_value select 0) * 255,(_value select 1) * 255,(_value select 2) * 255] call EFUNC(main,toHex)]; | ||
}; | ||
case "ace_nametags_nametagColorYellow": { | ||
EGVAR(main,colors_ace) setVariable ["yellow_compass", _value select [0, 3]]; | ||
EGVAR(main,colors_ace) setVariable ["yellow", [(_value select 0) * 255,(_value select 1) * 255,(_value select 2) * 255] call EFUNC(main,toHex)]; | ||
}; | ||
default { }; | ||
}; | ||
}] call CBA_fnc_addEventHandler; | ||
}; | ||
|
||
// keybind to toggle whole UI | ||
[CBA_SETTINGS_CAT, "diwako_dui_button_toggle_ui", localize "STR_dui_key_toggle", { | ||
GVAR(toggled_off) = !GVAR(toggled_off); | ||
[QGVAR(hudToggled), [GVAR(toggled_off)]] call CBA_fnc_localEvent; | ||
true | ||
}, | ||
{false}, | ||
[DIK_MULTIPLY, [false, true, false]], false] call CBA_fnc_addKeybind; | ||
|
||
ADDON = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#include "script_component.hpp" | ||
#include "XEH_PREP.hpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include "script_component.hpp" | ||
class CfgPatches { | ||
class ADDON { | ||
name = COMPONENT; | ||
units[] = {}; | ||
weapons[] = {}; | ||
requiredVersion = REQUIRED_VERSION; | ||
requiredAddons[] = {"cba_main"}; | ||
author[] = {"diwako"}; | ||
authorUrl = "https://github.com/diwako/diwako_dui"; | ||
license = "https://www.bohemia.net/community/licenses/arma-public-license-share-alike"; | ||
VERSION_CONFIG; | ||
}; | ||
}; | ||
|
||
#include "CfgEventHandlers.hpp" | ||
#include "CfgColorStyles.hpp" | ||
#include "CfgIconStyles.hpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include "script_component.hpp" | ||
params ["_player"]; | ||
!( | ||
visibleMap || | ||
{GVAR(toggled_off) || | ||
{!alive _player || | ||
{(_player getVariable ["ace_spectator_isSet", false]) || | ||
{dialog || | ||
{diwako_dui_ace_hide_interaction && {missionNamespace getVariable ["ace_interact_menu_openedMenuType",-1] > -1} || | ||
{!isnull (missionNamespace getVariable ["ace_arsenal_camera", objNull]) || | ||
{GVAR(inFeatureCamera)}}}}}}} | ||
) |
Oops, something went wrong.