Skip to content

Commit

Permalink
chore: tabs -> spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
pridit committed Sep 29, 2024
1 parent 5118381 commit c4bb0d3
Show file tree
Hide file tree
Showing 5 changed files with 283 additions and 283 deletions.
42 changes: 21 additions & 21 deletions chat/dialog/titles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,32 @@ class XD_ChatDialog {
duration = 1e+011;
fadein = 0;
fadeout = 0;
onLoad = "uiNamespace setVariable ['X_CHAT_DIALOG', _this select 0];";
onLoad = "uiNamespace setVariable ['X_CHAT_DIALOG', _this select 0];";
onUnload = "uiNamespace setVariable ['X_CHAT_DIALOG', displayNull];";
class controlsBackground {
class controlsBackground {
class RscPicture_1200: XD_RscPicture
{
idc = 1000;
x = "SafeZoneX + 0.268";
y = "(SafeZoneH + SafeZoneY) - 0.034";
w = 0.025;
idc = 1000;
x = "SafeZoneX + 0.268";
y = "(SafeZoneH + SafeZoneY) - 0.034";
w = 0.025;
h = 0.034;
sizeEx = 0.034;
colorText[] = {0.773, 0.29, 0.188, 1};
sizeEx = 0.034;
colorText[] = {0.773, 0.29, 0.188, 1};
};
};
class controls {
class RscChatTextNotice: XC_RscText
{
idc = 100;
x = "SafeZoneX + 0.29";
y = "(SafeZoneH + SafeZoneY) - 0.034";
w = "SafeZoneW - 0.26 - 0.015";
h = 0.034;
sizeEx = 0.034;
font = "Zeppelin32";
colorText[] = {0.773, 0.29, 0.188, 1};
colorBackground[] = {0, 0, 0, 0};
};
};
class RscChatTextNotice: XC_RscText
{
idc = 100;
x = "SafeZoneX + 0.29";
y = "(SafeZoneH + SafeZoneY) - 0.034";
w = "SafeZoneW - 0.26 - 0.015";
h = 0.034;
sizeEx = 0.034;
font = "Zeppelin32";
colorText[] = {0.773, 0.29, 0.188, 1};
colorBackground[] = {0, 0, 0, 0};
};
};
};
84 changes: 42 additions & 42 deletions core/common/functions/fn_findNestedElement.sqf
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
scriptName "Functions\arrays\fn_findNestedElement.sqf";
/*
File: fn_findNestedElement.sqf
Author: Joris-Jan van 't Land
File: fn_findNestedElement.sqf
Author: Joris-Jan van 't Land
Description:
Function to find item in nested arrays && return a path to the first match.
Description:
Function to find item in nested arrays && return a path to the first match.
Example:
_array = [[1, 2], [3, 4]];
_path = [_array, 3] call BIS_fnc_findNestedElement; //Expected result: [1, 0]
Example:
_array = [[1, 2], [3, 4]];
_path = [_array, 3] call BIS_fnc_findNestedElement; //Expected result: [1, 0]
Parameter(s):
_this select 0: Array
_this select 1: queried element (Any Value)
Parameter(s):
_this select 0: Array
_this select 1: queried element (Any Value)
Returns:
Array path to the element
Returns:
Array path to the element
*/

private ["_array", "_query", "_path", "_found"];
Expand All @@ -31,46 +31,46 @@ if ((typeName _array) != (typeName [])) exitWith {debugLog "Log: [findNestedElem
private ["_searchArrayFunc"];
_searchArrayFunc =
{
private ["_array", "_query", "_find"];
_array = _this select 0;
_query = _this select 1;
private ["_array", "_query", "_find"];
_array = _this select 0;
_query = _this select 1;

//See if the array itself contains the queried element.
_find = _array find _query;
if (_find != -1) exitWith
{
_path = _path + [_find];
_found = true;
};
//See if the array itself contains the queried element.
_find = _array find _query;
if (_find != -1) exitWith
{
_path = _path + [_find];
_found = true;
};

//If not, search its children.
[_array, _query] call _searchArrayChildrenFunc;
//If not, search its children.
[_array, _query] call _searchArrayChildrenFunc;
};

//Find a value in an Array's children.
private ["_searchArrayChildrenFunc"];
_searchArrayChildrenFunc =
{
private ["_array", "_query"];
_array = _this select 0;
_query = _this select 1;
private ["_array", "_query"];
_array = _this select 0;
_query = _this select 1;

//Search all Array children for the queried element.
for "_i" from 0 to ((count _array) - 1) do
{
private ["_sub"];
_sub = _array select _i;
//Search all Array children for the queried element.
for "_i" from 0 to ((count _array) - 1) do
{
private ["_sub"];
_sub = _array select _i;

if (((typeName _sub) == (typeName [])) && !_found) then
{
_path = _path + [_i];
[_sub, _query] call _searchArrayFunc;
};
};
if(count _path > 0)then{
//Nothing was found, so take a step back.
if (!_found) then {_path resize ((count _path) - 1)};
};
if (((typeName _sub) == (typeName [])) && !_found) then
{
_path = _path + [_i];
[_sub, _query] call _searchArrayFunc;
};
};
if(count _path > 0)then{
//Nothing was found, so take a step back.
if (!_found) then {_path resize ((count _path) - 1)};
};
};

[_array, _query] call _searchArrayFunc;
Expand Down
28 changes: 14 additions & 14 deletions define.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1046,18 +1046,18 @@ class XC_SliderH {
};
class RscFrame
{
type = CT_STATIC;
idc = -1;
deletable = 0;
style = ST_FRAME;
shadow = 2;
colorBackground[] = {0,0,0,0};
colorText[] = {1,1,1,1};
font = "Zeppelin32";
sizeEx = 0.02;
text = "";
x = 0;
y = 0;
w = 0.3;
h = 0.3;
type = CT_STATIC;
idc = -1;
deletable = 0;
style = ST_FRAME;
shadow = 2;
colorBackground[] = {0,0,0,0};
colorText[] = {1,1,1,1};
font = "Zeppelin32";
sizeEx = 0.02;
text = "";
x = 0;
y = 0;
w = 0.3;
h = 0.3;
};
166 changes: 83 additions & 83 deletions vehicle_lift/dialog/titles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,93 +14,93 @@ class XD_VehicleLiftDialog {
colorBackground[] = {0, 0.3, 0, 0.12};
sizeEx = 0.015;
x = 0.3;
y = 0.4;
w = 0.42;
h = 0.4;
y = 0.4;
w = 0.42;
h = 0.4;
};
};
class controls {
class RscVehicleLiftType: XC_RscText
{
idc = 100;
font = "Zeppelin32";
colorText[] = {0.543, 0.5742, 0.4102, 0.9};
colorBackground[] = {0, 0, 0, 0};
x = 0.31875;
y = 0.75;
w = 0.19596;
h = 0.0324677;
};
class RscVehicleLiftDistance: XC_RscText
{
idc = 101;
font = "Zeppelin32";
colorText[] = {0.543, 0.5742, 0.4102, 0.9};
colorBackground[] = {0, 0, 0, 0};
x = 0.31875;
y = 0.42;
w = 0.157122;
h = 0.0307361;
};
class RscVehicleLiftVehicle: XD_RscPicture
{
idc = 200;
style = ST_MULTI + ST_TITLE_BAR + ST_KEEP_ASPECT_RATIO;
class controls {
class RscVehicleLiftType: XC_RscText
{
idc = 100;
font = "Zeppelin32";
colorText[] = {0.543, 0.5742, 0.4102, 0.9};
colorBackground[] = {0, 0, 0, 0};
x = 0.31875;
y = 0.75;
w = 0.19596;
h = 0.0324677;
};
class RscVehicleLiftDistance: XC_RscText
{
idc = 101;
font = "Zeppelin32";
colorText[] = {0.543, 0.5742, 0.4102, 0.9};
colorBackground[] = {0, 0, 0, 0};
x = 0.31875;
y = 0.42;
w = 0.157122;
h = 0.0307361;
};
class RscVehicleLiftVehicle: XD_RscPicture
{
idc = 200;
style = ST_MULTI + ST_TITLE_BAR + ST_KEEP_ASPECT_RATIO;
colorText[] = {0.543, 0.5742, 0.4102, 0.9};
x = 0.626875;
x = 0.626875;
y = 0.69;
w = 0.074375;
h = 0.09;
};
class RscVehicleLiftArrowUp: XD_RscPicture
{
idc = 300;
colorText[] = {1, 1, 1, 0.25};
text = "\ca\ui\data\ui_tankdir_forward_ca.paa";
x = 0.44625;
y = 0.48;
w = 0.116875;
h = 0.15;
};
class RscVehicleLiftArrowDown: XD_RscPicture
{
idc = 301;
colorText[] = {1, 1, 1, 0.25};
text = "\ca\ui\data\ui_tankdir_back_ca.paa";
x = 0.44625;
y = 0.55;
w = 0.116875;
h = 0.15;
};
class RscVehicleLiftArrowLeft: XD_RscPicture
{
idc = 302;
colorText[] = {1, 1, 1, 0.25};
text = "\ca\ui\data\ui_tankdir_left_ca.paa";
x = 0.414375;
y = 0.52;
w = 0.116875;
h = 0.15;
};
class RscVehicleLiftArrowRight: XD_RscPicture
{
idc = 303;
colorText[] = {1, 1, 1, 0.25};
text = "\ca\ui\data\ui_tankdir_right_ca.paa";
x = 0.478125;
y = 0.52;
w = 0.116875;
h = 0.15;
};
class RscVehicleLiftReady: XD_RscPicture
{
idc = 304;
colorText[] = {1, 1, 1, 0.25};
text = "\ca\ui\data\ui_tankdir_stop_ca.paa";
x = 0.44625;
y = 0.52;
w = 0.116875;
h = 0.15;
};
};
};
class RscVehicleLiftArrowUp: XD_RscPicture
{
idc = 300;
colorText[] = {1, 1, 1, 0.25};
text = "\ca\ui\data\ui_tankdir_forward_ca.paa";
x = 0.44625;
y = 0.48;
w = 0.116875;
h = 0.15;
};
class RscVehicleLiftArrowDown: XD_RscPicture
{
idc = 301;
colorText[] = {1, 1, 1, 0.25};
text = "\ca\ui\data\ui_tankdir_back_ca.paa";
x = 0.44625;
y = 0.55;
w = 0.116875;
h = 0.15;
};
class RscVehicleLiftArrowLeft: XD_RscPicture
{
idc = 302;
colorText[] = {1, 1, 1, 0.25};
text = "\ca\ui\data\ui_tankdir_left_ca.paa";
x = 0.414375;
y = 0.52;
w = 0.116875;
h = 0.15;
};
class RscVehicleLiftArrowRight: XD_RscPicture
{
idc = 303;
colorText[] = {1, 1, 1, 0.25};
text = "\ca\ui\data\ui_tankdir_right_ca.paa";
x = 0.478125;
y = 0.52;
w = 0.116875;
h = 0.15;
};
class RscVehicleLiftReady: XD_RscPicture
{
idc = 304;
colorText[] = {1, 1, 1, 0.25};
text = "\ca\ui\data\ui_tankdir_stop_ca.paa";
x = 0.44625;
y = 0.52;
w = 0.116875;
h = 0.15;
};
};
};
Loading

0 comments on commit c4bb0d3

Please sign in to comment.