initial files

This commit is contained in:
Samuele Lorefice
2025-05-24 16:17:33 +02:00
commit 9e023649ac
477 changed files with 118566 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
// Permettre aux joueurs de modifier leur distance de vue
GREUH_allow_viewdistance = true;
// Permettre aux joueurs de modifier la qualité de l environnement
GREUH_allow_worldquality = true;
// Permettre aux joueurs de modifier leurs escouades
GREUH_allow_customsquads = true;

View File

@@ -0,0 +1,6 @@
_idact = -1;
while { true } do {
waitUntil{ sleep 0.3; alive player };
_idact = player addAction ["<t color='#FF8000'>" + localize "STR_GREUH_EXTENDED_OPTIONS_ACTIONMENU" + "</t>","GREUH\scripts\GREUH_dialog.sqf","",-1000,false,true];
waitUntil{ sleep 0.3; !alive player};
};

View File

@@ -0,0 +1,49 @@
if (isDedicated) then { exit };
waitUntil { alive player };
desiredviewdistance_inf = viewDistance;
desiredviewdistance_veh = viewDistance;
desiredviewdistance_obj = 75;
desired_fps = 0;
show_teammates = false;
show_nametags = false;
show_platoon = false;
desired_vehvolume = 100;
greuh_options_profile = profileNamespace getVariable "GREUH_OPTIONS_PROFILE";
if ( !isNil "greuh_options_profile" ) then {
desiredviewdistance_inf = greuh_options_profile select 0;
desiredviewdistance_veh = greuh_options_profile select 1;
desiredviewdistance_obj = greuh_options_profile select 2;
show_teammates = greuh_options_profile select 3;
show_platoon = greuh_options_profile select 4;
if ( count greuh_options_profile > 5 ) then {
desired_vehvolume = greuh_options_profile select 5;
if ( isNil "desired_vehvolume" ) then {
desired_vehvolume = 100;
};
};
if ( count greuh_options_profile > 6 ) then {
show_nametags = greuh_options_profile select 6;
if ( isNil "show_nametags" ) then {
show_nametags = false;
};
};
if ( count greuh_options_profile > 7) then {
desired_fps = greuh_options_profile select 7;
if ( isNil "desired_fps" ) then {
desired_fps = 0;
};
};
};
[] call compile preprocessFileLineNumbers "GREUH\GREUH_config.sqf";
[] call compile preprocessFileLineNumbers "GREUH\scripts\GREUH_version.sqf";
execVM "GREUH\scripts\GREUH_actionmanager.sqf";
if ( GREUH_allow_mapmarkers ) then { execVM "GREUH\scripts\GREUH_playermarkers.sqf"; };
if ( GREUH_allow_platoonview ) then { execVM "GREUH\scripts\GREUH_platoonoverlay.sqf"; };
if ( GREUH_allow_platoonview ) then { execVM "GREUH\scripts\GREUH_cache_units.sqf"; };
if ( GREUH_allow_customsquads ) then { execVM "GREUH\scripts\GREUH_squadmanagement.sqf"; };
if ( GREUH_allow_viewdistance ) then { execVM "GREUH\scripts\GREUH_view_distance_management.sqf"; };
execVM "GREUH\scripts\GREUH_dynamic_view_distance.sqf";

View File

@@ -0,0 +1,17 @@
private [ "_scanned_units", "_scanned_groups" ];
waitUntil { !isNil "nametags_distance" };
while { true } do {
_scanned_units = [ allUnits, { ( alive _x ) && ( side group _x == GRLIB_side_friendly ) } ] call BIS_fnc_conditionalSelect;
_scanned_units = [ _scanned_units, { (_x == leader group player ) || (_x distance player < nametags_distance) } ] call BIS_fnc_conditionalSelect;
_scanned_units = [ _scanned_units, { (_x != player) && (( vehicle player ) != ( vehicle _x )) } ] call BIS_fnc_conditionalSelect;
GRLIB_nametag_units = [] + _scanned_units;
_scanned_groups = [ allGroups, { ( side _x == side player ) && ( isplayer (leader _x) ) } ] call BIS_fnc_conditionalSelect;
_scanned_groups = [ _scanned_groups, { ( count units _x > 1 ) || ( count units _x == 1 && leader _x != player ) } ] call BIS_fnc_conditionalSelect;
GRLIB_overlay_groups = [] + _scanned_groups;
sleep 1;
};

View File

@@ -0,0 +1,115 @@
_squadcontrols = [511,512,513,514,515,521,522,523,524,525,526,527];
_platooncontrols = [611,612,613,614];
_viewcontrols = [712,713,714,722,723,724,732,733,734];
_worldcontrols = [812,813,814,815];
_markerscontrols = [911,912,913,914];
_allbuttons = [6677,511,512,513,514,613,614,812,813,814,815,913,914,712,722,732];
_rename_controls = [521,522,523,524,525,526,527];
_leader_controls = [561,562,563,564,565,566,567];
renaming = false;
choosingleader = false;
_dialog = createDialog "GREUH_Menu";
waitUntil { dialog };
if ( GREUH_allow_customsquads ) then {
ctrlShow [501, false];
} else {
ctrlShow [501, true];
{ ctrlShow [_x, false] } foreach _squadcontrols;
};
if ( GREUH_allow_platoonview ) then {
ctrlShow [601, false];
} else {
ctrlShow [601, true];
{ ctrlShow [_x, false] } foreach _platooncontrols;
};
if ( GREUH_allow_viewdistance ) then {
ctrlShow [701, false];
sliderSetRange [712, 1000, 10000];
sliderSetPosition [712, desiredviewdistance_inf];
sliderSetSpeed [712, 500, 500];
sliderSetRange [722, 1000, 10000];
sliderSetPosition [722, desiredviewdistance_veh];
sliderSetSpeed [722, 500, 500];
sliderSetRange [732, 30, 100];
sliderSetPosition [732, desiredviewdistance_obj];
sliderSetSpeed [732, 5, 5];
ctrlSetText [ 960, format ["%1",desired_fps] ];
} else {
ctrlShow [701, true];
{ ctrlShow [_x, false] } foreach _viewcontrols;
};
if ( GREUH_allow_worldquality ) then {
ctrlShow [801, false];
} else {
ctrlShow [801, true];
{ ctrlShow [_x, false] } foreach _worldcontrols;
};
if ( GREUH_allow_mapmarkers ) then {
ctrlShow [901, false];
} else {
ctrlShow [901, true];
{ ctrlShow [_x, false] } foreach _markerscontrols;
};
if ( true ) then {
sliderSetSpeed [ 1102, 5, 5];
sliderSetRange [ 1102, 0, 100];
sliderSetPosition [ 1102, desired_vehvolume ];
};
while { dialog && alive player } do {
if ( renaming ) then {
{ ctrlEnable [_x, false] } foreach (_allbuttons);
{ ctrlShow [_x, true] } foreach _rename_controls;
{ ctrlShow [_x, false] } foreach _leader_controls;
} else {
if ( choosingleader ) then {
{ ctrlEnable [_x, false] } foreach _allbuttons;
{ ctrlShow [_x, false] } foreach _rename_controls;
{ ctrlShow [_x, true] } foreach _leader_controls;
} else {
{ ctrlEnable [_x, true] } foreach _allbuttons;
{ ctrlShow [_x, false] } foreach (_rename_controls + _leader_controls);
ctrlEnable [513,(leader (group player) == player)];
ctrlEnable [514,(leader (group player) == player)];
};
};
if ( GREUH_allow_platoonview ) then { ctrlShow [612, show_platoon]; };
if ( GREUH_allow_mapmarkers ) then { ctrlShow [912, show_teammates]; };
ctrlShow [ 962, show_nametags ];
if ( GREUH_allow_customsquads ) then {
lbClear 515;
{
_brakets = "";
if ( _x == group player ) then { _brakets = ">> "; };
lbAdd [515, format [ "%4%1 - %2 (%3)",groupId _x, name leader _x, count units _x,_brakets ]];
} foreach groups_list;
};
if ( GREUH_allow_viewdistance ) then {
ctrlSetText [713, format [ '%1m' ,round desiredviewdistance_inf]];
ctrlSetText [723, format [ '%1m' ,round desiredviewdistance_veh]];
ctrlSetText [733, format [ '%1m' ,round ((desiredviewdistance_obj / 100.0) * desiredviewdistance_inf) ]];
};
ctrlSetText [ 1103, format [ "%1%2", round (desired_vehvolume), "%" ] ];
desired_fps = parseNumber (ctrlText 960);
uiSleep 0.2;
};
if (!alive player) then { closeDialog 0 };
greuh_options_profile = [ desiredviewdistance_inf, desiredviewdistance_veh, desiredviewdistance_obj, show_teammates, show_platoon, desired_vehvolume, show_nametags, desired_fps ];
profileNamespace setVariable [ "GREUH_OPTIONS_PROFILE",greuh_options_profile ];
saveProfileNamespace;

View File

@@ -0,0 +1,44 @@
GREUH_view_distance_factor = 1.0;
GREUH_force_adjust_view_distance = false;
private _min_view_distance_factor = 0.25;
private _base_increment = 0.075;
private _corrected_increment = -1;
private _consecutive_before_adjust = 3;
private _consecutive_fps_too_low = 0;
private _consecutive_fps_too_fast = 0;
private _smoothing_margin = 0.1;
while { true } do {
_corrected_increment = _base_increment * GREUH_view_distance_factor;
if ( (diag_fps * ( 1 - _smoothing_margin )) < desired_fps ) then {
_consecutive_fps_too_low = _consecutive_fps_too_low + 1;
_consecutive_fps_too_fast = 0;
};
if ( (diag_fps * ( 1 + _smoothing_margin )) > desired_fps ) then {
_consecutive_fps_too_fast = _consecutive_fps_too_fast + 1;
_consecutive_fps_too_low = 0;
};
if ( GREUH_view_distance_factor > _min_view_distance_factor && _consecutive_fps_too_low >= _consecutive_before_adjust ) then {
_consecutive_fps_too_low = 0;
GREUH_view_distance_factor = GREUH_view_distance_factor - _corrected_increment;
if ( GREUH_view_distance_factor < _min_view_distance_factor ) then {
GREUH_view_distance_factor = _min_view_distance_factor;
};
GREUH_force_adjust_view_distance = true;
};
if ( GREUH_view_distance_factor < 1.0 && _consecutive_fps_too_fast >= _consecutive_before_adjust ) then {
_consecutive_fps_too_fast = 0;
GREUH_view_distance_factor = GREUH_view_distance_factor + _corrected_increment;
if ( GREUH_view_distance_factor > 1.0 ) then {
GREUH_view_distance_factor = 1.0;
};
GREUH_force_adjust_view_distance = true;
};
sleep 0.75;
};

View File

@@ -0,0 +1,139 @@
platoon_icon1 = "\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa";
platoon_icon2 = "\A3\ui_f\data\igui\cfg\cursors\board_ca.paa";
soldier_icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\private_gs.paa";
formation_leader_icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\corporal_gs.paa";
commander_icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\general_gs.paa";
group_leader_icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa";
wounded_icon = "\A3\ui_f\data\map\vehicleicons\pictureHeal_ca.paa";
nametags_distance = 32.0;
private [ "_groups", "_unitstocount", "_totalx", "_totaly", "_totalz", "_alpha", "_textalpha", "_size", "_screenpos", "_grouppos", "_distlabel", "_dist", "_nextunit", "_color", "_drawicon", "_displayname", "_iconpos" ];
waitUntil { !isNil "GRLIB_overlay_groups" };
waitUntil { !isNil "GRLIB_nametag_units" };
["platoon_overlay", "onEachFrame", {
if ( show_platoon ) then {
{
if ( count units _x > 0 ) then {
_totalx = 0;
_totaly = 0;
_totalz = 0;
_grouppos = [];
_unitstocount = [];
{
if ( _x distance (leader group _x) < 300) then {
_unitstocount pushback _x;
_totalx = _totalx + (getpos _x select 0);
_totaly = _totaly + (getpos _x select 1);
_totalz = _totalz + (getpos _x select 2);
};
} foreach units _x;
if ( count _unitstocount > 0 ) then {
_totalx = _totalx / (count _unitstocount);
_totaly = _totaly / (count _unitstocount);
_totalz = _totalz / (count _unitstocount);
};
if ( _totalz > 2.1 ) then {
_grouppos = [_totalx, _totaly, _totalz + 10];
} else {
_grouppos = [_totalx, _totaly, 2.1];
};
_alpha = 0.5;
_textalpha = 0;
_size = 0.8;
_screenpos = worldToScreen _grouppos;
if (count _screenpos != 0) then {
if ( (abs (((worldToScreen _grouppos) select 0) - 0.5) < 0.06) && (abs (((worldToScreen _grouppos) select 1) - 0.5) < 0.08)) then {
_alpha = 1;
_textalpha = 1;
_size = 1;
};
};
_dist = player distance _grouppos;
_distlabel = "";
if ( _dist > 200 ) then {
if ( _dist >= 1000 ) then {
_distlabel = format [" (%1km)", floor (_dist / 1000)];
} else {
_distlabel = format [" (%1m)", (floor (_dist / 100)) * 100];
};
};
_color = [0.8,1,0.2,_alpha];
if ( _x == group player) then { _color = [1,0.9,0.3,_alpha] };
drawIcon3D [platoon_icon1, _color, _grouppos, _size / 2, _size / 2,0, format ["%1 - %2%3",groupID _x, name (leader _x),_distlabel], 2, 0.03 * _textalpha, "puristaMedium"];
drawIcon3D [platoon_icon2, _color, _grouppos, _size, _size,0, "", 2, 0.04, "puristaMedium"];
};
} foreach GRLIB_overlay_groups;
};
if ( show_nametags ) then {
{
_nextunit = _x;
private _local_nametags_distance = nametags_distance;
if( _nextunit == leader group player ) then {
_local_nametags_distance = nametags_distance * 3;
};
_alpha = 1;
if ( _nextunit distance player > (_local_nametags_distance / 2) ) then {
_alpha = 1 - ((((_nextunit distance player) - (_local_nametags_distance / 2)) * 2) / _local_nametags_distance);
};
_color = [];
if ( _nextunit in (units group player)) then {
switch ( _nextunit getVariable [ "GRLIB_squad_color", "MAIN" ] ) do {
case "BLUE" : { _color = [0.15,0.35,1.0,_alpha] };
case "RED" : { _color = [0.8,0,0,_alpha] };
case "YELLOW" : { _color = [0.85,0.85,0,_alpha] };
case "GREEN" : { _color = [0,0.75,0,_alpha] };
default { _color = [0.9,0.9,0.9,_alpha] };
};
} else {
_color = [0.92,0.7,0.25,_alpha];
};
_drawicon = soldier_icon;
if ( _nextunit getVariable [ "FAR_isUnconscious", 0 ] == 1 ) then {
_drawicon = wounded_icon;
} else {
if ( _nextunit == [] call KPLIB_fnc_getCommander ) then {
_drawicon = commander_icon;
} else {
if ( _nextunit == (leader group _nextunit) && (count (units group _nextunit) > 1 ) ) then {
_drawicon = group_leader_icon;
} else {
if ( ( isFormationLeader _nextunit ) && ( count formationMembers _nextunit > 1 ) ) then {
_drawicon = formation_leader_icon;
};
};
};
};
_displayname = "";
if(count (squadParams _nextunit) != 0) then {
_displayname = "[" + ((squadParams _nextunit select 0) select 0) + "] ";
};
_displayname = _displayname + ( name _nextunit );
_height = 2 + ((player distance _nextunit) / (0.75 * _local_nametags_distance));
_iconpos = [ getPosATL _nextunit select 0, getPosATL _nextunit select 1, (getPosATL _nextunit select 2) + _height ];
drawIcon3D [ _drawicon, _color, _iconpos , 0.75, 0.75,0, format [ "%1", _displayname] , 2, 0.032, "puristaMedium"];
} foreach GRLIB_nametag_units;
};
}] call BIS_fnc_addStackedEventHandler;

View File

@@ -0,0 +1,190 @@
private _marked_players = [];
private _marked_vehicles = [];
private _marked_squadmates = [];
private _marker_objs = [];
private _color = "";
private _ticks = 0;
private _cfg = configFile >> "cfgVehicles";
if ( side player == GRLIB_side_friendly ) then {
_color = GRLIB_color_friendly;
} else {
_color = GRLIB_color_enemy;
};
while { true } do {
waitUntil { sleep 0.2; show_teammates };
while { show_teammates } do {
if ( _ticks == 0 ) then {
{
private _nextmarker = _x select 0;
private _nextobj = _x select 1;
if ( (isNull _nextobj) || !(alive _nextobj) ) then {
deleteMarkerLocal _nextmarker;
};
} foreach _marker_objs;
private _playableunits = [];
if ( count playableUnits > 0 ) then {
_playableunits = [ playableUnits, { (side (group _x)) == (side (group player)) } ] call BIS_fnc_conditionalSelect;
} else {
_playableunits = [ player ];
};
{
if ( vehicle _x == _x ) then {
_marked_players pushbackUnique _x;
} else {
_marked_vehicles pushbackUnique (vehicle _x);
};
} foreach _playableunits;
{
if ( alive _x && !(isPlayer _x) ) then {
if ( vehicle _x == _x ) then {
_marked_squadmates pushbackUnique _x;
} else {
_marked_vehicles pushbackUnique (vehicle _x);
};
};
} foreach (units (group player));
private _stuff_to_unmark = [];
{
if ( (vehicle _x != _x) || !(alive _x) ) then {
_stuff_to_unmark pushback _x;
_marked_players = _marked_players - [_x];
};
} foreach _marked_players;
{
if ( (vehicle _x != _x) || !(alive _x) ) then {
_stuff_to_unmark pushback _x;
_marked_squadmates = _marked_squadmates - [_x];
};
} foreach _marked_squadmates;
{
if ( (count (crew _x) == 0) || !(alive _x) ) then {
_stuff_to_unmark pushback _x;
_marked_vehicles = _marked_vehicles - [_x];
};
} foreach _marked_vehicles;
{
private _nextmarker = _x getVariable [ "spotmarker", "" ];
if ( _nextmarker != "" ) then {
deleteMarkerLocal _nextmarker;
_x setVariable [ "spotmarker", "" ];
};
} foreach _stuff_to_unmark;
{
private _nextplayer = _x;
private _marker = _nextplayer getVariable [ "spotmarker", "" ];
if ( _marker == "" ) then {
_marker = ( createMarkerLocal [ format [ "playermarker%1", (allUnits find _x) * (time % 1000) * (floor (random 100)) ], getpos _nextplayer ] );
_marker_objs pushback [ _marker, _nextplayer ];
_nextplayer setVariable [ "spotmarker", _marker ];
private _playername = "";
if( count (squadParams _nextplayer) != 0 ) then {
_playername = "[" + ((squadParams _nextplayer select 0) select 0) + "] ";
};
_playername = _playername + (name _nextplayer);
_marker setMarkerTextLocal _playername;
_marker setMarkerSizeLocal [ 0.75, 0.75 ];
_marker setMarkerColorLocal _color;
};
private _markertype = "mil_start";
if ( _nextplayer getVariable [ "FAR_isUnconscious", 0 ] == 1 ) then {
_markertype = "MinefieldAP";
};
_marker setMarkerTypeLocal _markertype;
} foreach _marked_players;
{
private _nextai = _x;
private _marker = _nextai getVariable [ "spotmarker", "" ];
if ( _marker == "" ) then {
_marker = ( createMarkerLocal [ format [ "squadaimarker%1", (allUnits find _x) * (time % 1000) * (floor (random 10000)) ], getpos _nextai ] );
_marker_objs pushback [ _marker, _nextai ];
_nextai setVariable [ "spotmarker", _marker ];
_marker setMarkerTypeLocal "mil_triangle";
_marker setMarkerSizeLocal [ 0.6, 0.6 ];
_marker setMarkerColorLocal _color;
};
_marker setMarkerTextLocal format [ "%1", ( [ _nextai ] call KPLIB_fnc_getUnitPositionId )];
} foreach _marked_squadmates;
{
private _nextvehicle = _x;
private _marker = _nextvehicle getVariable [ "spotmarker", "" ];
if ( _marker == "" ) then {
_marker = ( createMarkerLocal [ format [ "vehiclemarker%1", (vehicles find _x) * (time % 1000) * (floor (random 10000)) ], getpos _nextvehicle ] );
_marker_objs pushback [ _marker, _nextvehicle ];
_nextvehicle setVariable [ "spotmarker", _marker ];
_marker setMarkerTypeLocal "mil_arrow2";
_marker setMarkerSizeLocal [0.75,0.75];
_marker setMarkerColorLocal _color;
};
private _datcrew = crew _nextvehicle;
private _vehiclename = "";
{
if (isPlayer _x) then {
_vehiclename = _vehiclename + (name _x);
} else {
_vehiclename = _vehiclename + ( format [ "%1", [ _x ] call KPLIB_fnc_getUnitPositionId ] );
};
if( (_datcrew find _x) != ((count _datcrew) - 1) ) then {
_vehiclename = _vehiclename + ",";
};
_vehiclename = _vehiclename + " ";
} foreach _datcrew;
_vehiclename = _vehiclename + "(" + getText (_cfg >> typeOf _nextvehicle >> "displayName") + ")";
_marker setMarkerTextLocal _vehiclename;
} foreach _marked_vehicles;
};
private _markerunits = [] + _marked_players + _marked_squadmates + _marked_vehicles;
{
private _nextunit = _x;
private _marker = _nextunit getVariable [ "spotmarker", "" ];
if ( _marker != "" ) then {
_marker setMarkerPosLocal (getPos _nextunit);
private _mrkdir = getDir _nextunit;
if ( isPlayer _nextunit ) then {
if ( _nextunit getVariable [ "FAR_isUnconscious", 0 ] == 1 ) then {
_mrkdir = 0;
};
};
_marker setMarkerDirLocal _mrkdir;
};
} foreach _markerunits;
_ticks = _ticks + 1;
if ( _ticks > 10 ) then {
_ticks = 0;
};
sleep 0.1;
};
{
private _nextunit = _x;
private _marker = _nextunit getVariable [ "spotmarker", "" ];
if ( _marker != "" ) then {
deleteMarkerLocal _marker;
_nextunit setVariable [ "spotmarker", "" ];
};
} forEach (allUnits + vehicles);
};

View File

@@ -0,0 +1,105 @@
groups_list = [];
squadaction = "";
squadname = "";
if (isNil "global_group_ids") then { global_group_ids = [] };
if (isNil "global_groups_renamed") then { global_groups_renamed = [] };
global_new_leader = [];
while { true } do {
if ( squadaction != "" ) then {
_grp = grpNull;
switch (squadaction) do {
case "create" : {
_grp = createGroup [(side player), true];
[player] join _grp;
hint "New squad created";
};
case "join" : {
if(lbCurSel 515 != -1) then { _grp = groups_list select (lbCurSel 515); };
if (!(isNull _grp) && (_grp != group player)) then {
[player] join _grp;
hint "Squad joined";
};
};
case "rename" : {
if ( leader group player == player ) then {
renaming = true;
ctrlSetText [527, (groupid (group player))];
waitUntil { ((squadaction == "") || (squadname != "") || !(dialog) || !(alive player)) };
if ( alive player && dialog && ( squadname != "" )) then {
if ( (group player) in global_groups_renamed ) then {
global_group_ids set [global_groups_renamed find (group player),squadname];
} else {
global_group_ids = global_group_ids + [squadname];
global_groups_renamed = global_groups_renamed + [group player];
};
publicVariable "global_group_ids";
publicVariable "global_groups_renamed";
};
squadname = "";
renaming = false;
} else {
hint "Sorry, only the squad leader can rename their squad.";
};
};
case "leader" : {
if ( leader group player == player ) then {
choosingleader = true;
choose_squadleader = -10;
_player_group_filtered = [];
{
if ( isPlayer _x ) then {
_player_group_filtered = _player_group_filtered + [_x];
};
} foreach (units group player);
lbClear 567;
{
lbAdd [567, name _x ];
} foreach _player_group_filtered;
_count_units_grp_player = count (units group player);
waitUntil { ((squadaction == "") || (choose_squadleader >= 0) || !(dialog) || !(alive player) || (_count_units_grp_player != count (units group player))) };
if ( alive player && dialog && ( choose_squadleader >= 0 )) then {
global_new_leader = [group player, _player_group_filtered select choose_squadleader];
publicVariable "global_new_leader";
};
choose_squadleader = -10;
choosingleader = false;
} else {
hint "Sorry, only the squad leader can choose a new leader.";
};
};
};
squadaction = "";
};
{ if ( (isplayer leader _x) && (side _x == side player) && !(_x in groups_list)) then { groups_list = groups_list + [_x] }; } foreach allGroups;
{ if (!(_x in allGroups) || (!isplayer leader _x)) then { groups_list = groups_list - [_x] }; } foreach groups_list;
{
if (count global_groups_renamed != 0) then {
if (_x in global_groups_renamed) then {
if (groupid _x != global_group_ids select (global_groups_renamed find _x)) then {
_x setgroupid [(global_group_ids select (global_groups_renamed find _x))];
};
};
};
} foreach groups_list;
if ( count global_new_leader != 0 ) then {
if ( group player == global_new_leader select 0 ) then {
(global_new_leader select 0) selectLeader (global_new_leader select 1);
hint format ["%1 is your new squad leader.",name (global_new_leader select 1)];
global_new_leader = [];
};
};
sleep 0.5;
};

View File

@@ -0,0 +1,4 @@
GREUH_version = 1.2;
player createDiarySubject ["GREUH Options","GREUH Options"];
player createDiaryRecord ["GREUH Options", ["GREUH Options", format ["<font color='#ff8000'>GREUH Extended Options</font><br/>arma.greuh.org<br/><br/><font color='#ff8000'>Scripted by [GREUH] Zbug</font><br/>Version %1",GREUH_version]]];

View File

@@ -0,0 +1,58 @@
private _olddistance_inf = -1;
private _olddistance_veh = -1;
private _olddistance_obj = -1;
private _olddesiredvolume = -1;
private _was_vehicle = false;
private _min_view_distance = 300;
private _desired_inf = -1;
private _desired_veh = -1;
private _desired_obj = -1;
waitUntil { !isNil "GREUH_view_distance_factor" };
waitUntil { !isNil "GREUH_force_adjust_view_distance" };
while { true } do {
waitUntil { sleep 0.3;
(round _olddistance_inf != round desiredviewdistance_inf)
|| (round _olddistance_veh != round desiredviewdistance_veh)
|| (round _olddistance_obj != round desiredviewdistance_obj)
|| ( (( vehicle player == player ) && _was_vehicle)
|| (( vehicle player != player ) && !_was_vehicle) )
|| !(alive player)
|| ( round _olddesiredvolume != round desired_vehvolume)
|| GREUH_force_adjust_view_distance };
waitUntil { alive player };
GREUH_force_adjust_view_distance = false;
_olddistance_inf = round desiredviewdistance_inf;
_olddistance_veh = round desiredviewdistance_veh;
_olddistance_obj = round desiredviewdistance_obj;
_olddesiredvolume = desired_vehvolume;
_was_vehicle = ( vehicle player != player );
if ( _was_vehicle ) then {
_desired_veh = (round desiredviewdistance_veh) * GREUH_view_distance_factor;
if ( _desired_veh < _min_view_distance ) then {
_desired_veh = _min_view_distance;
};
setViewDistance _desired_veh;
1 fadeSound ( desired_vehvolume / 100.0 );
} else {
_desired_inf = (round desiredviewdistance_inf) * GREUH_view_distance_factor;
if ( _desired_inf < _min_view_distance ) then {
_desired_inf = _min_view_distance;
};
setViewDistance _desired_inf;
1 fadeSound 1;
};
_desired_obj = (((desiredviewdistance_obj / 100.0) * desiredviewdistance_inf) * GREUH_view_distance_factor);
if ( _desired_obj < _min_view_distance) then {
_desired_obj = _min_view_distance;
};
setObjectViewDistance _desired_obj;
};

View File

@@ -0,0 +1,889 @@
// Control types
#define CT_STATIC 0
#define CT_BUTTON 1
#define CT_EDIT 2
#define CT_SLIDER 3
#define CT_COMBO 4
#define CT_LISTBOX 5
#define CT_TOOLBOX 6
#define CT_CHECKBOXES 7
#define CT_PROGRESS 8
#define CT_HTML 9
#define CT_STATIC_SKEW 10
#define CT_ACTIVETEXT 11
#define CT_TREE 12
#define CT_STRUCTURED_TEXT 13
#define CT_CONTEXT_MENU 14
#define CT_CONTROLS_GROUP 15
#define CT_SHORTCUT_BUTTON 16 // Arma 2 - textured button
#define CT_XKEYDESC 40
#define CT_XBUTTON 41
#define CT_XLISTBOX 42
#define CT_XSLIDER 43
#define CT_XCOMBO 44
#define CT_ANIMATED_TEXTURE 45
#define CT_OBJECT 80
#define CT_OBJECT_ZOOM 81
#define CT_OBJECT_CONTAINER 82
#define CT_OBJECT_CONT_ANIM 83
#define CT_LINEBREAK 98
#define CT_USER 99
#define CT_MAP 100
#define CT_MAP_MAIN 101
#define CT_List_N_Box 102 // Arma 2 - N columns list box
// Static styles
#define ST_POS 0x0F
#define ST_HPOS 0x03
#define ST_VPOS 0x0C
#define ST_LEFT 0x00
#define ST_RIGHT 0x01
#define ST_CENTER 0x02
#define ST_DOWN 0x04
#define ST_UP 0x08
#define ST_VCENTER 0x0c
#define CT_MAP_MAIN 101
#define ST_PICTURE 48
#define ST_TYPE 0xF0
#define ST_SINGLE 0
#define ST_MULTI 16
#define ST_TITLE_BAR 32
#define ST_PICTURE 48
#define ST_FRAME 64
#define ST_BACKGROUND 80
#define ST_GROUP_BOX 96
#define ST_GROUP_BOX2 112
#define ST_HUD_BACKGROUND 128
#define ST_TILE_PICTURE 144
#define ST_WITH_RECT 160
#define ST_LINE 176
#define ST_SHADOW 0x100
#define ST_NO_RECT 0x200 // this style works for CT_STATIC in conjunction with ST_MULTI
#define ST_KEEP_ASPECT_RATIO 0x800
#define ST_TITLE ST_TITLE_BAR + ST_CENTER
// Slider styles
#define SL_DIR 0x400
#define SL_VERT 0
#define SL_HORZ 0x400
#define SL_TEXTURES 0x10
// Listbox styles
#define LB_TEXTURES 0x10
#define LB_MULTI 0x20
#define FontM "puristaMedium"
#define BORDERSIZE 0.01
#define BASE_Y 0.075
class RscListBox {
idc = -1;
type = 5;
style = 0 + 0x10;
font = FontM;
sizeEx = 0.018 * safezoneH;
rowHeight = 0.02 * safezoneH;
color[] = COLOR_LIGHTGRAY;
colorText[] = COLOR_WHITE;
colorScrollbar[] = COLOR_BRIGHTGREEN;
colorSelect[] = COLOR_BRIGHTGREEN;
colorSelect2[] = COLOR_BRIGHTGREEN;
colorSelectBackground[] = COLOR_LIGHTGRAY;
colorSelectBackground2[] = COLOR_LIGHTGRAY;
colorActive[] = COLOR_BRIGHTGREEN;
colorDisabled[] = COLOR_GREEN;
columns[] = {0.1, 0.7, 0.1, 0.1};
period = 0;
colorBackground[] = COLOR_GREEN;
maxHistoryDelay = 1.0;
autoScrollSpeed = -1;
autoScrollDelay = 5;
autoScrollRewind = 0;
soundSelect[] = {"\a3\Ui_f\data\Sound\CfgIngameUI\hintExpand", 0.09, 1};
shadow = 2;
class ListScrollBar {
color[] = {1, 1, 1, 0.6};
colorActive[] = {1, 1, 1, 1};
colorDisabled[] = {1, 1, 1, 0.3};
thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa";
};
};
class RscCombo {
idc = -1;
type = 4;
style = 1;
x = 0;
y = 0;
w = 0.3;
h = 0.035;
colorSelect[] = COLOR_BRIGHTGREEN;
colorText[] = COLOR_WHITE;
colorBackground[] = COLOR_GREEN;
colorSelectBackground[] = COLOR_LIGHTGRAY;
colorScrollbar[] = COLOR_BRIGHTGREEN;
arrowEmpty ="\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
wholeHeight = 0.45;
color[] = COLOR_LIGHTGRAY;
colorActive[] = COLOR_BRIGHTGREEN;
colorDisabled[] = COLOR_GREEN;
font = FontM;
sizeEx = 0.031;
soundSelect[] = {"\a3\Ui_f\data\Sound\CfgIngameUI\hintExpand", 0.09, 1};
soundExpand[] = {"\a3\Ui_f\data\Sound\CfgIngameUI\hintExpand", 0.09, 1};
soundCollapse[] = {"\a3\Ui_f\data\Sound\CfgIngameUI\hintExpand", 0.09, 1};
maxHistoryDelay = 1.0;
class ComboScrollBar {
color[] = {1, 1, 1, 0.6};
colorActive[] = {1, 1, 1, 1};
colorDisabled[] = {1, 1, 1, 0.3};
thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa";
};
};
class GREUH_Menu {
idd = 5565;
movingEnable = false;
controlsBackground[] = {};
controls[] = {"GREUH_OuterBG", "BgPicture", "GREUH_OuterBG_F","GREUH_InnerBG", "GREUH_InnerBG_F","GREUH_Header","GREUH_SquadLabel",
"GREUH_SquadZone","GREUH_PlatoonLabel","GREUH_ViewDistance","GREUH_WorldQuality",
"GREUH_Close","GREUH_ButtonWorldVeryLow","GREUH_ButtonWorldLow","GREUH_ButtonWorldNormal","GREUH_ButtonWorldHigh",
"GREUH_Slider","GREUH_SliderVD","GREUH_LabelMarkers","GREUH_TeammatesYes","GREUH_TeammatesNo","GREUH_LabelPlatoon",
"GREUH_PlatoonYes","GREUH_PlatoonNo","GREUH_LabelPlatoonActive","GREUH_LabelMarkersActive","GREUH_SquadList",
"GREUH_ButtonJoin","GREUH_ButtonNew","GREUH_ButtonRename","GREUH_PlatoonZone","GREUH_ViewZone","GREUH_WorldZone",
"GREUH_MarkersZone","GREUH_Squad_OuterBG","GREUH_Squad_InnerBG","GREUH_Squad_OuterBG_F","GREUH_Squad_InnerBG_F",
"GREUH_ButtonName_Rename","GREUH_ButtonName_Abort","GREUH_Squad_TextField","GREUH_LabelVD","GREUH_ButtonLeader",
"GREUH_SliderVeh","GREUH_LabelVDVeh","GREUH_SliderVDVeh","GREUH_SliderObj","GREUH_LabelVDObj","GREUH_SliderVDObj",
"GREUH_Leader_OuterBG", "GREUH_Leader_InnerBG", "GREUH_Leader_OuterBG_F", "GREUH_Leader_InnerBG_F",
"GREUH_ButtonLeader_Choose", "GREUH_ButtonLeader_Abort", "GREUH_Squad_Combo", "GREUH_VehSound", "GREUH_SliderVehSound",
"GREUH_LabelVehSound","GREUH_LabelNametags","GREUH_NametagsActive","GREUH_NametagsYes","GREUH_NametagsNo",
"GREUH_FPSLabel","GREUH_FPSEdit"};
objects[] = {};
class BgPicture {
idc = -1;
type = CT_STATIC;
style = ST_PICTURE;
colorText[] = {0.5, 0.4, 0.25, 0.6};
colorBackground[] = {0, 0, 0, 1};
font = FontM;
sizeEx = 0.023;
moving = false;
text = "res\camo03.jpg";
x = (0.15 * safezoneW + safezoneX) - ( 2 * BORDERSIZE);
y = ((BASE_Y + 0.02) * safezoneH) + safezoneY - (3 * BORDERSIZE);
w = (0.2 * safezoneW) + (4 * BORDERSIZE);
h = (0.79 * safezoneH) + (6 * BORDERSIZE);
};
class GREUH_OuterBG {
idc = -1;
type = CT_STATIC;
style = ST_SINGLE;
colorText[] = COLOR_BLACK;
colorBackground[] = COLOR_BROWN;
font = FontM;
sizeEx = 0.023;
x = (0.15 * safezoneW + safezoneX) - ( 2 * BORDERSIZE);
y = ((BASE_Y + 0.02) * safezoneH) + safezoneY - (3 * BORDERSIZE);
w = (0.2 * safezoneW) + (4 * BORDERSIZE);
h = (0.79 * safezoneH) + (6 * BORDERSIZE);
text = "";
};
class GREUH_OuterBG_F : GREUH_OuterBG {
style = ST_FRAME;
};
class GREUH_InnerBG : GREUH_OuterBG {
colorBackground[] = COLOR_GREEN;
x = (0.15 * safezoneW + safezoneX) - ( BORDERSIZE);
y = ((BASE_Y + 0.07) * safezoneH) + safezoneY - (1.5 * BORDERSIZE);
w = 0.2 * safezoneW + (2 * BORDERSIZE);
h = 0.74 * safezoneH + (3 * BORDERSIZE);
};
class GREUH_InnerBG_F : GREUH_InnerBG {
style = ST_FRAME;
};
class GREUH_StdText {
idc = -1;
type = CT_STATIC;
style = ST_LEFT;
colorText[] = COLOR_WHITE;
colorBackground[] = COLOR_NOALPHA;
font = FontM;
sizeEx = 0.02 * safezoneH;
shadow = 2;
};
class GREUH_StdHeader : GREUH_StdText {
style = ST_CENTER;
sizeEx = 0.03 * safezoneH;
};
class GREUH_Header : GREUH_StdHeader {
x = 0.15 * safezoneW + safezoneX - (BORDERSIZE);
y = ((BASE_Y + 0.01) * safezoneH) + safezoneY;
w = 0.2 * safezoneW + ( 2 * BORDERSIZE);
h = 0.05 * safezoneH - (BORDERSIZE);
text = $STR_GREUH_EXTENDED_OPTIONS;
colorBackground[] = COLOR_LIGHTGRAY;
};
class GREUH_ButtonGeneric {
idc = -1;
type = CT_BUTTON;
style = ST_CENTER;
default = false;
font = FontM;
sizeEx = 0.018 * safezoneH;
colorText[] = { 0, 0, 0, 1 };
colorFocused[] = { 1, 1, 1, 1 };
colorDisabled[] = { 0.2, 0.2, 0.2, 0.7 };
colorBackground[] = { 0.8, 0.8, 0.8, 0.8 };
colorBackgroundDisabled[] = { 0.5, 0.5, 0.5, 0.5 };
colorBackgroundActive[] = { 1, 1, 1, 1 };
offsetX = 0.003;
offsetY = 0.003;
offsetPressedX = 0.002;
offsetPressedY = 0.002;
colorShadow[] = { 0, 0, 0, 0.5 };
colorBorder[] = { 0, 0, 0, 1 };
borderSize = 0;
soundEnter[] = { "", 0, 1 }; // no sound
soundPush[] = {"\a3\Ui_f\data\Sound\CfgIngameUI\hintExpand", 0.891251, 1};
soundClick[] = { "", 0, 1 }; // no sound
soundEscape[] = { "", 0, 1 }; // no sound
x = 0.15 * safezoneW + safezoneX;
w = 0.2 * safezoneW; h = 0.03 * safezoneH;
text = "";
action = "";
shadow = 1;
};
class GREUH_Label : GREUH_StdHeader {
x = 0.15 * safezoneW + safezoneX;
w = 0.2 * safezoneW;
h = 0.03 * safezoneH;
sizeEx = 0.02 * safezoneH;
colorBackground[] = COLOR_LIGHTGREEN;
};
class GREUH_DefaultZone : GREUH_StdText {
style = ST_CENTER;
x = 0.15 * safezoneW + safezoneX;
w = 0.2 * safezoneW;
colorText[] = COLOR_LIGHTGRAY;
colorBackground[] = COLOR_RED_DISABLED;
text = $STR_GREUH_DISABLED;
};
class GREUH_RegularLabel : GREUH_Label {
colorBackground[] = COLOR_NOALPHA;
style = ST_LEFT;
};
class GREUH_Close : GREUH_ButtonGeneric {
idc = 6677;
x = 0.335 * safezoneW + safezoneX;
w = 0.015 * safezoneW; h = 0.02 * safezoneH;
y = ((BASE_Y + 0.015) * safezoneH) + safezoneY;
text = "X";
action = "closeDialog 0";
};
class GREUH_SquadZone : GREUH_DefaultZone {
idc = 501;
y = ((BASE_Y + 0.11) * safezoneH) + safezoneY;
h = (0.2 * safezoneH) - (2 * BORDERSIZE);
};
class GREUH_SquadLabel : GREUH_Label {
idc = 510;
y = ((BASE_Y + 0.07) * safezoneH) + safezoneY;
text = $STR_GREUH_SQUAD_MANAGEMENT;
};
class GREUH_SquadList : RscListBox {
idc = 515;
x = 0.15 * safezoneW + safezoneX;
w = 0.15 * safezoneW;
y = ((BASE_Y + 0.11) * safezoneH) + safezoneY;
h = (0.2 * safezoneH) - (2 * BORDERSIZE);
};
class GREUH_ButtonSquad : GREUH_ButtonGeneric {
x = 0.3 * safezoneW + safezoneX + BORDERSIZE;
w = ((0.2 * safezoneW) / 4) - BORDERSIZE;
};
class GREUH_ButtonJoin : GREUH_ButtonSquad {
idc = 511;
text = $STR_GREUH_JOIN;
action = "squadaction = 'join';";
y = ((BASE_Y + 0.11) * safezoneH) + safezoneY;
};
class GREUH_ButtonNew : GREUH_ButtonSquad {
idc = 512;
text = $STR_GREUH_CREATE;
action = "squadaction = 'create';";
y = ((BASE_Y + 0.15) * safezoneH) + safezoneY;
};
class GREUH_ButtonRename : GREUH_ButtonSquad {
idc = 513;
text = $STR_GREUH_RENAME;
action = "squadaction = 'rename';";
y = ((BASE_Y + 0.19) * safezoneH) + safezoneY;
};
class GREUH_ButtonLeader : GREUH_ButtonSquad {
idc = 514;
text = $STR_GREUH_LEADER;
action = "squadaction = 'leader';";
y = ((BASE_Y + 0.23) * safezoneH) + safezoneY;
};
class GREUH_Squad_OuterBG : GREUH_OuterBG {
idc = 521;
style = ST_SINGLE;
x = (0.37 * safezoneW + safezoneX) - (BORDERSIZE);
y = ((BASE_Y + 0.18) * safezoneH) + safezoneY - (1.5 * BORDERSIZE);
w = 0.2 * safezoneW + (2 * BORDERSIZE);
h = 0.05 * safezoneH + (3 * BORDERSIZE);
};
class GREUH_Squad_InnerBG : GREUH_OuterBG {
idc = 522;
colorBackground[] = COLOR_GREEN;
x = (0.37 * safezoneW + safezoneX);
y = ((BASE_Y + 0.18) * safezoneH) + safezoneY;
w = 0.2 * safezoneW;
h = 0.05 * safezoneH;
};
class GREUH_Squad_OuterBG_F : GREUH_Squad_OuterBG {
idc = 523;
style = ST_FRAME;
};
class GREUH_Squad_InnerBG_F : GREUH_Squad_InnerBG {
idc = 524;
style = ST_FRAME;
};
class GREUH_ButtonName : GREUH_ButtonGeneric {
w = ((0.2 * safezoneW) / 5) - BORDERSIZE;
y = ((BASE_Y + 0.19) * safezoneH) + safezoneY;
};
class GREUH_ButtonName_Rename : GREUH_ButtonName {
idc = 525;
x = 0.4875 * safezoneW + safezoneX;
text = $STR_GREUH_RENAME;
action = "squadname = ctrlText 527;";
};
class GREUH_ButtonName_Abort : GREUH_ButtonName {
idc = 526;
x = (0.4875 * safezoneW + safezoneX) + ((0.2 * safezoneW) / 5);
text = $STR_GREUH_CANCEL;
action = "squadaction = '';";
};
class GREUH_Squad_TextField : GREUH_ButtonName {
idc = 527;
type = CT_EDIT;
style = ST_LEFT;
x = (0.37 * safezoneW + safezoneX) + BORDERSIZE;
w = 0.11 * safezoneW;
text = "";
action = "";
colorText[] = COLOR_WHITE;
colorSelection[] = COLOR_BRIGHTGREEN;
autocomplete = "";
};
class GREUH_Leader_OuterBG : GREUH_OuterBG {
idc = 561;
style = ST_SINGLE;
x = (0.37 * safezoneW + safezoneX) - (BORDERSIZE);
y = ((BASE_Y + 0.22) * safezoneH) + safezoneY - (1.5 * BORDERSIZE);
w = 0.2 * safezoneW + (2 * BORDERSIZE);
h = 0.05 * safezoneH + (3 * BORDERSIZE);
};
class GREUH_Leader_InnerBG : GREUH_OuterBG {
idc = 562;
colorBackground[] = COLOR_GREEN;
x = (0.37 * safezoneW + safezoneX);
y = ((BASE_Y + 0.22) * safezoneH) + safezoneY;
w = 0.2 * safezoneW;
h = 0.05 * safezoneH;
};
class GREUH_Leader_OuterBG_F : GREUH_Leader_OuterBG {
idc = 563;
style = ST_FRAME;
};
class GREUH_Leader_InnerBG_F : GREUH_Leader_InnerBG {
idc = 564;
style = ST_FRAME;
};
class GREUH_ButtonLeaderGen : GREUH_ButtonGeneric {
w = ((0.2 * safezoneW) / 5) - BORDERSIZE;
y = ((BASE_Y + 0.23) * safezoneH) + safezoneY;
};
class GREUH_ButtonLeader_Choose : GREUH_ButtonLeaderGen {
idc = 565;
x = 0.4875 * safezoneW + safezoneX;
text = $STR_GREUH_CHOOSE;
action = "choose_squadleader = lbCurSel 567;";
};
class GREUH_ButtonLeader_Abort : GREUH_ButtonLeaderGen {
idc = 566;
x = (0.4875 * safezoneW + safezoneX) + ((0.2 * safezoneW) / 5);
text = $STR_GREUH_CANCEL;
action = "squadaction = ''";
};
class GREUH_Squad_Combo : RscCombo {
idc = 567;
x = (0.37 * safezoneW + safezoneX) + BORDERSIZE;
w = 0.11 * safezoneW;
y = ((BASE_Y + 0.23) * safezoneH) + safezoneY;
h = 0.03 * safezoneH;
};
class GREUH_PlatoonZone : GREUH_DefaultZone {
idc = 601;
y = ((BASE_Y + 0.35) * safezoneH) + safezoneY;
h = (0.04 * safezoneH) - (2 * BORDERSIZE);
};
class GREUH_PlatoonLabel : GREUH_Label {
idc = 610;
y = ((BASE_Y + 0.31) * safezoneH) + safezoneY;
text = $STR_GREUH_PLATOON_SQUAD_AWARENESS;
};
class GREUH_LabelPlatoon : GREUH_RegularLabel {
idc = 611;
y = ((BASE_Y + 0.35) * safezoneH) + safezoneY;
text = $STR_GREUH_SHOW_PLATOON_OVERLAY;
};
class GREUH_LabelPlatoonActive : GREUH_RegularLabel {
idc = 612;
style = ST_RIGHT;
colorText[] = COLOR_BRIGHTGREEN;
text = $STR_GREUH_ACTIVE;
x = 0.2 * safezoneW + safezoneX;
w = 0.1 * safezoneW;
y = ((BASE_Y + 0.35) * safezoneH) + safezoneY;
};
class GREUH_PlatoonYes : GREUH_ButtonGeneric {
idc = 613;
w = ((0.08 * safezoneW) / 4);
y = ((BASE_Y + 0.35) * safezoneH) + safezoneY;
x = 0.305 * safezoneW + safezoneX;
text = $STR_GREUH_YES;
action = "show_platoon = true";
};
class GREUH_PlatoonNo : GREUH_ButtonGeneric {
idc = 614;
w = ((0.08 * safezoneW) / 4);
y = ((BASE_Y + 0.35) * safezoneH) + safezoneY;
x = (0.32 + BORDERSIZE) * safezoneW + safezoneX;
text = $STR_GREUH_NO;
action = "show_platoon = false";
};
class GREUH_ViewZone : GREUH_DefaultZone {
idc = 701;
y = ((BASE_Y + 0.51) * safezoneH) + safezoneY;
h = (0.04 * safezoneH) - (2 * BORDERSIZE);
};
class GREUH_ViewDistance : GREUH_Label {
idc = 711;
y = ((BASE_Y + 0.47) * safezoneH) + safezoneY;
text = $STR_GREUH_ADJUST_VIEW_DISTANCE;
};
class GREUH_Slider {
idc = 712;
type = CT_SLIDER;
style = SL_HORZ;
x = 0.19 * safezoneW + safezoneX;
w = 0.12 * safezoneW;
y = ((BASE_Y + 0.515) * safezoneH) + safezoneY;
h = 0.025 * safezoneH;
text = $STR_GREUH_VIEW_DISTANCE;
color[] = { 1, 1, 1, 1 };
coloractive[] = { 1, 1, 1, 1 };
onSliderPosChanged = "desiredviewdistance_inf = (sliderPosition 712)";
};
class GREUH_SliderVD : GREUH_Label {
idc = 713;
style = ST_LEFT;
x = 0.31 * safezoneW + safezoneX;
w = 0.05 * safezoneW;
y = ((BASE_Y + 0.505) * safezoneH) + safezoneY;
h = 0.03 * safezoneH;
colorBackground[] = COLOR_NOALPHA;
text = "";
};
class GREUH_LabelVD : GREUH_Label {
idc = 714;
style = ST_LEFT;
x = 0.15 * safezoneW + safezoneX;
w = 0.05 * safezoneW;
y = ((BASE_Y + 0.505) * safezoneH) + safezoneY;
h = 0.03 * safezoneH;
colorBackground[] = COLOR_NOALPHA;
text = $STR_GREUH_INFANTRY;
};
class GREUH_SliderVeh {
idc = 722;
type = CT_SLIDER;
style = SL_HORZ;
x = 0.19 * safezoneW + safezoneX;
w = 0.12 * safezoneW;
y = ((BASE_Y + 0.545) * safezoneH) + safezoneY;
h = 0.025 * safezoneH;
text = $STR_GREUH_VIEW_DISTANCE;
color[] = { 1, 1, 1, 1 };
coloractive[] = { 1, 1, 1, 1 };
onSliderPosChanged = "desiredviewdistance_veh = (sliderPosition 722)";
};
class GREUH_SliderVDVeh : GREUH_Label {
idc = 723;
style = ST_LEFT;
x = 0.31 * safezoneW + safezoneX;
w = 0.05 * safezoneW;
y = ((BASE_Y + 0.535) * safezoneH) + safezoneY;
h = 0.03 * safezoneH;
colorBackground[] = COLOR_NOALPHA;
text = "";
};
class GREUH_LabelVDVeh : GREUH_Label {
idc = 724;
style = ST_LEFT;
x = 0.15 * safezoneW + safezoneX;
w = 0.05 * safezoneW;
y = ((BASE_Y + 0.535) * safezoneH) + safezoneY;
h = 0.03 * safezoneH;
colorBackground[] = COLOR_NOALPHA;
text = $STR_GREUH_VEHICLES;
};
class GREUH_SliderObj {
idc = 732;
type = CT_SLIDER;
style = SL_HORZ;
x = 0.19 * safezoneW + safezoneX;
w = 0.12 * safezoneW;
y = ((BASE_Y + 0.575) * safezoneH) + safezoneY;
h = 0.025 * safezoneH;
text = $STR_GREUH_VIEW_DISTANCE;
color[] = { 1, 1, 1, 1 };
coloractive[] = { 1, 1, 1, 1 };
onSliderPosChanged = "desiredviewdistance_obj = (sliderPosition 732)";
};
class GREUH_SliderVDObj : GREUH_Label {
idc = 733;
style = ST_LEFT;
x = 0.31 * safezoneW + safezoneX;
w = 0.05 * safezoneW;
y = ((BASE_Y + 0.565) * safezoneH) + safezoneY;
h = 0.03 * safezoneH;
colorBackground[] = COLOR_NOALPHA;
text = "";
};
class GREUH_LabelVDObj : GREUH_Label {
idc = 734;
style = ST_LEFT;
x = 0.15 * safezoneW + safezoneX;
w = 0.05 * safezoneW;
y = ((BASE_Y + 0.565) * safezoneH) + safezoneY;
h = 0.03 * safezoneH;
colorBackground[] = COLOR_NOALPHA;
text = $STR_GREUH_OBJECTS;
};
class GREUH_FPSLabel : GREUH_Label {
idc = 724;
style = ST_LEFT;
x = 0.15 * safezoneW + safezoneX;
w = 0.3 * safezoneW;
y = ((BASE_Y + 0.61) * safezoneH) + safezoneY;
h = 0.03 * safezoneH;
colorBackground[] = COLOR_NOALPHA;
sizeEx = 0.018 * safezoneH;
text = $STR_GREUH_ADJUST_VIEW_DISTANCE_TO_KEEP_FPS_ABOVE;
};
class GREUH_FPSEdit {
idc = 960;
type = CT_EDIT;
style = ST_LEFT + ST_FRAME;
x = 0.317 * safezoneW + safezoneX;
w = 0.03 * safezoneW;
y = ((BASE_Y + 0.61) * safezoneH) + safezoneY;
h = 0.03 * safezoneH;
colorBackground[] = {0,0,0,0};
colorText[] = {1,1,1,1};
colorSelection[] = {1,1,1,0.25};
colorDisabled[] = { 0.2, 0.2, 0.2, 0.7 };
colorBackgroundDisabled[] = { 0.5, 0.5, 0.5, 0.5 };
font = FontM;
sizeEx = 0.02 * safezoneH;
autocomplete = "";
text = "";
shadow = 0;
};
class GREUH_WorldZone : GREUH_DefaultZone {
idc = 801;
y = ((BASE_Y + 0.7) * safezoneH) + safezoneY;
h = (0.04 * safezoneH) - (2 * BORDERSIZE);
};
class GREUH_WorldQuality : GREUH_Label {
idc = 810;
y = ((BASE_Y + 0.66) * safezoneH) + safezoneY;
text = $STR_GREUH_ADJUST_TERRAIN_DETAILS;
};
class GREUH_ButtonWorld : GREUH_ButtonGeneric {
w = ((0.2 * safezoneW) / 4) - BORDERSIZE;
y = ((BASE_Y + 0.7) * safezoneH) + safezoneY;
};
class GREUH_ButtonWorldVeryLow : GREUH_ButtonWorld {
idc = 812;
x = 0.15 * safezoneW + safezoneX;
text = $STR_GREUH_VERY_LOW;
action = "setTerrainGrid 50; hint 'Terrain details set to Very Low'";
};
class GREUH_ButtonWorldLow : GREUH_ButtonWorld {
idc = 813;
x = (0.15 * safezoneW + safezoneX) + (((0.2 * safezoneW) / 4) * 1);
text = $STR_GREUH_LOW;
action = "setTerrainGrid 25; hint 'Terrain details set to Low'";
};
class GREUH_ButtonWorldNormal : GREUH_ButtonWorld {
idc = 814;
x = (0.15 * safezoneW + safezoneX) + (((0.2 * safezoneW) / 4) * 2);
text = $STR_GREUH_NORMAL;
action = "setTerrainGrid 12.5; hint 'Terrain details set to Normal'";
};
class GREUH_ButtonWorldHigh : GREUH_ButtonWorld {
idc = 815;
x = (0.15 * safezoneW + safezoneX) + (((0.2 * safezoneW) / 4) * 3);
text = $STR_GREUH_HIGH;
action = "setTerrainGrid 3.125; hint 'Terrain details set to High'";
};
class GREUH_MarkersZone : GREUH_DefaultZone {
idc = 901;
y = ((BASE_Y + 0.43) * safezoneH) + safezoneY;
h = (0.04 * safezoneH) - (2 * BORDERSIZE);
};
class GREUH_LabelNametags : GREUH_RegularLabel {
idc = 961;
y = ((BASE_Y + 0.39) * safezoneH) + safezoneY;
text = $STR_GREUH_SHOW_PLAYER_NAMETAGS;
};
class GREUH_NametagsActive : GREUH_RegularLabel {
idc = 962;
style = ST_RIGHT;
colorText[] = COLOR_BRIGHTGREEN;
text = $STR_GREUH_ACTIVE;
x = 0.2 * safezoneW + safezoneX;
w = 0.1 * safezoneW;
y = ((BASE_Y + 0.39) * safezoneH) + safezoneY;
};
class GREUH_NametagsYes : GREUH_ButtonGeneric {
idc = 963;
w = ((0.08 * safezoneW) / 4);
y = ((BASE_Y + 0.39) * safezoneH) + safezoneY;
x = 0.305 * safezoneW + safezoneX;
text = $STR_GREUH_YES;
action = "show_nametags = true";
};
class GREUH_NametagsNo : GREUH_ButtonGeneric {
idc = 964;
w = ((0.08 * safezoneW) / 4);
y = ((BASE_Y + 0.39) * safezoneH) + safezoneY;
x = (0.32 + BORDERSIZE) * safezoneW + safezoneX;
text = $STR_GREUH_NO;
action = "show_nametags = false";
};
class GREUH_LabelMarkers : GREUH_RegularLabel {
idc = 911;
y = ((BASE_Y + 0.43) * safezoneH) + safezoneY;
text = $STR_GREUH_SHOW_TEAMMATES_ON_MAP;
};
class GREUH_LabelMarkersActive : GREUH_RegularLabel {
idc = 912;
style = ST_RIGHT;
colorText[] = COLOR_BRIGHTGREEN;
text = $STR_GREUH_ACTIVE;
x = 0.2 * safezoneW + safezoneX;
w = 0.1 * safezoneW;
y = ((BASE_Y + 0.43) * safezoneH) + safezoneY;
};
class GREUH_TeammatesYes : GREUH_ButtonGeneric {
idc = 913;
w = ((0.08 * safezoneW) / 4);
y = ((BASE_Y + 0.43) * safezoneH) + safezoneY;
x = 0.305 * safezoneW + safezoneX;
text = $STR_GREUH_YES;
action = "show_teammates = true";
};
class GREUH_TeammatesNo : GREUH_ButtonGeneric {
idc = 914;
w = ((0.08 * safezoneW) / 4);
y = ((BASE_Y + 0.43) * safezoneH) + safezoneY;
x = (0.32 + BORDERSIZE) * safezoneW + safezoneX;
text = $STR_GREUH_NO;
action = "show_teammates = false";
};
class GREUH_VehSound : GREUH_Label {
idc = 1101;
y = ((BASE_Y + 0.74) * safezoneH) + safezoneY;
text = $STR_GREUH_INVEHICLE_SOUND_VOLUME;
};
class GREUH_SliderVehSound {
idc = 1102;
type = CT_SLIDER;
style = SL_HORZ;
x = 0.15 * safezoneW + safezoneX;
w = 0.16 * safezoneW;
y = ((BASE_Y + 0.785) * safezoneH) + safezoneY;
h = 0.025 * safezoneH;
text = $STR_GREUH_VIEW_DISTANCE;
color[] = { 1, 1, 1, 1 };
coloractive[] = { 1, 1, 1, 1 };
onSliderPosChanged = "desired_vehvolume = (sliderPosition 1102)";
};
class GREUH_LabelVehSound : GREUH_Label {
idc = 1103;
style = ST_LEFT;
x = 0.31 * safezoneW + safezoneX;
w = 0.05 * safezoneW;
y = ((BASE_Y + 0.775) * safezoneH) + safezoneY;
h = 0.03 * safezoneH;
colorBackground[] = COLOR_NOALPHA;
text = $STR_GREUH_TEST;
};
};
class GreuhButton {
idc = -1;
type = CT_BUTTON;
style = ST_CENTER;
default = false;
font = FontM;
sizeEx = 0.018 * safezoneH;
colorText[] = { 0, 0, 0, 1 };
colorFocused[] = { 1, 1, 1, 1 };
colorDisabled[] = { 0.2, 0.2, 0.2, 0.7 };
colorBackground[] = { 0.8, 0.8, 0.8, 0.8 };
colorBackgroundDisabled[] = { 0.5, 0.5, 0.5, 0.5 };
colorBackgroundActive[] = { 1, 1, 1, 1 };
offsetX = 0.003;
offsetY = 0.003;
offsetPressedX = 0.002;
offsetPressedY = 0.002;
colorShadow[] = { 0, 0, 0, 0.5 };
colorBorder[] = { 0, 0, 0, 1 };
borderSize = 0;
soundEnter[] = { "", 0, 1 }; // no sound
soundPush[] = {"\a3\Ui_f\data\Sound\CfgIngameUI\hintExpand", 0.891251, 1};
soundClick[] = { "", 0, 1 }; // no sound
soundEscape[] = { "", 0, 1 }; // no sound
x = 0.45 * safezoneW + safezoneX;
y = ((BASE_Y + 0.7) * safezoneH) + safezoneY;
w = 0.1 * safezoneW;
h = 0.04 * safezoneH;
text = "";
action = "";
shadow = 1;
};
class GREUH_respawn {
idd = 5566;
movingEnable = false;
controlsBackground[] = {"GREUH_BleedoutBar_BG"};
controls[] = {"GREUH_BleedoutBar","GREUH_BleedoutBar_F","GREUH_Useless","GREUH_Respawn","GREUH_ReviveLabel","GREUH_WoundedLabel", "GREUH_ReplaceAI"};
objects[] = {};
class GREUH_Respawn : GreuhButton {
idc = -1;
x = 0.45 * safezoneW + safezoneX;
y = 0.75 * safezoneH + safezoneY;
w = 0.1 * safezoneW;
h = 0.04 * safezoneH;
text = $STR_GREUH_RESPAWN;
action = "player setDamage 1";
};
class GREUH_ReplaceAI : GreuhButton {
idc = 678;
x = 0.45 * safezoneW + safezoneX;
y = 0.8 * safezoneH + safezoneY;
w = 0.1 * safezoneW;
h = 0.04 * safezoneH;
text = $STR_GREUH_REPLACE_NEAREST_AI;
action = "replace_ai = 1";
};
class GREUH_Useless : GREUH_Respawn {
idc = -1;
x = -5;
y = -5;
w = 0.1;
h = 0.1;
text = "";
action = "";
};
class GREUH_ReviveLabel {
idc = 5567;
type = CT_STATIC;
style = ST_CENTER;
colorText[] = COLOR_WHITE;
colorBackground[] = COLOR_NOALPHA;
font = FontM;
sizeEx = 0.02 * safezoneH;
shadow = 1;
x = 0.4 * safezoneW + safezoneX;
y = 0.7 * safezoneH + safezoneY;
w = 0.2 * safezoneW;
h = 0.025 * safezoneH;
text = "";
};
class GREUH_WoundedLabel {
idc = 4567;
type = CT_STATIC;
style = ST_CENTER;
colorText[] = COLOR_WHITE;
colorBackground[] = COLOR_NOALPHA;
font = FontM;
sizeEx = 0.07 * safezoneH;
shadow = 1;
x = 0.3 * safezoneW + safezoneX;
y = 0.25 * safezoneH + safezoneY;
w = 0.4 * safezoneW;
h = 0.07 * safezoneH;
text = $STR_REVIVE_LABEL;
};
class GREUH_BleedoutBar {
idc = 6699;
type = CT_STATIC;
style = ST_SINGLE;
colorText[] = COLOR_WHITE;
colorBackground[] = COLOR_BLEEDOUT;
font = FontM;
sizeEx = 0.023;
x = 0.4 * safezoneW + safezoneX;
y = 0.7 * safezoneH + safezoneY;
w = 0.2 * safezoneW;
h = 0.03 * safezoneH;
text = "";
};
class GREUH_BleedoutBar_BG : GREUH_BleedoutBar {
idc = -1;
colorBackground[] = COLOR_BLACK_ALPHA;
x = 0.4 * safezoneW + safezoneX - 0.005;
y = 0.7 * safezoneH + safezoneY - 0.005;
w = 0.2 * safezoneW + 0.01;
h = 0.03 * safezoneH + 0.01;
};
class GREUH_BleedoutBar_F : GREUH_BleedoutBar {
idc = 6698;
colorText[] = COLOR_WHITE;
style = ST_FRAME;
x = 0.4 * safezoneW + safezoneX - 0.005;
y = 0.7 * safezoneH + safezoneY - 0.005;
w = 0.2 * safezoneW + 0.01;
h = 0.03 * safezoneH + 0.01;
};
};