├── README.md
├── mission-files
├── badmin
│ ├── client
│ │ ├── titleTextMessage.sqf
│ │ ├── systems
│ │ │ ├── adminPanel
│ │ │ │ ├── deleteAllHackedVehicles.sqf
│ │ │ │ ├── checkAdmin2.sqf
│ │ │ │ ├── toggleGodMode.sqf
│ │ │ │ ├── findHackedVehicles.sqf
│ │ │ │ ├── loadModeratorMenu.sqf
│ │ │ │ ├── loadShopMenu.sqf
│ │ │ │ ├── loadDebugMenu.sqf
│ │ │ │ ├── loadAdministratorMenu.sqf
│ │ │ │ ├── loadServerAdministratorMenu.sqf
│ │ │ │ ├── checkAdmin.sqf
│ │ │ │ ├── loadObjectSearch.sqf
│ │ │ │ ├── deleteVehicle.sqf
│ │ │ │ ├── tpmeto.sqf
│ │ │ │ ├── tptome.sqf
│ │ │ │ ├── playerMenu.sqf
│ │ │ │ ├── isAdmin.sqf
│ │ │ │ ├── dialog
│ │ │ │ │ ├── modMenu.hpp
│ │ │ │ │ ├── shopMenu.hpp
│ │ │ │ │ ├── debugMenu.hpp
│ │ │ │ │ ├── adminMenu.hpp
│ │ │ │ │ ├── serverAdminMenu.hpp
│ │ │ │ │ └── playerMenu.hpp
│ │ │ │ ├── playerTags.sqf
│ │ │ │ ├── vehicleManagement.sqf
│ │ │ │ ├── importValues.sqf
│ │ │ │ ├── optionSelect.sqf
│ │ │ │ ├── playerSelect.sqf
│ │ │ │ ├── objectSearchInteraction.sqf
│ │ │ │ └── populateVehicles.sqf
│ │ │ └── common.hpp
│ │ ├── init.sqf
│ │ ├── camera
│ │ │ ├── macro.h
│ │ │ ├── dikcodes.h
│ │ │ └── functions.sqf
│ │ └── gui_base.hpp
│ ├── server
│ │ ├── broadcaster.sqf
│ │ ├── init.sqf
│ │ └── admins.sqf
│ ├── globalCompile.sqf
│ └── LICENSE.txt
├── description-DONT-REPLACE-IT.ext
└── init.sqf
├── bAdmin_settings
└── admins.sqf
└── LICENSE.txt
/README.md:
--------------------------------------------------------------------------------
1 | # bAdmin
2 | Admin Panel from A3Wasteland ported and customized for exile
3 |
4 | Tutorial to install: http://www.exilemod.com/topic/1146-badmin-in-game-admin-menu-from-a3w/
5 |
--------------------------------------------------------------------------------
/mission-files/badmin/client/titleTextMessage.sqf:
--------------------------------------------------------------------------------
1 | // ******************************************************************************************
2 | // * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
3 | // ******************************************************************************************
4 | // @file Version: 1.0
5 | // @file Name: titleTextMessage.sqf
6 | // @file Author: AgentRev
7 | // @file Date modified: 31/07/2013 23:41
8 |
9 | titleText [_this, "PLAIN", 0];
10 |
--------------------------------------------------------------------------------
/mission-files/description-DONT-REPLACE-IT.ext:
--------------------------------------------------------------------------------
1 | //bAdmin dialog includes
2 |
3 | #include "badmin\client\gui_base.hpp"
4 | #include "badmin\client\systems\common.hpp"
5 | #include "badmin\client\systems\adminPanel\dialog\adminMenu.hpp"
6 | #include "badmin\client\systems\adminPanel\dialog\modMenu.hpp"
7 | #include "badmin\client\systems\adminPanel\dialog\serverAdminMenu.hpp"
8 | #include "badmin\client\systems\adminPanel\dialog\debugMenu.hpp"
9 | #include "badmin\client\systems\adminPanel\dialog\shopMenu.hpp"
10 | #include "badmin\client\systems\adminPanel\dialog\playerMenu.hpp"
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/deleteAllHackedVehicles.sqf:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | // bAdmin Exile by Biabock
5 | { deleteVehicle (_x select 0) } forEach (call findHackedVehicles);
6 |
7 | player commandChat "All Hacked Vehicles Deleted";
8 |
9 | closeDialog 0;
10 | execVM "badmin\client\systems\adminPanel\vehicleManagement.sqf";
11 |
--------------------------------------------------------------------------------
/mission-files/badmin/server/broadcaster.sqf:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | // @file Version: 1.0
5 | // @file Name: broadcaster.sqf
6 | // @file Author: [404] Deadbeat
7 | // @file Created: 20/11/2012 05:19
8 | // @file Args:
9 | // bAdmin Exile by Biabock
10 |
11 | if (!isServer) exitWith {};
12 |
13 | while {true} do
14 | {
15 | serverFPS = diag_fps;
16 | publicVariable "serverFPS";
17 | sleep 1;
18 | };
19 |
--------------------------------------------------------------------------------
/mission-files/init.sqf:
--------------------------------------------------------------------------------
1 | // bAdmin Exile by Biabock
2 |
3 | #define DEBUG false
4 |
5 | [DEBUG] call compile preprocessFileLineNumbers "badmin\globalCompile.sqf";
6 |
7 | if (!isDedicated) then
8 | {
9 | if (hasInterface) then // Normal player
10 | {
11 | execVM "badmin\client\init.sqf";
12 | }
13 | };
14 |
15 | if (isServer) then
16 | {
17 | diag_log "bAdmin - Initializing";
18 | [] execVM "badmin\server\init.sqf";
19 | };
20 |
21 | OPEN_bADMIN_FNC = {
22 | switch (_this) do {
23 | //Key U
24 | case 22: {
25 | nul = [] execVM "badmin\client\systems\adminPanel\checkAdmin.sqf";
26 | };
27 | };
28 | };
29 |
30 | waituntil {!isnull (finddisplay 46)};
31 | (findDisplay 46) displayAddEventHandler ["KeyDown","_this select 1 call OPEN_bADMIN_FNC;false;"];
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/checkAdmin2.sqf:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | // @file Version: 1.0
5 | // @file Name: checkAdmin2.sqf
6 | // @file Author: [404] Deadbeat
7 | // @file Created: 20/11/2012 05:19
8 | // @file Args:
9 | // bAdmin Exile by Biabock
10 |
11 | _isAdmin = serverCommandAvailable "#kick";
12 |
13 | if (_isAdmin) then {
14 | _uid = getPlayerUID player;
15 | serverAdministrators set [count serverAdministrators, _uid];
16 | player sideChat "You have been made admin, please re-open the menu";
17 | };
18 |
--------------------------------------------------------------------------------
/mission-files/badmin/client/init.sqf:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | //@file Version: 1.1
5 | //@file Name: init.sqf
6 | //@file Author: [404] Deadbeat, [GoT] JoSchaap, AgentRev, [KoS] Bewilderbeest
7 | //@file Created: 20/11/2012 05:19
8 | //@file Description: The client init.
9 |
10 | if (isDedicated) exitWith {};
11 |
12 | [] execVM "badmin\client\camera\functions.sqf";
13 |
14 | isAdmin = "badmin\client\systems\adminPanel\isAdmin.sqf" call mf_compile;//
15 | A3W_fnc_titleTextMessage = "badmin\client\titleTextMessage.sqf" call mf_compile;
16 |
17 | diag_log "bAdmin - Client Compile Complete";
--------------------------------------------------------------------------------
/bAdmin_settings/admins.sqf:
--------------------------------------------------------------------------------
1 | // bAdmin Exile by Biabock
2 |
3 | // Admin menu (U key) access levels
4 |
5 | /*******************************************************
6 | Player UID examples :
7 |
8 | "1234567887654321", // Meatwad
9 | "8765432112345678", // Master Shake
10 | "1234876543211234", // Frylock
11 | "1337133713371337" // Carl
12 |
13 | Important: The player UID must always be placed between
14 | double quotes (") and all lines need to have
15 | a comma (,) except the last one.
16 | ********************************************************/
17 |
18 | // Moderators
19 | lowAdmins = compileFinal str
20 | [
21 | // Put player UIDs here
22 | ];
23 |
24 | // High Administrators
25 | highAdmins = compileFinal str
26 | [
27 | // Put player UIDs here
28 | ];
29 |
30 | // Server Owners: access to everything
31 | serverOwners =
32 | [
33 | "76561198069391227"// Put player UIDs here
34 | ];
35 |
--------------------------------------------------------------------------------
/mission-files/badmin/server/init.sqf:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | // @file Version: 1.1
5 | // @file Name: init.sqf
6 | // @file Author: [404] Deadbeat, [GoT] JoSchaap, AgentRev
7 | // @file Created: 20/11/2012 05:19
8 | // @file Description: The server init.
9 | // @file Args:
10 | // bAdmin Exile by Biabock
11 |
12 | // All the "hasInterface" and "isServer" checks are to allow this file to be executed on a headless client to offload object saving
13 |
14 | if (!isServer && hasInterface) exitWith {};
15 |
16 | externalConfigFolder = "\bAdmin_settings";
17 |
18 | if (isServer) then
19 | {
20 | [] execVM "badmin\server\admins.sqf";
21 | [] execVM "badmin\server\broadcaster.sqf";
22 | };
23 |
24 | diag_log "bAdmin - Server Compile Finished";
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/toggleGodMode.sqf:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | //@file Name: toggleGodMode.sqf
5 | // bAdmin Exile by Biabock
6 |
7 | if (isDedicated) exitWith {};
8 |
9 | if ((getPlayerUID player) call isAdmin) then
10 | {
11 | _curPlayerInvulnState = player getVariable ["isAdminInvulnerable", false];
12 |
13 | if (!_curPlayerInvulnState) then
14 | {
15 | player setDamage 0;
16 | player allowDamage false;
17 | vehicle player setDamage 0;
18 | player setVariable ["isAdminInvulnerable", true, true];
19 | hint "You are now invulnerable";
20 | }
21 | else
22 | {
23 | player allowDamage true;
24 | player setVariable ["isAdminInvulnerable", false, true];
25 | hint "You are no longer invulnerable";
26 | };
27 | };
28 |
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/findHackedVehicles.sqf:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | // @file Version: 1.0
5 | // @file Name: findHackedVehicles.sqf
6 | // @file Author: AgentRev
7 | // @file Created: 09/06/2013 16:56
8 | // bAdmin Exile by Biabock
9 |
10 | private ["_requestKey", "_hackedVehicles"];
11 | _requestKey = call A3W_fnc_generateKey;
12 |
13 | [[player, _requestKey], "A3W_fnc_checkHackedVehicles", false, false] call A3W_fnc_MP;
14 |
15 | waitUntil {!isNil _requestKey};
16 |
17 | _hackedVehicles = missionNamespace getVariable [_requestKey, []];
18 | missionNamespace setVariable [_requestKey, nil];
19 |
20 | {
21 | _hackedVehicles set [_forEachIndex, [objectFromNetId (_x select 0), toString (_x select 1)]];
22 | } forEach _hackedVehicles;
23 |
24 | _hackedVehicles
25 |
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/loadModeratorMenu.sqf:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | // @file Version: 1.0
5 | // @file Name: loadModeratorMenu.sqf
6 | // @file Author: [404] Deadbeat
7 | // @file Created: 20/11/2012 05:19
8 | // @file Args:
9 | // bAdmin Exile by Biabock
10 |
11 | #define adminMenu_option 50001
12 | disableSerialization;
13 |
14 | private ["_start","_panelOptions","_displayAdmin","_adminSelect"];
15 | _uid = getPlayerUID player;
16 | if ([_uid, 1] call isAdmin) then {
17 | _start = createDialog "AdminMenu";
18 |
19 | _displayAdmin = uiNamespace getVariable "AdminMenu";
20 | _adminSelect = _displayAdmin displayCtrl adminMenu_option;
21 |
22 | _panelOptions = ["Player Management",
23 | "Player Markers"
24 | ];
25 |
26 | {
27 | _adminSelect lbAdd _x;
28 | } forEach _panelOptions;
29 | };
30 |
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/loadShopMenu.sqf:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | // @file Version: 1.0
5 | // @file Name: loadDebugMenu.sqf
6 | // @file Author: [404] Deadbeat
7 | // @file Created: 20/11/2012 05:19
8 | // @file Args:
9 | // bAdmin Exile by Biabock
10 |
11 | #define shopMenu_option 50003
12 | disableSerialization;
13 |
14 | private ["_start","_panelOptions","_shopSelect","_displayShop"];
15 | _uid = getPlayerUID player;
16 | if (_uid call isAdmin) then
17 | {
18 | _start = createDialog "ShopMenu";
19 |
20 | _displayShop = uiNamespace getVariable "ShopMenu";
21 | _shopSelect = _displayShop displayCtrl shopMenu_option;
22 |
23 | _panelOptions = ["Soon",
24 | "Soon",
25 | "Soon",
26 | "Soon"
27 |
28 | ];
29 |
30 | {
31 | _shopSelect lbAdd _x;
32 | } forEach _panelOptions;
33 | };
34 |
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/loadDebugMenu.sqf:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | // @file Version: 1.0
5 | // @file Name: loadDebugMenu.sqf
6 | // @file Author: [404] Deadbeat
7 | // @file Created: 20/11/2012 05:19
8 | // @file Args:
9 | // bAdmin Exile by Biabock
10 |
11 | #define debugMenu_option 50003
12 | disableSerialization;
13 |
14 | private ["_start","_panelOptions","_debugSelect","_displayDebug"];
15 | _uid = getPlayerUID player;
16 | if (_uid call isAdmin) then
17 | {
18 | _start = createDialog "DebugMenu";
19 |
20 | _displayDebug = uiNamespace getVariable "DebugMenu";
21 | _debugSelect = _displayDebug displayCtrl debugMenu_option;
22 |
23 | _panelOptions = ["To Map Position",
24 | "Me to Player",
25 | "Player To Me"
26 |
27 | ];
28 |
29 | {
30 | _debugSelect lbAdd _x;
31 | } forEach _panelOptions;
32 | };
33 |
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/loadAdministratorMenu.sqf:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | // @file Version: 1.0
5 | // @file Name: loadAdministratorMenu.sqf
6 | // @file Author: [404] Deadbeat
7 | // @file Created: 20/11/2012 05:19
8 | // @file Args:
9 | // bAdmin Exile by Biabock
10 |
11 | #define adminMenu_option 50001
12 | disableSerialization;
13 |
14 | private ["_start","_panelOptions","_adminSelect","_displayAdmin"];
15 | _uid = getPlayerUID player;
16 | if ([_uid, 2] call isAdmin) then {
17 | _start = createDialog "AdminMenu";
18 |
19 | _displayAdmin = uiNamespace getVariable "AdminMenu";
20 | _adminSelect = _displayAdmin displayCtrl adminMenu_option;
21 |
22 | _panelOptions = ["Player Management",
23 | "Player Markers",
24 | "Shop Menu",
25 | "Add Poptabs",
26 | "Add Score"
27 | ];
28 |
29 | {
30 | _adminSelect lbAdd _x;
31 | } forEach _panelOptions;
32 | };
33 |
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/loadServerAdministratorMenu.sqf:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | // @file Version: 1.0
5 | // @file Name: loadServerAdministratorMenu.sqf
6 | // @file Author: [404] Deadbeat
7 | // @file Created: 20/11/2012 05:19
8 | // @file Args:
9 | // bAdmin Exile by Biabock
10 |
11 | #define adminMenu_option 50001
12 | disableSerialization;
13 |
14 | private ["_start","_panelOptions","_displayAdmin","_adminSelect"];
15 | _uid = getPlayerUID player;
16 | if ([_uid, 3] call isAdmin) then {
17 | _start = createDialog "AdminMenu";
18 |
19 | _displayAdmin = uiNamespace getVariable "AdminMenu";
20 | _adminSelect = _displayAdmin displayCtrl adminMenu_option;
21 |
22 | _panelOptions = ["Player Management",
23 | "Player Markers",
24 | "Shop Menu",
25 | "Add Poptabs",
26 | "Add Score",
27 | "Teleport Menu",
28 | "Show Server FPS",
29 | "Toggle God-mode"
30 | ];
31 |
32 | {
33 | _adminSelect lbAdd _x;
34 | } forEach _panelOptions;
35 | };
36 |
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/checkAdmin.sqf:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | // @file Version: 1.1
5 | // @file Name: checkAdmin.sqf
6 | // @file Author: [404] Deadbeat, AgentRev
7 | // @file Created: 20/11/2012 05:19
8 | // @file Args:
9 | // bAdmin Exile by Biabock
10 |
11 | private ["_uid","_handle"];
12 | _uid = getPlayerUID player;
13 |
14 | if (!isNull (uiNamespace getVariable ["AdminMenu", displayNull])) exitWith {};
15 |
16 | switch (true) do
17 | {
18 | case ([_uid, serverOwners] call isAdmin || isServer):
19 | {
20 | execVM "badmin\client\systems\adminPanel\loadServerAdministratorMenu.sqf";
21 | hint "Welcome Boss";
22 | };
23 | case ([_uid, highAdmins] call isAdmin):
24 | {
25 | execVM "badmin\client\systems\adminPanel\loadAdministratorMenu.sqf";
26 | hint "Welcome High Admin";
27 | };
28 | case ([_uid, lowAdmins] call isAdmin):
29 | {
30 | execVM "badmin\client\systems\adminPanel\loadModeratorMenu.sqf";
31 | hint "Welcome Low Admin";
32 | };
33 | case (serverCommandAvailable "#kick"):
34 | {
35 | execVM "badmin\client\systems\adminPanel\loadServerAdministratorMenu.sqf";
36 | hint "Welcome Boss";
37 | };
38 | };
39 |
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/loadObjectSearch.sqf:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | // bAdmin Exile by Biabock
5 | #define objectSearchDialog 55600
6 | #define objectSearchFindButton 55601
7 | #define objectSearchFindTexteditBox 55602
8 | #define objectSearchObjectList 55603
9 | #define objectSearchTeleportButton 55604
10 | #define objectSearchCancelButton 55605
11 |
12 | disableSerialization;
13 |
14 | if (isNil "objectSearchMapMarkers") then {
15 | // This is the global we use to keep track of map markers
16 | objectSearchMapMarkers = [];
17 | };
18 |
19 | private ["_uid"];
20 |
21 | _uid = getPlayerUID player;
22 |
23 | if (_uid call isAdmin) then
24 | {
25 | private ["_dialog", "_display", "_objectSearchTermCtrl"];
26 | _dialog = createDialog "ObjectSearch";
27 | _display = findDisplay objectSearchDialog;
28 | _objectSearchTermCtrl = _display displayCtrl objectSearchFindTexteditBox;
29 |
30 | if (!isNil "objectSearchLastTermEntered") then {
31 | diag_log format["We have a previous term %1", objectSearchLastTermEntered];
32 | ctrlSetText [objectSearchFindTexteditBox, objectSearchLastTermEntered];
33 | } else {
34 | diag_log "objectSearchLastTermEntered was nil!";
35 | };
36 | };
37 |
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/deleteVehicle.sqf:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | // @file Version: 1.0
5 | // @file Name: deleteVehicle.sqf
6 | // @file Author: [404] Deadbeat
7 | // @file Created: 20/11/2012 05:19
8 | // @file Args:
9 | // bAdmin Exile by Biabock
10 |
11 | #define vehicleManagementDialog 12000
12 | #define vehicleManagementListBox 12001
13 |
14 | disableSerialization;
15 |
16 | private ["_switch","_vehicleType","_vehicleSummary","_vehicle","_selectedItem","_selectedItemData"];
17 | _uid = getPlayerUID player;
18 | if (_uid call isAdmin) then
19 | {
20 | _allVehicles = vehicles;
21 |
22 | _dialog = findDisplay vehicleManagementDialog;
23 | _vehicleListBox = _dialog displayCtrl vehicleManagementListBox;
24 |
25 | _selectedItem = lbCurSel _vehicleListBox;
26 | _selectedItemData = _vehicleListBox lbData _selectedItem;
27 |
28 | player commandChat format ["Deleting %1",_selectedItemData];
29 | {
30 | _vehicle = _X;
31 | if(str(_vehicle) == _selectedItemData) then
32 | {
33 | {
34 | _x leaveVehicle _vehicle;
35 | } forEach crew _vehicle;
36 | deleteVehicle _vehicle;
37 | };
38 | }forEach _allVehicles;
39 |
40 | player commandChat "Vehicle Deleted";
41 |
42 | closeDialog 0;
43 | execVM "badmin\client\systems\adminPanel\vehicleManagement.sqf";
44 | };
45 |
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/tpmeto.sqf:
--------------------------------------------------------------------------------
1 | //AlPMaker
2 | _max = 10; snext = false; plist = []; pselect5 = "";
3 | {if ((_x != player) && (getPlayerUID _x != "")) then {plist set [count plist, name _x];};} forEach entities "CAManBase";
4 | {if ((count crew _x) > 0) then {{if ((_x != player) && (getPlayerUID _x != "")) then {plist set [count plist, name _x];};} forEach crew _x;};} foreach (entities "LandVehicle" + entities "Air" + entities "Ship");
5 | smenu =
6 | {
7 | _pmenu = [["Teleport Me To",true]];
8 | for "_i" from (_this select 0) to (_this select 1) do
9 | {_arr = [format['%1', plist select (_i)], [12], "", -5, [["expression", format ["pselect5 = plist select %1;", _i]]], "1", "1"]; _pmenu set [_i + 2, _arr];};
10 | if (count plist > (_this select 1)) then {_pmenu set [(_this select 1) + 2, ["Next", [13], "", -5, [["expression", "snext = true;"]], "1", "1"]];}
11 | else {_pmenu set [(_this select 1) + 2, ["", [-1], "", -5, [["expression", ""]], "1", "0"]];};
12 | _pmenu set [(_this select 1) + 3, ["Exit", [13], "", -5, [["expression", "pselect5 = 'exit';"]], "1", "1"]];
13 | showCommandingMenu "#USER:_pmenu";
14 | };
15 | _j = 0; _max = 10; if (_max>9) then {_max = 10;};
16 | while {pselect5 == ""} do
17 | {
18 | [_j, (_j + _max) min (count plist)] call smenu; _j = _j + _max;
19 | WaitUntil {pselect5 != "" or snext};
20 | snext = false;
21 | };
22 | if (pselect5 != "exit") then
23 | {
24 | _name = pselect5;
25 | {
26 | if (isPlayer _x && (name _x == _name)) then {
27 | vehicle player setPos (position _x);
28 | }
29 | } forEach playableUnits;
30 | };
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/tptome.sqf:
--------------------------------------------------------------------------------
1 | //AlPMaker
2 | _max = 10; snext = false; plist = []; pselect5 = "";
3 | {if ((_x != player) && (getPlayerUID _x != "")) then {plist set [count plist, name _x];};} forEach entities "CAManBase";
4 | {if ((count crew _x) > 0) then {{if ((_x != player) && (getPlayerUID _x != "")) then {plist set [count plist, name _x];};} forEach crew _x;};} foreach (entities "LandVehicle" + entities "Air" + entities "Ship");
5 | smenu =
6 | {
7 | _pmenu = [["Teleport To Me",true]];
8 | for "_i" from (_this select 0) to (_this select 1) do
9 | {_arr = [format['%1', plist select (_i)], [12], "", -5, [["expression", format ["pselect5 = plist select %1;", _i]]], "1", "1"]; _pmenu set [_i + 2, _arr];};
10 | if (count plist > (_this select 1)) then {_pmenu set [(_this select 1) + 2, ["Next", [13], "", -5, [["expression", "snext = true;"]], "1", "1"]];}
11 | else {_pmenu set [(_this select 1) + 2, ["", [-1], "", -5, [["expression", ""]], "1", "0"]];};
12 | _pmenu set [(_this select 1) + 3, ["Exit", [13], "", -5, [["expression", "pselect5 = 'exit';"]], "1", "1"]];
13 | showCommandingMenu "#USER:_pmenu";
14 | };
15 | _j = 0; _max = 10; if (_max>9) then {_max = 10;};
16 | while {pselect5 == ""} do
17 | {
18 | [_j, (_j + _max) min (count plist)] call smenu; _j = _j + _max;
19 | WaitUntil {pselect5 != "" or snext};
20 | snext = false;
21 | };
22 | if (pselect5 != "exit") then
23 | {
24 | _name = pselect5;
25 | {
26 | if (isPlayer _x && (name _x == _name)) then {
27 | vehicle _x setPos (position player);
28 | }
29 | } forEach playableUnits;
30 | };
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/playerMenu.sqf:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | // @file Version: 1.0
5 | // @file Name: playerMenu.sqf
6 | // @file Author: [404] Deadbeat
7 | // @file Created: 20/11/2012 05:19
8 | // @file Args:
9 | // bAdmin Exile by Biabock
10 |
11 | #define playerMenuDialog 55500
12 | #define playerMenuPlayerList 55505
13 |
14 | disableSerialization;
15 |
16 | private ["_start","_dialog","_playerListBox","_decimalPlaces","_health","_namestr","_index","_punishCount","_side"];
17 | _uid = getPlayerUID player;
18 | if (_uid call isAdmin) then
19 | {
20 | _start = createDialog "PlayersMenu";
21 | _punishCount = 0;
22 | _lockedSide = "None";
23 | _dialog = findDisplay playerMenuDialog;
24 | _playerListBox = _dialog displayCtrl playerMenuPlayerList;
25 |
26 | {
27 | _uid = getPlayerUID _x;
28 | {if((_x select 0) == _uid) then {_punishCount = (_x select 1);};}forEach pvar_teamKillList;
29 | {if((_x select 0) == _uid) then {if(_x select 1 == WEST) then {_lockedSide = "BLUFOR";};if(_x select 1 == EAST) then {_lockedSide = "OPFOR";};};}forEach pvar_teamSwitchList;
30 | if(side _x == west) then {_side = "BLUFOR";};
31 | if(side _x == east) then {_side = "OPFOR";};
32 | if(side _x == INDEPENDENT) then {_side = "Independent";};
33 | _namestr = name(_x) + " [UID:" + getplayerUID(_x) + "]";
34 | _index = _playerListBox lbAdd _namestr;
35 | _playerListBox lbSetData [_index, str(_x)];
36 | _punishCount = 0;
37 | } forEach playableUnits;
38 | };
39 |
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/isAdmin.sqf:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | // @file Version: 1.0
5 | // @file Name: isAdmin.sqf
6 | // @file Author: AgentRev
7 | // @file Created: 13/06/2013 18:02
8 | // bAdmin Exile by Biabock
9 |
10 | private ["_result", "_findUIDinArray"];
11 | _result = false;
12 |
13 | _findUIDinArray =
14 | {
15 | private ["_uid", "_adminType", "_adminList", "_found"];
16 |
17 | _uid = _this select 0;
18 | _adminType = _this select 1;
19 | _adminList = [];
20 | _found = false;
21 |
22 | switch (typeName _adminType) do
23 | {
24 | case (typeName {}): { _adminList = call _adminType };
25 | case (typeName []): { _adminList = _adminType };
26 | case (typeName 0):
27 | {
28 | switch (_adminType) do
29 | {
30 | case 1:
31 | {
32 | if (serverCommandAvailable "#kick") then { _found = true }
33 | else {_adminList = call lowAdmins };
34 | };
35 | case 2:
36 | {
37 | _adminList = call highAdmins;
38 | };
39 | case 3:
40 | {
41 | if (isServer || serverCommandAvailable "#exec ban") then { _found = true }
42 | else { _adminList = call serverOwners };
43 | };
44 | };
45 | };
46 | };
47 |
48 | _found || _uid in _adminList
49 | };
50 |
51 | if (typeName _this == "ARRAY") then
52 | {
53 | _result = _this call _findUIDinArray;
54 | }
55 | else
56 | {
57 | for "_i" from 1 to 3 do
58 | {
59 | _result = (_result || [_this, _i] call _findUIDinArray);
60 | };
61 | };
62 |
63 | _result
64 |
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/dialog/modMenu.hpp:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | #define modMenu_dialog 50004
5 | #define modMenu_option 50005
6 |
7 | class ModMenu
8 | {
9 | idd = modMenu_dialog;
10 | movingEnable=1;
11 | onLoad = "uiNamespace setVariable ['ModMenu', _this select 0]";
12 |
13 | class controlsBackground {
14 |
15 | class DebugMenu_background:w_RscPicture
16 | {
17 | idc=-1;
18 | colorText[] = {1, 1, 1, 1};
19 | colorBackground[] = {0,0,0,0};
20 | text = "#(argb,8,8,3)color(0,0,0,0.6)";
21 | x=0.28;
22 | y=0.10;
23 | w=0.3505;
24 | h=0.70;
25 | };
26 |
27 | class TopBar: w_RscPicture
28 | {
29 | idc = -1;
30 | colorText[] = {1, 1, 1, 1};
31 | colorBackground[] = {0,0,0,0};
32 | text = "#(argb,8,8,3)color(0.25,0.51,0.96,0.8)";
33 |
34 | x=0.28;
35 | y=0.10;
36 | w=0.3505;
37 | h=0.05;
38 | };
39 |
40 | class ModMenu_Title:w_RscText
41 | {
42 | idc=-1;
43 | text="bAdmin Menu";
44 | x=0.29;
45 | y=0.108;
46 | w=0.088;
47 | h=0.035;
48 | };
49 | };
50 |
51 | class controls {
52 |
53 | class ModMenu_options:w_Rsclist
54 | {
55 | idc = modMenu_option;
56 | x=0.30;
57 | y=0.18;
58 | w=0.31;
59 | h=0.49;
60 | };
61 |
62 | class ModMenu_activate:w_RscButton
63 | {
64 | idc=-1;
65 | text="Select";
66 | onButtonClick = "[0] execVM 'badmin\client\systems\adminPanel\optionSelect.sqf'";
67 | x=0.345;
68 | y=0.70;
69 | w=0.22;
70 | h=0.071;
71 | };
72 | };
73 | };
74 |
75 |
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/dialog/shopMenu.hpp:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | #define shopMenu_dialog 50002
5 | #define shopMenu_option 50003
6 |
7 | class ShopMenu
8 | {
9 | idd = shopMenu_option;
10 | movingEnable=1;
11 | onLoad = "uiNamespace setVariable ['ShopMenu', _this select 0]";
12 |
13 | class controlsBackground {
14 |
15 | class ShopMenu_background:w_RscPicture
16 | {
17 | idc=-1;
18 | colorText[] = {1, 1, 1, 1};
19 | colorBackground[] = {0,0,0,0};
20 | text = "#(argb,8,8,3)color(0,0,0,0.6)";
21 | x=0.28;
22 | y=0.10;
23 | w=0.3505;
24 | h=0.70;
25 | };
26 |
27 | class TopBar: w_RscPicture
28 | {
29 | idc = -1;
30 | colorText[] = {1, 1, 1, 1};
31 | colorBackground[] = {0,0,0,0};
32 | text = "#(argb,8,8,3)color(0.25,0.51,0.96,0.8)";
33 |
34 | x=0.28;
35 | y=0.10;
36 | w=0.3505;
37 | h=0.05;
38 | };
39 |
40 | class ShopMenu_Title:w_RscText
41 | {
42 | idc=-1;
43 | text="Shop Menu";
44 | x=0.29;
45 | y=0.108;
46 | w=0.088;
47 | h=0.035;
48 | };
49 | };
50 |
51 | class controls {
52 |
53 | class ShopMenu_options:w_Rsclist
54 | {
55 | idc = shopMenu_option;
56 | x=0.30;
57 | y=0.18;
58 | w=0.31;
59 | h=0.49;
60 | };
61 |
62 | class ShopMenu_activate:w_RscButton
63 | {
64 | idc=-1;
65 | text="Select";
66 | onButtonClick = "[2] execVM 'badmin\client\systems\adminPanel\optionSelect.sqf'";
67 | x=0.345;
68 | y=0.70;
69 | w=0.22;
70 | h=0.071;
71 | };
72 | };
73 | };
74 |
75 |
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/dialog/debugMenu.hpp:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | #define debugMenu_dialog 50002
5 | #define debugMenu_option 50003
6 |
7 | class DebugMenu
8 | {
9 | idd = debugMenu_dialog;
10 | movingEnable=1;
11 | onLoad = "uiNamespace setVariable ['DebugMenu', _this select 0]";
12 |
13 | class controlsBackground {
14 |
15 | class DebugMenu_background:w_RscPicture
16 | {
17 | idc=-1;
18 | colorText[] = {1, 1, 1, 1};
19 | colorBackground[] = {0,0,0,0};
20 | text = "#(argb,8,8,3)color(0,0,0,0.6)";
21 | x=0.28;
22 | y=0.10;
23 | w=0.3505;
24 | h=0.70;
25 | };
26 |
27 | class TopBar: w_RscPicture
28 | {
29 | idc = -1;
30 | colorText[] = {1, 1, 1, 1};
31 | colorBackground[] = {0,0,0,0};
32 | text = "#(argb,8,8,3)color(0.25,0.51,0.96,0.8)";
33 |
34 | x=0.28;
35 | y=0.10;
36 | w=0.3505;
37 | h=0.05;
38 | };
39 |
40 | class DebugMenu_Title:w_RscText
41 | {
42 | idc=-1;
43 | text="TP Menu";
44 | x=0.29;
45 | y=0.108;
46 | w=0.088;
47 | h=0.035;
48 | };
49 | };
50 |
51 | class controls {
52 |
53 | class DebugMenu_options:w_Rsclist
54 | {
55 | idc = debugMenu_option;
56 | x=0.30;
57 | y=0.18;
58 | w=0.31;
59 | h=0.49;
60 | };
61 |
62 | class DebugMenu_activate:w_RscButton
63 | {
64 | idc=-1;
65 | text="Select";
66 | onButtonClick = "[2] execVM 'badmin\client\systems\adminPanel\optionSelect.sqf'";
67 | x=0.345;
68 | y=0.70;
69 | w=0.22;
70 | h=0.071;
71 | };
72 | };
73 | };
74 |
75 |
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/dialog/adminMenu.hpp:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | #define adminMenu_dialog 50000
5 | #define adminMenu_option 50001
6 |
7 | class AdminMenu
8 | {
9 | idd = adminMenu_dialog;
10 | movingEnable=1;
11 | onLoad = "uiNamespace setVariable ['AdminMenu', _this select 0]";
12 |
13 | class controlsBackground {
14 |
15 | class AdminMenu_background:w_RscPicture
16 | {
17 | idc=-1;
18 | colorText[] = {1, 1, 1, 1};
19 | colorBackground[] = {0,0,0,0};
20 | text = "#(argb,8,8,3)color(0,0,0,0.6)";
21 | x=0.28;
22 | y=0.10;
23 | w=0.3505;
24 | h=0.70;
25 | };
26 |
27 | class TopBar: w_RscPicture
28 | {
29 | idc = -1;
30 | colorText[] = {1, 1, 1, 1};
31 | colorBackground[] = {0,0,0,0};
32 | text = "#(argb,8,8,3)color(0.25,0.51,0.96,0.8)";
33 |
34 | x=0.28;
35 | y=0.10;
36 | w=0.3505;
37 | h=0.05;
38 | };
39 |
40 | class AdminMenu_Title:w_RscText
41 | {
42 | idc=-1;
43 | text="bAdmin Menu";
44 | x=0.29;
45 | y=0.108;
46 | w=0.088;
47 | h=0.035;
48 | };
49 | };
50 |
51 | class controls {
52 |
53 | class AdminMenu_options:w_Rsclist
54 | {
55 | idc = adminMenu_option;
56 | x=0.30;
57 | y=0.18;
58 | w=0.31;
59 | h=0.49;
60 | };
61 |
62 | class AdminMenu_activate:w_RscButton
63 | {
64 | idc=-1;
65 | text="Select";
66 | onButtonClick = "[1] execVM 'badmin\client\systems\adminPanel\optionSelect.sqf'";
67 | x=0.345;
68 | y=0.70;
69 | w=0.22;
70 | h=0.071;
71 | };
72 | };
73 | };
74 |
75 |
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/playerTags.sqf:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | // @file Version: 1.0
5 | // @file Name: playerTags.sqf
6 | // @file Author: Battleguns, AgentRev
7 | // @file Created: 20/11/2012 05:19
8 | // @file Args:
9 | // bAdmin Exile by Biabock
10 |
11 | _uid = getPlayerUID player;
12 | if (_uid call isAdmin) then
13 | {
14 | if (isNil "adminPlayerMarkers") then { adminPlayerMarkers = false };
15 |
16 | if (!adminPlayerMarkers) then
17 | {
18 | adminPlayerMarkers = true;
19 | hint "Player Markers ON";
20 | }
21 | else
22 | {
23 | adminPlayerMarkers = false;
24 | hint "Player Markers OFF";
25 | };
26 |
27 | setGroupIconsVisible [true, true];
28 | while {adminPlayerMarkers} do
29 | {
30 | {
31 | if (isPlayer _x) then
32 | {
33 | private ["_groupIcon", "_iconColor"];
34 |
35 | switch (side _x) do
36 | {
37 | case BLUFOR: { _groupIcon = "b_inf"; _iconColor = [0, 0, 1, 1] };
38 | case OPFOR: { _groupIcon = "o_inf"; _iconColor = [1, 0, 0, 1] };
39 | case INDEPENDENT: { _groupIcon = "n_inf"; _iconColor = [1, 1, 0, 1] };
40 | default { _groupIcon = "c_unknown"; _iconColor = [1, 1, 1, 1] };
41 | };
42 |
43 | clearGroupIcons group _x;
44 | group _x addGroupIcon [_groupIcon];
45 | group _x setGroupIconParams [_iconColor, format ["%1 (%2m)", name _x, round (_x distance player)], 1, true];
46 | };
47 | } forEach playableUnits;
48 |
49 | sleep 0.5;
50 | };
51 |
52 | { clearGroupIcons group _x } forEach playableUnits;
53 | };
54 |
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/dialog/serverAdminMenu.hpp:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | #define serverAdminMenu_dialog 50006
5 | #define serverAdminMenu_option 50007
6 |
7 | class ServerAdminMenu
8 | {
9 | idd = serverAdminMenu_dialog;
10 | movingEnable=1;
11 | onLoad = "uiNamespace setVariable ['ServerAdminMenu', _this select 0]";
12 |
13 | class controlsBackground {
14 |
15 | class DebugMenu_background:w_RscPicture
16 | {
17 | idc=-1;
18 | colorText[] = {1, 1, 1, 1};
19 | colorBackground[] = {0,0,0,0};
20 | text = "#(argb,8,8,3)color(0,0,0,0.6)";
21 | x=0.28;
22 | y=0.10;
23 | w=0.3505;
24 | h=0.70;
25 | };
26 |
27 | class TopBar: w_RscPicture
28 | {
29 | idc = -1;
30 | colorText[] = {1, 1, 1, 1};
31 | colorBackground[] = {0,0,0,0};
32 | text = "#(argb,8,8,3)color(0.25,0.51,0.96,0.8)";
33 |
34 | x=0.28;
35 | y=0.10;
36 | w=0.3505;
37 | h=0.05;
38 | };
39 |
40 | class ServerAdminMenu_Title:w_RscText
41 | {
42 | idc=-1;
43 | text="bAdmin Menu";
44 | x=0.29;
45 | y=0.108;
46 | w=0.088;
47 | h=0.035;
48 | };
49 | };
50 |
51 | class controls {
52 |
53 | class ServerAdminMenu_options:w_Rsclist
54 | {
55 | idc = serverAdminMenu_option;
56 | x=0.30;
57 | y=0.18;
58 | w=0.31;
59 | h=0.49;
60 | };
61 |
62 | class ServerAdminMenu_activate:w_RscButton
63 | {
64 | idc=-1;
65 | text="Select";
66 | onButtonClick = "[1] execVM 'badmin\client\systems\adminPanel\optionSelect.sqf'";
67 | x=0.345;
68 | y=0.70;
69 | w=0.22;
70 | h=0.071;
71 | };
72 | };
73 | };
74 |
75 |
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/vehicleManagement.sqf:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | // @file Version: 1.0
5 | // @file Name: vehicleManagement.sqf
6 | // @file Author: [404] Deadbeat
7 | // @file Created: 20/11/2012 05:19
8 | // @file Args:
9 | // bAdmin Exile by Biabock
10 |
11 | #define vehicleManagementDialog 12000
12 | #define vehicleManagementVehicleCount 12002
13 | #define vehicleManagementCivButton 12007
14 | #define vehicleManagementHeliButton 12008
15 | #define vehicleManagementPlaneButton 12009
16 | #define vehicleManagementTankButton 12010
17 |
18 | disableSerialization;
19 |
20 | private ["_start","_dialog","_vehicleCountText","_vehicleType","_vehicleCount","_uid","_vehicleCivBtn","_vehicleHeliBtn","_vehiclePlaneBtn","_vehicleTankBtn"];
21 | _uid = getPlayerUID player;
22 | if (_uid call isAdmin) then
23 | {
24 | _start = createDialog "VehicleManagement";
25 |
26 | _dialog = findDisplay vehicleManagementDialog;
27 | _vehicleCountText = _dialog displayCtrl vehicleManagementVehicleCount;
28 | _vehicleCivBtn = _dialog displayCtrl vehicleManagementCivButton;
29 | _vehicleHeliBtn = _dialog displayCtrl vehicleManagementHeliButton;
30 | _vehiclePlaneBtn = _dialog displayCtrl vehicleManagementPlaneButton;
31 | _vehicleTankBtn = _dialog displayCtrl vehicleManagementTankButton;
32 |
33 | _uid = getPlayerUID player;
34 | _vehicleCount = 0;
35 | {
36 | _vehicleType = Format["%1",typeOf _x];
37 | if(((_vehicleType isKindOf "LandVehicle") OR (_vehicleType isKindOf "Air") OR (_vehicleType isKindOf "Ship")) AND !(_vehicleType isKindOf "StaticWeapon")) then {
38 | _vehicleCount = _vehicleCount + 1;
39 | };
40 | }forEach vehicles;
41 |
42 | _vehicleCountText ctrlSetText format["Vehicles on Server: %1", _vehicleCount];
43 |
44 | /*if((_uid in moderators)) then
45 | {
46 | _vehicleCivBtn ctrlShow false;
47 | _vehicleHeliBtn ctrlShow false;
48 | _vehiclePlaneBtn ctrlShow false;
49 | _vehicleTankBtn ctrlShow false;
50 | };*/
51 | };
52 |
--------------------------------------------------------------------------------
/mission-files/badmin/server/admins.sqf:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | // @file Name: server\admins.sqf
5 | // bAdmin Exile by Biabock
6 |
7 | if (!isServer) exitWith {};
8 |
9 | if (loadFile (externalConfigFolder + "\admins.sqf") != "") then
10 | {
11 | call compile preprocessFileLineNumbers (externalConfigFolder + "\admins.sqf");
12 | diag_log "bAdmin - External admins.sqf loaded";
13 | }
14 | else
15 | {
16 | // Admin menu (U key) access levels
17 |
18 | /*******************************************************
19 | Player UID examples :
20 |
21 | "1234567887654321", // Meatwad
22 | "8765432112345678", // Master Shake
23 | "1234876543211234", // Frylock
24 | "1337133713371337" // Carl
25 |
26 | Important: The player UID must always be placed between
27 | double quotes (") and all lines need to have
28 | a comma (,) except the last one.
29 | ********************************************************/
30 |
31 | // Low Administrators: manage & spectate players, remove hacked vehicles
32 | lowAdmins = compileFinal str
33 | [
34 | // Put player UIDs here
35 | ];
36 |
37 | // High Administrators: manage & spectate players, remove hacked vehicles, show player tags
38 | highAdmins = compileFinal str
39 | [
40 | // Put player UIDs here
41 | ];
42 |
43 | // Server Owners: access to everything, including god mode, money, guns, and vehicles
44 | serverOwners = compileFinal str
45 | [
46 | // Put player UIDs here
47 | ];
48 |
49 | /********************************************************/
50 | diag_log "bAdmin - ERROR! \bAdmin_settings\admins.sqf not found!";
51 | diag_log "bAdmin - This folder must be in the server directory";
52 | };
53 |
54 | if (typeName lowAdmins == "ARRAY") then { lowAdmins = compileFinal str lowAdmins };
55 | if (typeName highAdmins == "ARRAY") then { highAdmins = compileFinal str highAdmins };
56 | if (typeName serverOwners == "ARRAY") then { serverOwners = compileFinal str serverOwners };
57 |
58 | publicVariable "lowAdmins";
59 | publicVariable "highAdmins";
60 | publicVariable "serverOwners";
61 |
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/importValues.sqf:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | // @file Version: 1.0
5 | // @file Name: importValues.sqf
6 | // @file Author: [404] Deadbeat
7 | // @file Created: 20/11/2012 05:19
8 | // @file Args:
9 | // bAdmin Exile by Biabock
10 |
11 | #define playerMenuDialog 55500
12 | #define playerMenuPlayerSkin 55501
13 | #define playerMenuPlayerGun 55502
14 | #define playerMenuPlayerItems 55503
15 | #define playerMenuPlayerPos 55504
16 | #define playerMenuPlayerList 55505
17 | #define playerMenuPlayerObject 55507
18 | #define playerMenuPlayerHealth 55508
19 |
20 | disableSerialization;
21 |
22 | private ["_index1","_type1","_data1"];
23 | _uid = getPlayerUID player;
24 | if (_uid call isAdmin) then
25 | {
26 | _index1 = _this select 1;
27 | _type1 = _this select 0;
28 |
29 | _dialogPlayer = findDisplay playerMenuDialog;
30 | _skinText = _dialogPlayer displayCtrl playerMenuPlayerSkin;
31 | _currentGunText = _dialogPlayer displayCtrl playerMenuPlayerGun;
32 | _itemsText = _dialogPlayer displayCtrl playerMenuPlayerItems;
33 | _posText = _dialogPlayer displayCtrl playerMenuPlayerPos;
34 | _healthText = _dialogPlayer displayCtrl playerMenuPlayerHealth;
35 | _objectText = _dialogPlayer displayCtrl playerMenuPlayerObject;
36 | _playerListBox = _dialogPlayer displayCtrl playerMenuPlayerList;
37 |
38 | _data1 = _playerListBox lbData _index1;
39 | {
40 | if (str(_x) == _data1) exitwith {
41 | _itemsText ctrlSetText format["Items: %1",weapons _x];
42 | _currentGunText ctrlSetText format["Money: %1 Score: %2",_x getVariable "ExileMoney", _x getVariable "ExileScore"];
43 | _skinText ctrlSetText format["Skin: %1",typeOf(_x)];
44 | _posText ctrlSetText format["Position: %1",position _x];
45 | _objectText ctrlSetText format["Slot: %1",_x];
46 |
47 | //Calculate Health 0 - 100
48 | _decimalPlaces = 2;
49 | _health = damage _x;
50 | _health = round (_health * (10 ^ _decimalPlaces)) / (10 ^ _decimalPlaces);
51 | _health = 100 - (_health * 100);
52 |
53 | _healthText ctrlSetText format["Health: %1",_health];
54 | };
55 | } foreach playableUnits;
56 | };
57 |
--------------------------------------------------------------------------------
/mission-files/badmin/globalCompile.sqf:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | // @file Version: 1.0
5 | // @file Name: globalCompile.sqf
6 | // @file Author: AgentRev, MercyfulFate
7 | // @file Created: 07/09/2013 15:06
8 | // bAdmin Exile by Biabock
9 |
10 | // The purpose of this script is to compile certain functions both on client and server.
11 |
12 | private ["_DEBUG"];
13 | _DEBUG = format ["%1", _this select 0];
14 |
15 | // Compile a function from a file.
16 | // if in debug mode, the function will be dyncamically compiled every call.
17 | // if not in debug mode, the function will be compileFinal'd
18 | // example: my_fnc_name = ["path/to/folder", "my_fnc.sqf"] call mf_compile;
19 | // example: my_fnc_name = ["path/to/folder/my_fnc.sqf"] call mf_compile;
20 | // later in the code you can simply use call my_fnc_name;
21 | // you can also pass raw code to get it compileFinal'd
22 | // example: my_fnc_name = {diag_log "hey"} call mf_compile;
23 | mf_compile = compileFinal
24 | ('
25 | private ["_path", "_isDebug", "_code"];
26 | _path = "";
27 | _isDebug = ' + _DEBUG + ';
28 |
29 | switch (toUpper typeName _this) do {
30 | case "STRING": {
31 | _path = _this;
32 | };
33 | case "ARRAY": {
34 | _path = format["%1\%2", _this select 0, _this select 1];
35 | };
36 | case "CODE": {
37 | _code = toArray str _this;
38 | _code set [0, (toArray " ") select 0];
39 | _code set [count _code - 1, (toArray " ") select 0];
40 | };
41 | };
42 |
43 | if (isNil "_code") then {
44 | if (_isDebug) then {
45 | compile format ["call compile preProcessFileLineNumbers ""%1""", _path]
46 | } else {
47 | compileFinal preProcessFileLineNumbers _path
48 | };
49 | } else {
50 | if (_isDebug) then {
51 | compile toString _code
52 | } else {
53 | compileFinal toString _code
54 | };
55 | };
56 | ');
57 |
58 | // Simple command I use to make initialization scripts clean and simple.
59 | // uses mf_ namespace to avoid any issues.
60 | /*mf_init =
61 | {
62 | private "_path";
63 | _path = if (typeName _this == "STRING") then {
64 | _this
65 | } else {
66 | format ["%1\%2", _this select 0, _this select 1]
67 | };
68 | _path call compile preProcessFileLineNumbers format ["%1\init.sqf", _path];
69 | } call mf_compile;*/
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/optionSelect.sqf:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | // @file Version: 1.0
5 | // @file Name: optionSelect.sqf
6 | // @file Author: [404] Deadbeat
7 | // @file Created: 20/11/2012 05:19
8 | // bAdmin Exile by Biabock
9 |
10 | #define debugMenu_option 50003
11 | #define adminMenu_option 50001
12 | disableSerialization;
13 |
14 | private ["_panelType","_displayAdmin","_displayDebug","_displayShop","_adminSelect","_debugSelect","_shopSelect","_Poptabs","_Score"];
15 | _uid = getPlayerUID player;
16 | if (_uid call isAdmin) then
17 | {
18 | _panelType = _this select 0;
19 |
20 | _displayAdmin = uiNamespace getVariable ["AdminMenu", displayNull];
21 | _displayDebug = uiNamespace getVariable ["DebugMenu", displayNull]; //tp menu
22 | _displayShop = uiNamespace getVariable ["ShopMenu", displayNull];
23 |
24 | switch (true) do
25 | {
26 | case (!isNull _displayAdmin): //Admin panel
27 | {
28 | _adminSelect = _displayAdmin displayCtrl adminMenu_option;
29 |
30 | switch (lbCurSel _adminSelect) do
31 | {
32 | case 0: //Player Menu
33 | {
34 | closeDialog 0;
35 | execVM "badmin\client\systems\adminPanel\playerMenu.sqf";
36 | };
37 | case 1: //Tags
38 | {
39 | closeDialog 0;
40 | execVM "badmin\client\systems\adminPanel\playerTags.sqf";
41 | };
42 | case 2: //Shop
43 | {
44 | closeDialog 0;
45 | execVM "badmin\client\systems\adminPanel\loadShopMenu.sqf";
46 | };
47 | case 3: //Add Money
48 | {
49 | _Poptabs = 10000;
50 | ExileClientPlayerMoney = ExileClientPlayerMoney + _Poptabs;
51 | systemChat "Added 10000 Poptabs for you";
52 | };
53 | case 4: //Add Score
54 | {
55 | _Score = 10000;
56 | ExileClientPlayerScore = ExileClientPlayerScore + _Score;
57 | systemChat "Added 10000 Score for you";
58 | };
59 | case 5: //TP Menu
60 | {
61 | closeDialog 0;
62 | execVM "badmin\client\systems\adminPanel\loadDebugMenu.sqf";
63 | };
64 | case 6: //Server FPS
65 | {
66 | hint format["Server FPS: %1",serverFPS];
67 | };
68 | case 7: // toggle God mode
69 | {
70 | execVM "badmin\client\systems\adminPanel\toggleGodMode.sqf";
71 | };
72 | };
73 | };
74 | case (!isNull _displayDebug): //TP panel
75 | {
76 | _debugSelect = _displayDebug displayCtrl debugMenu_option;
77 |
78 | switch (lbCurSel _debugSelect) do
79 | {
80 | case 0: //TP Map Position
81 | {
82 | closeDialog 0;
83 | onMapSingleClick "vehicle player setPos _pos; onMapSingleClick '';true;";
84 | hint "Click on map to teleport";
85 | };
86 | case 1: //TP Me to Player
87 | {
88 | closeDialog 0;
89 | execVM "badmin\client\systems\adminPanel\tpmeto.sqf";
90 | };
91 | case 2: //TP Player to Me
92 | {
93 | closeDialog 0;
94 | execVM "badmin\client\systems\adminPanel\tptome.sqf";
95 | };
96 | };
97 | };
98 | case (!isNull _displayShop): //Shop panel
99 | {
100 | _shopSelect = _displayShop displayCtrl shopMenu_option;
101 |
102 | switch (lbCurSel _debugSelect) do
103 | {
104 | case 0: //soon
105 | {
106 | closeDialog 0;
107 | systemChat "Not Implemented Yet";
108 | };
109 | case 1: //soon
110 | {
111 | closeDialog 0;
112 | systemChat "Not Implemented Yet";
113 | };
114 | case 2: //soon
115 | {
116 | closeDialog 0;
117 | systemChat "Not Implemented Yet";
118 | };
119 | case 3: //soon
120 | {
121 | closeDialog 0;
122 | systemChat "Not Implemented Yet";
123 | };
124 | };
125 | };
126 | };
127 | };
128 |
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/playerSelect.sqf:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | // @file Version: 1.0
5 | // @file Name: playerSelect.sqf
6 | // @file Author: [404] Deadbeat
7 | // @file Created: 20/11/2012 05:19
8 | // @file Args:
9 | // bAdmin Exile by Biabock
10 |
11 | #define playerMenuDialog 55500
12 | #define playerMenuPlayerList 55505
13 | #define playerMenuSpectateButton 55506
14 | #define playerMenuWarnMessage 55509
15 |
16 | disableSerialization;
17 |
18 | private ["_dialog","_playerListBox","_spectateButton","_switch","_index","_modSelect","_playerData","_target","_check","_spectating","_camadm","_rnum","_warnText","_targetUID","_playerName"];
19 | _uid = getPlayerUID player;
20 | if (_uid call isAdmin) then
21 | {
22 | _dialog = findDisplay playerMenuDialog;
23 | _playerListBox = _dialog displayCtrl playerMenuPlayerList;
24 | _spectateButton = _dialog displayCtrl playerMenuSpectateButton;
25 | _warnMessage = _dialog displayCtrl playerMenuWarnMessage;
26 |
27 | _switch = _this select 0;
28 | _index = lbCurSel _playerListBox;
29 | _playerData = _playerListBox lbData _index;
30 |
31 | {
32 | if (str(_x) == _playerData) then {
33 | _target = _x;
34 | _check = 1;
35 | };
36 | } forEach playableUnits;
37 |
38 | if (_check == 0) exitWith{};
39 |
40 | switch (_switch) do
41 | {
42 | case 0: //Spectate
43 | {
44 | if (!isNil "_target") then
45 | {
46 | _spectating = ctrlText _spectateButton;
47 | if (_spectating == "Spectate") then
48 | {
49 | if (!([player] call camera_enabled)) then
50 | {
51 | [] call camera_toggle;
52 | };
53 |
54 | [player, _target] call camera_attach_to_target;
55 | player commandChat format ["Viewing %1.", name _target];
56 | _spectateButton ctrlSetText "Spectating";
57 | } else {
58 | _spectateButton ctrlSetText "Spectate";
59 | player commandChat format ["No Longer Viewing.", name _target];
60 |
61 | if ([player] call camera_enabled) then
62 | {
63 | [] call camera_toggle;
64 | };
65 | };
66 | };
67 | };
68 | case 1: //Warn
69 | {
70 | /*_warnText = ctrlText _warnMessage;
71 | _playerName = name player;
72 | [format ["Message from Admin: %1", _warnText], "A3W_fnc_titleTextMessage", _target, false] call A3W_fnc_MP;*/
73 | systemChat "Option Disabled";
74 | };
75 | case 2: //Kill
76 | {
77 | _target setDamage 1;
78 | };
79 | case 3: //Unlock Team Switcher
80 | {
81 | /*pvar_teamSwitchUnlock = getPlayerUID _target;
82 | publicVariableServer "pvar_teamSwitchUnlock";*/
83 | systemChat "Option Disabled";
84 | };
85 | case 4: //Unlock Team Killer
86 | {
87 | /*pvar_teamKillUnlock = getPlayerUID _target;
88 | publicVariableServer "pvar_teamKillUnlock";*/
89 | systemChat "Option Disabled";
90 | };
91 | case 5: //Remove All Money
92 | {
93 | /*_targetUID = getPlayerUID _target;
94 | {
95 | if(getPlayerUID _x == _targetUID) exitWith
96 | {
97 | _x setVariable["cmoney",0,true];
98 | };
99 | }forEach playableUnits;*/
100 | systemChat "Option Disabled";
101 | };
102 | case 6: //Remove All Weapons
103 | {
104 | /*_targetUID = getPlayerUID _target;
105 | {
106 | if(getPlayerUID _x == _targetUID) exitWith
107 | {
108 | removeAllWeapons _x;
109 | };
110 | }forEach playableUnits;*/
111 | ["This option has been disabled due to having never worked at all in the first place."] spawn BIS_fnc_guiMessage;
112 | };
113 | case 7: //Check Player Gear
114 | {
115 | /*_targetUID = getPlayerUID _target;
116 | {
117 | if(getPlayerUID _x == _targetUID) exitWith
118 | {
119 | createGearDialog [_x, "RscDisplayInventory"];
120 | };
121 | }forEach playableUnits;*/
122 | ["This option has been disabled due to having never worked at all in the first place."] spawn BIS_fnc_guiMessage;
123 | };
124 | };
125 | };
126 |
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/objectSearchInteraction.sqf:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | // objectSearchInteraction
5 | // bAdmin Exile by Biabock
6 |
7 | #define objectSearchDialog 55600
8 | #define objectSearchFindButton 55601
9 | #define objectSearchFindTexteditBox 55602
10 | #define objectSearchObjectList 55603
11 | #define objectSearchTeleportButton 55604
12 | #define objectSearchCancelButton 55605
13 |
14 | #define OBJECT_SEARCH_ACTION_FIND 0
15 | #define OBJECT_SEARCH_ACTION_TELEPORT 1
16 | #define OBJECT_SEARCH_ACTION_CLEAR_MAP 2
17 |
18 | // Limit to 1000m to stop this being crazy laggy
19 | #define OBJECT_SEARCH_RADIUS 1000
20 |
21 | disableSerialization;
22 |
23 | private ["_uid"];
24 |
25 | _uid = getPlayerUID player;
26 | if (_uid call isAdmin) then
27 | {
28 | private ["_display", "_objectSearchTermCtrl", "_objectListBoxCtrl", "_switch"];
29 | _display = findDisplay objectSearchDialog;
30 | // Get handles on the UI elements we need
31 | _objectSearchTermCtrl = _display displayCtrl objectSearchFindTexteditBox;
32 | _objectListBoxCtrl = _display displayCtrl objectSearchObjectList;
33 |
34 | _switch = _this select 0;
35 |
36 | switch (_switch) do
37 | {
38 | case OBJECT_SEARCH_ACTION_FIND:
39 | {
40 | private ["_objectClass", "_objects"];
41 | lbClear _objectListBoxCtrl;
42 | // The thing we're searching for
43 | _objectClass = ctrlText _objectSearchTermCtrl;
44 |
45 | // Set our global so we can default the UI to that upon next open
46 | objectSearchLastTermEntered = _objectClass;
47 |
48 | //diag_log format["Search class is %1", _objectClass];
49 |
50 | // Perform the search.
51 | _objects = nearestObjects [position player, [_objectClass], OBJECT_SEARCH_RADIUS];
52 |
53 | {
54 | private ["_name","_objPos","_dist","_name","_str","_index","_marker"];
55 | _name = gettext(configFile >> "CfgVehicles" >> (typeOf _x) >> "displayName");
56 | _objPos = getPosATL _x;
57 | _dist = floor(player distance _x);
58 | _str = format["%1 %2m away at %3", _name, _dist, _objPos];
59 | _index = _objectListBoxCtrl lbAdd _str;
60 | _objectListBoxCtrl lbSetData [_index, str(_objPos)];
61 | //diag_log format["Setting data to %1", str(_objPos)];
62 |
63 | _marker = "objectSearchMapMarker" + (str _forEachIndex);
64 | _marker = createMarkerLocal [_marker,_objPos];
65 | _marker setMarkerTypeLocal "waypoint";
66 | _marker setMarkerPosLocal _objPos;
67 | _marker setMarkerColorLocal "ColorBlue";
68 | _marker setMarkerTextLocal _name;
69 | objectSearchMapMarkers pushBack _marker;
70 | } forEach _objects;
71 |
72 | if (count _objects > 0) then {
73 | player globalChat format["Added %1 entries on the map", count _objects];
74 | };
75 | };
76 | case OBJECT_SEARCH_ACTION_TELEPORT:
77 | {
78 | private ["_index", "_positionStr", "_objPos", "_safePos", "_playerPos", "_vector"];
79 | _index = lbCurSel _objectListBoxCtrl;
80 | _positionStr = _objectListBoxCtrl lbData _index;
81 | // Convert the string back to the position array it was
82 | _objPos = call compile _positionStr;
83 | diag_log format["_objPos is %1", _objPos];
84 | // Find us somewhere safe to spawn close by
85 | _safePos = [_objPos,2,20,0.2,0,1,0,[],[[0,0], [0,0]]] call BIS_fnc_findSafePos;
86 | if (_safePos select 0 == 0 and _safePos select 1 == 0) exitWith {
87 | // fsp is shit
88 | player globalChat "BIS_fnc_findSafePos failed";
89 | };
90 |
91 | vehicle player setPos _safePos;
92 | _newPlayerPos = getPosATL player;
93 | _dir = [player, _objPos] call BIS_fnc_dirTo;
94 | player setDir _dir;
95 | player globalChat "Teleported to your object";
96 | };
97 | case OBJECT_SEARCH_ACTION_CLEAR_MAP:
98 | {
99 | if (count objectSearchMapMarkers > 0) then {
100 | {
101 | deleteMarkerLocal _x;
102 | } forEach objectSearchMapMarkers;
103 | objectSearchMapMarkers = [];
104 | player globalChat "Map cleared";
105 | };
106 | };
107 | };
108 | };
109 |
--------------------------------------------------------------------------------
/mission-files/badmin/client/camera/macro.h:
--------------------------------------------------------------------------------
1 | //null abstraction
2 | #define _undefined objNull
3 |
4 | #define isARRAY(x) \
5 | (not(isNil {x}) && {typeName x == typeName []})
6 |
7 | #define isSTRING(x) \
8 | (not(isNil {x}) && {typeName x == typeName ""})
9 |
10 | #define isSCALAR(x) \
11 | (not(isNil {x}) && {typeName x == typeName 0})
12 |
13 | #define isBOOLEAN(x) \
14 | (not(isNil {x}) && {typeName x == typeName true})
15 |
16 | #define isOBJECT(x) \
17 | (not(isNil {x}) && {typeName x == typeName objNull})
18 |
19 | #define isCODE(x) \
20 | (not(isNil {x}) && {typeName x == typeName {}})
21 |
22 | #define isSIDE(x) \
23 | (not(isNil {x}) && {typeName x == typeName sideUnknown})
24 |
25 | #define isNullable(x) (false ||{ \
26 | not(isNil {x}) &&{ \
27 | private["_t"]; \
28 | _t = typeName x; \
29 | _t == typeName controlNull ||{ \
30 | _t == typeName displayNull ||{ \
31 | _t == typeName locationNull ||{ \
32 | _t == typeName taskNull ||{ \
33 | _t == typeName grpNull ||{ \
34 | _t == typeName objNull \
35 | }}}}}}})
36 |
37 | //safer version of isNull that will not crap out when passed number, array, code, string
38 | #define _isNull(x) (isNil {x} || ({isNullable(x) && {isNull x}}))
39 | #define undefined(x) _isNull(x)
40 | #define defined(x) (not(undefined(x)))
41 |
42 | #define getIf(cond,v1,v2) \
43 | (if (cond) then {v1} else {v2})
44 |
45 | #define getUnless(cond,v1,v2) \
46 | getIf(not(cond),v1,v2)
47 |
48 |
49 | #define OR(x,y) \
50 | getIf(defined(x),x,y)
51 |
52 | #define OR_ARRAY(v,d) (if (isARRAY(v)) then {v} else {d})
53 | #define OR_SCALAR(v,d) (if(isSCALAR(v)) then {v} else {d})
54 | #define OR_STRING(v,d) (if (isSTRING(v)) then {v} else {d})
55 | #define OR_BOOLEAN(v,d) (if(isBOOLEAN(v)) then {v} else {d})
56 | #define OR_OBJECT(v,d) (if(isOBJECT(v)) then {v} else {d})
57 | #define OR_SIDE(v,d) (if(isSIDE(v)) then {v} else {d})
58 | #define OR_CODE(v,d) (if(isCODE(v)) then {v} else {d})
59 |
60 | #define OR_POSITIVE(v,d) (if (isSCALAR(v) && {v > 0}) then {v} else {d})
61 |
62 |
63 | #define AND(x,y) \
64 | OR(v,y)
65 |
66 | #define def(x) \
67 | private[#x]
68 |
69 | #define init(x,v) def(x); \
70 | x = v
71 |
72 | #define setIf(cond,x,v1,v2) \
73 | x = if (cond) then {v1} else {v2}
74 |
75 | #define assignIf setIf
76 |
77 | #define setUnless(cond,x,v1,v2) \
78 | x = if (cond) then {v2} else {v1}
79 |
80 |
81 | #define assignUnless setUnless
82 |
83 | #define initIf(cond,x,v1,v2) \
84 | def(x); \
85 | setIf(cond,x,v1,v2)
86 |
87 | #define initUnless(cond,x,v1,v2) \
88 | def(x); \
89 | setUnless(cond,x,v1,v2)
90 |
91 |
92 | //Assign argument at index o to variable v if it's of type t, else default to d
93 | #define ARGV4(o,v,t,d) \
94 | private[#v]; \
95 | if (undefined(_this) ||{ \
96 | typeName _this != typeName [] ||{ \
97 | o >= (count _this) ||{ \
98 | v = _this select o; undefined(v) ||{ \
99 | (#t != "nil" && {typeName v != typeName t}) \
100 | }}}}) then { \
101 | v = d; \
102 | };
103 |
104 | //Assign argument at index o, to variable v if it's of type t, else default to nil
105 | #define ARGV3(o,v,t) ARGV4(o,v,t,nil)
106 |
107 | //Assign argument at index o to variable v, else default to nil
108 | #define ARGV2(o,v) ARGV3(o,v,nil)
109 |
110 |
111 | //Assign argument at index o to variable v if it's of type t, else exit with d
112 | #define ARGVX4(o,v,t,d) \
113 | private[#v]; \
114 | if (undefined(_this) ||{ \
115 | typeName _this != typeName [] ||{ \
116 | o >= (count _this) ||{ \
117 | v = _this select o; undefined(v) ||{ \
118 | (#t != "nil" && {typeName v != typeName t}) \
119 | }}}}) exitWith { \
120 | d \
121 | };
122 |
123 | //Assign argument at index o, to variable v if it's of type t, else exit with nil
124 | #define ARGVX3(o,v,t) ARGVX4(o,v,t,nil)
125 |
126 | //Assign argument at index o to variable v, else exit with nil
127 | #define ARGVX2(o,v) ARGVX3(o,v,nil)
128 |
129 |
130 |
131 |
132 |
133 | #define DO if (true) then
134 |
135 | #define xGet(x,o) (if (o >= count(x)) then {nil} else {x select o})
136 | #define xSet(x,o,v) (x set [o, OR(v,nil)])
137 | #define xPush(x,v) (xSet(x,count(x),v))
138 | #define xPushIf(cond,x,v) if (cond) then {xPush(x,v);}
139 | #define xPushUnless(cond,x,v) xPushIf(not(cond),x,v)
140 |
141 |
142 | #define isClient not(isServer) || {isServer && not(isDedicated)}
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/populateVehicles.sqf:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | // @file Version: 1.0
5 | // @file Name: populateVehicles.sqf
6 | // @file Author: [404] Deadbeat
7 | // @file Created: 20/11/2012 05:19
8 | // @file Args: [int _switch]
9 | // bAdmin Exile by Biabock
10 |
11 | #define vehicleManagementDialog 12000
12 | #define vehicleManagementListBox 12001
13 | #define vehicleWeaponsText 12003
14 | #define vehicleUsersText 12004
15 | #define vehicleDamageText 12005
16 | #define vehicleSpeedText 12006
17 |
18 | disableSerialization;
19 |
20 | private ["_switch","_vehicle","_vehicleType","_vehicleClass","_dialog","_vehicleListBox","_weaponText","_userText","_damageText","_speedText","_check"];
21 | _uid = getPlayerUID player;
22 | if (_uid call isAdmin) then
23 | {
24 | _switch = _this select 0;
25 | _allVehicles = vehicles;
26 |
27 | _dialog = findDisplay vehicleManagementDialog;
28 | _vehicleListBox = _dialog displayCtrl vehicleManagementListBox;
29 | _weaponText = _dialog displayCtrl vehicleWeaponsText;
30 | _userText = _dialog displayCtrl vehicleUsersText;
31 | _damageText = _dialog displayCtrl vehicleDamageText;
32 | _speedText = _dialog displayCtrl vehicleSpeedText;
33 |
34 | lbClear _vehicleListBox;
35 | _weaponText ctrlSetText format["Weapons:"];
36 | _speedText ctrlSetText format["Speed:"];
37 | _userText ctrlSetText format["Users:"];
38 | _damageText ctrlSetText format["Damage:"];
39 |
40 | switch (_switch) do
41 | {
42 | case 0:
43 | {
44 | {
45 | _vehicleType = typeOf _x;
46 | _vehicleClass = "";
47 |
48 | switch (true) do
49 | {
50 | case (_vehicleType isKindOf "MotorCycle"):
51 | {
52 | _vehicleClass = "Motorcycle";
53 | };
54 | case (_vehicleType isKindOf "Truck_F"):
55 | {
56 | _vehicleClass = "Truck";
57 | };
58 | case (_vehicleType isKindOf "Car" && !(_vehicleType isKindOf "Wheeled_APC_F")):
59 | {
60 | _vehicleClass = "Car";
61 | };
62 | };
63 |
64 | if (_vehicleClass != "") then
65 | {
66 | _index = _vehicleListBox lbAdd format ["[Class: %1] [Type: %2]", _vehicleClass, _vehicleType];
67 | _vehicleListBox lbSetData [_index, str _x];
68 | };
69 |
70 | } forEach _allVehicles;
71 | };
72 | case 1:
73 | {
74 | {
75 | _vehicleType = typeOf _x;
76 |
77 | if (_vehicleType isKindOf "Helicopter") then
78 | {
79 | _index = _vehicleListBox lbAdd format ["[Class: Helicopter] [Type: %1]", _vehicleType];
80 | _vehicleListBox lbSetData [_index, str _x];
81 | };
82 |
83 | } forEach _allVehicles;
84 | };
85 | case 2:
86 | {
87 | {
88 | _vehicleType = typeOf _x;
89 |
90 | if (_vehicleType isKindOf "Plane") then
91 | {
92 | _index = _vehicleListBox lbAdd format ["[Class: Plane] [Type: %1]", _vehicleType];
93 | _vehicleListBox lbSetData [_index, str _x];
94 | };
95 |
96 | } forEach _allVehicles;
97 | };
98 | case 3:
99 | {
100 | {
101 | _vehicleType = typeOf _x;
102 | _vehicleClass = "";
103 |
104 | if (_vehicleType isKindOf "Tank") then
105 | {
106 | _vehicleClass = "Tank";
107 | };
108 |
109 | if (_vehicleType isKindOf "Wheeled_APC_F") then
110 | {
111 | _vehicleClass = "APC";
112 | };
113 |
114 | if (_vehicleClass != "") then
115 | {
116 | _index = _vehicleListBox lbAdd format ["[Class: %1] [Type: %2]", _vehicleClass, _vehicleType];
117 | _vehicleListBox lbSetData [_index, str _x];
118 | };
119 |
120 | } forEach _allVehicles;
121 | };
122 | case 4:
123 | {
124 | private ["_hackedVehicles", "_hackedVehicle", "_vehicleOwner", "_ownerInfo"];
125 | _hackedVehicles = call findHackedVehicles;
126 |
127 | lbClear _vehicleListBox;
128 |
129 | {
130 | _hackedVehicle = _x select 0;
131 | _vehicleOwner = _x select 1;
132 |
133 | if (_vehicleOwner == "") then
134 | {
135 | _ownerInfo = "[Unknown owner]";
136 | }
137 | else
138 | {
139 | if (_hackedVehicle isKindOf "ReammoBox_F") then
140 | {
141 | _ownerInfo = format ["[Owner: %1]", _vehicleOwner];
142 | }
143 | else
144 | {
145 | _ownerInfo = format ["[Last driver: %1]", _vehicleOwner];
146 | };
147 | };
148 |
149 | _vehicleType = typeOf _hackedVehicle;
150 | _vehicleClass = "";
151 |
152 | switch (true) do
153 | {
154 | case (_vehicleType isKindOf "MotorCycle"):
155 | {
156 | _vehicleClass = "Motorcycle";
157 | };
158 | case (_vehicleType isKindOf "Truck_F"):
159 | {
160 | _vehicleClass = "Truck";
161 | };
162 | case (_vehicleType isKindOf "Wheeled_APC_F"):
163 | {
164 | _vehicleClass = "APC";
165 | };
166 | default
167 | {
168 | {
169 | if (_vehicleType isKindOf _x) exitWith
170 | {
171 | _vehicleClass = _x;
172 | };
173 | } forEach ["Car", "Helicopter", "Plane", "Tank"];
174 |
175 | if (_vehicleType isKindOf "ReammoBox_F") then
176 | {
177 | _vehicleClass = "Ammo Box";
178 | };
179 | };
180 | };
181 |
182 | if (_vehicleClass != "") then
183 | {
184 | _index = _vehicleListBox lbAdd format ["[Class: %1] [Type: %2] %3", _vehicleClass, _vehicleType, _ownerInfo];
185 | _vehicleListBox lbSetData [_index, str _hackedVehicle];
186 | };
187 |
188 | } forEach _hackedVehicles;
189 | };
190 | };
191 | };
192 |
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/adminPanel/dialog/playerMenu.hpp:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | #define playerMenuDialog 55500
5 | #define playerMenuPlayerSkin 55501
6 | #define playerMenuPlayerGun 55502
7 | #define playerMenuPlayerItems 55503
8 | #define playerMenuPlayerPos 55504
9 | #define playerMenuPlayerList 55505
10 | #define playerMenuSpectateButton 55506
11 | #define playerMenuPlayerObject 55507
12 | #define playerMenuPlayerHealth 55508
13 | #define playerMenuWarnMessage 55509
14 | #define playerMenuPlayerUID 55510
15 |
16 | class PlayersMenu
17 | {
18 | idd = playerMenuDialog;
19 | movingEnable = false;
20 | enableSimulation = true;
21 |
22 | class controlsBackground {
23 |
24 | class MainBackground: w_RscPicture
25 | {
26 | idc = -1;
27 | colorText[] = {1, 1, 1, 1};
28 | colorBackground[] = {0,0,0,0};
29 | text = "#(argb,8,8,3)color(0,0,0,0.6)";
30 | x = 0.1875 * safezoneW + safezoneX;
31 | y = 0.15 * safezoneH + safezoneY;
32 | w = 0.60 * safezoneW;
33 | h = 0.661111 * safezoneH;
34 | };
35 |
36 | class TopBar: w_RscPicture
37 | {
38 | idc = -1;
39 | colorText[] = {1, 1, 1, 1};
40 | colorBackground[] = {0,0,0,0};
41 | text = "#(argb,8,8,3)color(0.25,0.51,0.96,0.8)";
42 |
43 | x = 0.1875 * safezoneW + safezoneX;
44 | y = 0.15 * safezoneH + safezoneY;
45 | w = 0.60 * safezoneW;
46 | h = 0.05 * safezoneH;
47 | };
48 |
49 | class DialogTitleText: w_RscText
50 | {
51 | idc = -1;
52 | text = "Player Menu";
53 |
54 | font = "PuristaMedium";
55 | sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
56 | x = 0.20 * safezoneW + safezoneX;
57 | y = 0.155 * safezoneH + safezoneY;
58 | w = 0.0844792 * safezoneW;
59 | h = 0.0448148 * safezoneH;
60 | };
61 |
62 | class PlayerUIDText: w_RscText
63 | {
64 | idc = playerMenuPlayerUID;
65 | text = "UID:";
66 | sizeEx = 0.030;
67 | x = 0.52 * safezoneW + safezoneX;
68 | y = 0.215 * safezoneH + safezoneY;
69 | w = 0.25 * safezoneW;
70 | h = 0.04 * safezoneH;
71 | };
72 |
73 | class PlayerObjectText: w_RscText
74 | {
75 | idc = playerMenuPlayerObject;
76 | text = "Slot:";
77 | sizeEx = 0.030;
78 | x = 0.52 * safezoneW + safezoneX;
79 | y = 0.235 * safezoneH + safezoneY;
80 | w = 0.25 * safezoneW;
81 | h = 0.04 * safezoneH;
82 | };
83 |
84 | class PlayerSkinText: w_RscText
85 | {
86 | idc = playerMenuPlayerSkin;
87 | text = "Score:";
88 | sizeEx = 0.030;
89 | x = 0.52 * safezoneW + safezoneX;
90 | y = 0.255 * safezoneH + safezoneY;
91 | w = 0.25 * safezoneW;
92 | h = 0.04 * safezoneH;
93 | };
94 |
95 | class PlayerGunText: w_RscText
96 | {
97 | idc = playerMenuPlayerGun;
98 | text = "Poptabs:";
99 | sizeEx = 0.030;
100 | x = 0.52 * safezoneW + safezoneX;
101 | y = 0.275 * safezoneH + safezoneY;
102 | w = 0.25 * safezoneW;
103 | h = 0.04 * safezoneH;
104 | };
105 |
106 | class PlayerItemsText: w_RscText
107 | {
108 | idc = playerMenuPlayerItems;
109 | text = "Items:";
110 | sizeEx = 0.030;
111 | x = 0.52 * safezoneW + safezoneX;
112 | y = 0.295 * safezoneH + safezoneY;
113 | w = 0.40 * safezoneW;
114 | h = 0.04 * safezoneH;
115 | };
116 |
117 | class PlayerHealthText: w_RscText
118 | {
119 | idc = playerMenuPlayerHealth;
120 | text = "Health:";
121 | sizeEx = 0.030;
122 | x = 0.52 * safezoneW + safezoneX;
123 | y = 0.315 * safezoneH + safezoneY;
124 | w = 0.25 * safezoneW;
125 | h = 0.04 * safezoneH;
126 | };
127 |
128 | class PlayerPosistionText: w_RscText
129 | {
130 | idc = playerMenuPlayerPos;
131 | text = "Position:";
132 | sizeEx = 0.030;
133 | x = 0.52 * safezoneW + safezoneX;
134 | y = 0.335 * safezoneH + safezoneY;
135 | w = 0.25 * safezoneW;
136 | h = 0.04 * safezoneH;
137 | };
138 | };
139 |
140 | class controls {
141 |
142 | class PlayerEditBox:w_RscEdit
143 | {
144 | idc=playerMenuWarnMessage;
145 | x = 0.60 * safezoneW + safezoneX;
146 | y = 0.745 * safezoneH + safezoneY;
147 | w = 0.175 * safezoneW;
148 | h = 0.045 * safezoneH;
149 | colorDisabled[] = {1,1,1,0.3};
150 | };
151 |
152 | class PlayerListBox: w_RscList
153 | {
154 | idc = playerMenuPlayerList;
155 | onLBSelChanged="[2,_this select 1] execVM ""badmin\client\systems\adminPanel\importvalues.sqf"";";
156 | x = 0.2 * safezoneW + safezoneX;
157 | y = 0.225 * safezoneH + safezoneY;
158 | w = 0.315 * safezoneW;
159 | h = 0.45 * safezoneH;
160 | };
161 |
162 | class SpectateButton: w_RscButton
163 | {
164 | idc = playerMenuSpectateButton;
165 | text = "Spectate";
166 | onButtonClick = "[0] execVM 'badmin\client\systems\adminPanel\playerSelect.sqf'";
167 | x = 0.2 * safezoneW + safezoneX;
168 | y = 0.70 * safezoneH + safezoneY;
169 | w = 0.05 * safezoneW;
170 | h = 0.04 * safezoneH;
171 | };
172 |
173 | class SlayButton: w_RscButton
174 | {
175 | idc = -1;
176 | text = "Kill";
177 | onButtonClick = "[2] execVM 'badmin\client\systems\adminPanel\playerSelect.sqf'";
178 | x = 0.2 * safezoneW + safezoneX;
179 | y = 0.748 * safezoneH + safezoneY;
180 | w = 0.05 * safezoneW;
181 | h = 0.04 * safezoneH;
182 | };
183 |
184 | /*class UnlockTeamSwitchButton: w_RscButton
185 | {
186 | idc = -1;
187 | text = "Unlock Team Switch";
188 | onButtonClick = "[3] execVM 'badmin\client\systems\adminPanel\playerSelect.sqf'";
189 | x = 0.255 * safezoneW + safezoneX;
190 | y = 0.70 * safezoneH + safezoneY;
191 | w = 0.11 * safezoneW;
192 | h = 0.04 * safezoneH;
193 | };
194 |
195 | class UnlockTeamKillerButton: w_RscButton
196 | {
197 | idc = -1;
198 | text = "Unlock Team Kill";
199 | onButtonClick = "[4] execVM 'badmin\client\systems\adminPanel\playerSelect.sqf'";
200 | x = 0.255 * safezoneW + safezoneX;
201 | y = 0.748 * safezoneH + safezoneY;
202 | w = 0.11 * safezoneW;
203 | h = 0.04 * safezoneH;
204 | };
205 |
206 | class RemoveAllMoneyButton: w_RscButton
207 | {
208 | idc = -1;
209 | text = "Remove Money";
210 | onButtonClick = "[5] execVM 'badmin\client\systems\adminPanel\playerSelect.sqf'";
211 | x = 0.3705 * safezoneW + safezoneX;
212 | y = 0.70 * safezoneH + safezoneY;
213 | w = 0.105 * safezoneW;
214 | h = 0.04 * safezoneH;
215 | };*/
216 |
217 | /*class RemoveAllWeaponsButton: w_RscButton
218 | {
219 | idc = -1;
220 | text = "Remove Weapons";
221 | onButtonClick = "[6] execVM 'badmin\client\systems\adminPanel\playerSelect.sqf'";
222 | x = 0.3705 * safezoneW + safezoneX;
223 | y = 0.748 * safezoneH + safezoneY;
224 | w = 0.105 * safezoneW;
225 | h = 0.04 * safezoneH;
226 | };*/
227 |
228 | /*class CheckPlayerGearButton: w_RscButton
229 | {
230 | idc = -1;
231 | text = "Gear";
232 | onButtonClick = "[7] execVM 'badmin\client\systems\adminPanel\playerSelect.sqf'";
233 | x = 0.482 * safezoneW + safezoneX;
234 | y = 0.748 * safezoneH + safezoneY;
235 | w = 0.05 * safezoneW;
236 | h = 0.04 * safezoneH;
237 | };*/
238 |
239 | class WarnButton: w_RscButton
240 | {
241 | idc = -1;
242 | text = "Warn";
243 | onButtonClick = "[1] execVM 'badmin\client\systems\adminPanel\playerSelect.sqf'";
244 | x = 0.600 * safezoneW + safezoneX;
245 | y = 0.70 * safezoneH + safezoneY;
246 | w = 0.05 * safezoneW;
247 | h = 0.04 * safezoneH;
248 | };
249 |
250 | /*class DonationButton: w_RscButton
251 | {
252 | idc = -1;
253 | text = "Donation";
254 | onButtonClick = "[8] execVM 'badmin\client\systems\adminPanel\playerSelect.sqf'";
255 | x = 0.655 * safezoneW + safezoneX;
256 | y = 0.70 * safezoneH + safezoneY;
257 | w = 0.05 * safezoneW;
258 | h = 0.04 * safezoneH;
259 | };*/
260 | };
261 | };
262 |
263 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | GNU LESSER GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 |
9 | This version of the GNU Lesser General Public License incorporates
10 | the terms and conditions of version 3 of the GNU General Public
11 | License, supplemented by the additional permissions listed below.
12 |
13 | 0. Additional Definitions.
14 |
15 | As used herein, "this License" refers to version 3 of the GNU Lesser
16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU
17 | General Public License.
18 |
19 | "The Library" refers to a covered work governed by this License,
20 | other than an Application or a Combined Work as defined below.
21 |
22 | An "Application" is any work that makes use of an interface provided
23 | by the Library, but which is not otherwise based on the Library.
24 | Defining a subclass of a class defined by the Library is deemed a mode
25 | of using an interface provided by the Library.
26 |
27 | A "Combined Work" is a work produced by combining or linking an
28 | Application with the Library. The particular version of the Library
29 | with which the Combined Work was made is also called the "Linked
30 | Version".
31 |
32 | The "Minimal Corresponding Source" for a Combined Work means the
33 | Corresponding Source for the Combined Work, excluding any source code
34 | for portions of the Combined Work that, considered in isolation, are
35 | based on the Application, and not on the Linked Version.
36 |
37 | The "Corresponding Application Code" for a Combined Work means the
38 | object code and/or source code for the Application, including any data
39 | and utility programs needed for reproducing the Combined Work from the
40 | Application, but excluding the System Libraries of the Combined Work.
41 |
42 | 1. Exception to Section 3 of the GNU GPL.
43 |
44 | You may convey a covered work under sections 3 and 4 of this License
45 | without being bound by section 3 of the GNU GPL.
46 |
47 | 2. Conveying Modified Versions.
48 |
49 | If you modify a copy of the Library, and, in your modifications, a
50 | facility refers to a function or data to be supplied by an Application
51 | that uses the facility (other than as an argument passed when the
52 | facility is invoked), then you may convey a copy of the modified
53 | version:
54 |
55 | a) under this License, provided that you make a good faith effort to
56 | ensure that, in the event an Application does not supply the
57 | function or data, the facility still operates, and performs
58 | whatever part of its purpose remains meaningful, or
59 |
60 | b) under the GNU GPL, with none of the additional permissions of
61 | this License applicable to that copy.
62 |
63 | 3. Object Code Incorporating Material from Library Header Files.
64 |
65 | The object code form of an Application may incorporate material from
66 | a header file that is part of the Library. You may convey such object
67 | code under terms of your choice, provided that, if the incorporated
68 | material is not limited to numerical parameters, data structure
69 | layouts and accessors, or small macros, inline functions and templates
70 | (ten or fewer lines in length), you do both of the following:
71 |
72 | a) Give prominent notice with each copy of the object code that the
73 | Library is used in it and that the Library and its use are
74 | covered by this License.
75 |
76 | b) Accompany the object code with a copy of the GNU GPL and this license
77 | document.
78 |
79 | 4. Combined Works.
80 |
81 | You may convey a Combined Work under terms of your choice that,
82 | taken together, effectively do not restrict modification of the
83 | portions of the Library contained in the Combined Work and reverse
84 | engineering for debugging such modifications, if you also do each of
85 | the following:
86 |
87 | a) Give prominent notice with each copy of the Combined Work that
88 | the Library is used in it and that the Library and its use are
89 | covered by this License.
90 |
91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license
92 | document.
93 |
94 | c) For a Combined Work that displays copyright notices during
95 | execution, include the copyright notice for the Library among
96 | these notices, as well as a reference directing the user to the
97 | copies of the GNU GPL and this license document.
98 |
99 | d) Do one of the following:
100 |
101 | 0) Convey the Minimal Corresponding Source under the terms of this
102 | License, and the Corresponding Application Code in a form
103 | suitable for, and under terms that permit, the user to
104 | recombine or relink the Application with a modified version of
105 | the Linked Version to produce a modified Combined Work, in the
106 | manner specified by section 6 of the GNU GPL for conveying
107 | Corresponding Source.
108 |
109 | 1) Use a suitable shared library mechanism for linking with the
110 | Library. A suitable mechanism is one that (a) uses at run time
111 | a copy of the Library already present on the user's computer
112 | system, and (b) will operate properly with a modified version
113 | of the Library that is interface-compatible with the Linked
114 | Version.
115 |
116 | e) Provide Installation Information, but only if you would otherwise
117 | be required to provide such information under section 6 of the
118 | GNU GPL, and only to the extent that such information is
119 | necessary to install and execute a modified version of the
120 | Combined Work produced by recombining or relinking the
121 | Application with a modified version of the Linked Version. (If
122 | you use option 4d0, the Installation Information must accompany
123 | the Minimal Corresponding Source and Corresponding Application
124 | Code. If you use option 4d1, you must provide the Installation
125 | Information in the manner specified by section 6 of the GNU GPL
126 | for conveying Corresponding Source.)
127 |
128 | 5. Combined Libraries.
129 |
130 | You may place library facilities that are a work based on the
131 | Library side by side in a single library together with other library
132 | facilities that are not Applications and are not covered by this
133 | License, and convey such a combined library under terms of your
134 | choice, if you do both of the following:
135 |
136 | a) Accompany the combined library with a copy of the same work based
137 | on the Library, uncombined with any other library facilities,
138 | conveyed under the terms of this License.
139 |
140 | b) Give prominent notice with the combined library that part of it
141 | is a work based on the Library, and explaining where to find the
142 | accompanying uncombined form of the same work.
143 |
144 | 6. Revised Versions of the GNU Lesser General Public License.
145 |
146 | The Free Software Foundation may publish revised and/or new versions
147 | of the GNU Lesser General Public License from time to time. Such new
148 | versions will be similar in spirit to the present version, but may
149 | differ in detail to address new problems or concerns.
150 |
151 | Each version is given a distinguishing version number. If the
152 | Library as you received it specifies that a certain numbered version
153 | of the GNU Lesser General Public License "or any later version"
154 | applies to it, you have the option of following the terms and
155 | conditions either of that published version or of any later version
156 | published by the Free Software Foundation. If the Library as you
157 | received it does not specify a version number of the GNU Lesser
158 | General Public License, you may choose any version of the GNU Lesser
159 | General Public License ever published by the Free Software Foundation.
160 |
161 | If the Library as you received it specifies that a proxy can decide
162 | whether future versions of the GNU Lesser General Public License shall
163 | apply, that proxy's public statement of acceptance of any version is
164 | permanent authorization for you to choose that version for the
165 | Library.
166 |
--------------------------------------------------------------------------------
/mission-files/badmin/LICENSE.txt:
--------------------------------------------------------------------------------
1 | GNU LESSER GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 |
9 | This version of the GNU Lesser General Public License incorporates
10 | the terms and conditions of version 3 of the GNU General Public
11 | License, supplemented by the additional permissions listed below.
12 |
13 | 0. Additional Definitions.
14 |
15 | As used herein, "this License" refers to version 3 of the GNU Lesser
16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU
17 | General Public License.
18 |
19 | "The Library" refers to a covered work governed by this License,
20 | other than an Application or a Combined Work as defined below.
21 |
22 | An "Application" is any work that makes use of an interface provided
23 | by the Library, but which is not otherwise based on the Library.
24 | Defining a subclass of a class defined by the Library is deemed a mode
25 | of using an interface provided by the Library.
26 |
27 | A "Combined Work" is a work produced by combining or linking an
28 | Application with the Library. The particular version of the Library
29 | with which the Combined Work was made is also called the "Linked
30 | Version".
31 |
32 | The "Minimal Corresponding Source" for a Combined Work means the
33 | Corresponding Source for the Combined Work, excluding any source code
34 | for portions of the Combined Work that, considered in isolation, are
35 | based on the Application, and not on the Linked Version.
36 |
37 | The "Corresponding Application Code" for a Combined Work means the
38 | object code and/or source code for the Application, including any data
39 | and utility programs needed for reproducing the Combined Work from the
40 | Application, but excluding the System Libraries of the Combined Work.
41 |
42 | 1. Exception to Section 3 of the GNU GPL.
43 |
44 | You may convey a covered work under sections 3 and 4 of this License
45 | without being bound by section 3 of the GNU GPL.
46 |
47 | 2. Conveying Modified Versions.
48 |
49 | If you modify a copy of the Library, and, in your modifications, a
50 | facility refers to a function or data to be supplied by an Application
51 | that uses the facility (other than as an argument passed when the
52 | facility is invoked), then you may convey a copy of the modified
53 | version:
54 |
55 | a) under this License, provided that you make a good faith effort to
56 | ensure that, in the event an Application does not supply the
57 | function or data, the facility still operates, and performs
58 | whatever part of its purpose remains meaningful, or
59 |
60 | b) under the GNU GPL, with none of the additional permissions of
61 | this License applicable to that copy.
62 |
63 | 3. Object Code Incorporating Material from Library Header Files.
64 |
65 | The object code form of an Application may incorporate material from
66 | a header file that is part of the Library. You may convey such object
67 | code under terms of your choice, provided that, if the incorporated
68 | material is not limited to numerical parameters, data structure
69 | layouts and accessors, or small macros, inline functions and templates
70 | (ten or fewer lines in length), you do both of the following:
71 |
72 | a) Give prominent notice with each copy of the object code that the
73 | Library is used in it and that the Library and its use are
74 | covered by this License.
75 |
76 | b) Accompany the object code with a copy of the GNU GPL and this license
77 | document.
78 |
79 | 4. Combined Works.
80 |
81 | You may convey a Combined Work under terms of your choice that,
82 | taken together, effectively do not restrict modification of the
83 | portions of the Library contained in the Combined Work and reverse
84 | engineering for debugging such modifications, if you also do each of
85 | the following:
86 |
87 | a) Give prominent notice with each copy of the Combined Work that
88 | the Library is used in it and that the Library and its use are
89 | covered by this License.
90 |
91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license
92 | document.
93 |
94 | c) For a Combined Work that displays copyright notices during
95 | execution, include the copyright notice for the Library among
96 | these notices, as well as a reference directing the user to the
97 | copies of the GNU GPL and this license document.
98 |
99 | d) Do one of the following:
100 |
101 | 0) Convey the Minimal Corresponding Source under the terms of this
102 | License, and the Corresponding Application Code in a form
103 | suitable for, and under terms that permit, the user to
104 | recombine or relink the Application with a modified version of
105 | the Linked Version to produce a modified Combined Work, in the
106 | manner specified by section 6 of the GNU GPL for conveying
107 | Corresponding Source.
108 |
109 | 1) Use a suitable shared library mechanism for linking with the
110 | Library. A suitable mechanism is one that (a) uses at run time
111 | a copy of the Library already present on the user's computer
112 | system, and (b) will operate properly with a modified version
113 | of the Library that is interface-compatible with the Linked
114 | Version.
115 |
116 | e) Provide Installation Information, but only if you would otherwise
117 | be required to provide such information under section 6 of the
118 | GNU GPL, and only to the extent that such information is
119 | necessary to install and execute a modified version of the
120 | Combined Work produced by recombining or relinking the
121 | Application with a modified version of the Linked Version. (If
122 | you use option 4d0, the Installation Information must accompany
123 | the Minimal Corresponding Source and Corresponding Application
124 | Code. If you use option 4d1, you must provide the Installation
125 | Information in the manner specified by section 6 of the GNU GPL
126 | for conveying Corresponding Source.)
127 |
128 | 5. Combined Libraries.
129 |
130 | You may place library facilities that are a work based on the
131 | Library side by side in a single library together with other library
132 | facilities that are not Applications and are not covered by this
133 | License, and convey such a combined library under terms of your
134 | choice, if you do both of the following:
135 |
136 | a) Accompany the combined library with a copy of the same work based
137 | on the Library, uncombined with any other library facilities,
138 | conveyed under the terms of this License.
139 |
140 | b) Give prominent notice with the combined library that part of it
141 | is a work based on the Library, and explaining where to find the
142 | accompanying uncombined form of the same work.
143 |
144 | 6. Revised Versions of the GNU Lesser General Public License.
145 |
146 | The Free Software Foundation may publish revised and/or new versions
147 | of the GNU Lesser General Public License from time to time. Such new
148 | versions will be similar in spirit to the present version, but may
149 | differ in detail to address new problems or concerns.
150 |
151 | Each version is given a distinguishing version number. If the
152 | Library as you received it specifies that a certain numbered version
153 | of the GNU Lesser General Public License "or any later version"
154 | applies to it, you have the option of following the terms and
155 | conditions either of that published version or of any later version
156 | published by the Free Software Foundation. If the Library as you
157 | received it does not specify a version number of the GNU Lesser
158 | General Public License, you may choose any version of the GNU Lesser
159 | General Public License ever published by the Free Software Foundation.
160 |
161 | If the Library as you received it specifies that a proxy can decide
162 | whether future versions of the GNU Lesser General Public License shall
163 | apply, that proxy's public statement of acceptance of any version is
164 | permanent authorization for you to choose that version for the
165 | Library.
166 |
--------------------------------------------------------------------------------
/mission-files/badmin/client/camera/dikcodes.h:
--------------------------------------------------------------------------------
1 | /* F1 ... F15 */
2 | #define DIK_F1 0x3B
3 | #define DIK_F2 0x3C
4 | #define DIK_F3 0x3D
5 | #define DIK_F4 0x3E
6 | #define DIK_F5 0x3F
7 | #define DIK_F6 0x40
8 | #define DIK_F7 0x41
9 | #define DIK_F8 0x42
10 | #define DIK_F9 0x43
11 | #define DIK_F10 0x44
12 | #define DIK_F11 0x57
13 | #define DIK_F12 0x58
14 | #define DIK_F13 0x64
15 | #define DIK_F14 0x65
16 | #define DIK_F15 0x66
17 |
18 | /* 0..9 */
19 | #define DIK_0 0x0B
20 | #define DIK_1 0x02
21 | #define DIK_2 0x03
22 | #define DIK_3 0x04
23 | #define DIK_4 0x05
24 | #define DIK_5 0x06
25 | #define DIK_6 0x07
26 | #define DIK_7 0x08
27 | #define DIK_8 0x09
28 | #define DIK_9 0x0A
29 | #define DIK_NUMPAD0 0x52
30 | #define DIK_NUMPAD1 0x4F
31 | #define DIK_NUMPAD2 0x50
32 | #define DIK_NUMPAD3 0x51
33 | #define DIK_NUMPAD4 0x4B
34 | #define DIK_NUMPAD5 0x4C
35 | #define DIK_NUMPAD6 0x4D
36 | #define DIK_NUMPAD7 0x47
37 | #define DIK_NUMPAD8 0x48
38 | #define DIK_NUMPAD9 0x49
39 |
40 | /* alpha */
41 | #define DIK_A 0x1E
42 | #define DIK_B 0x30
43 | #define DIK_C 0x2E
44 | #define DIK_D 0x20
45 | #define DIK_E 0x12
46 | #define DIK_F 0x21
47 | #define DIK_G 0x22
48 | #define DIK_H 0x23
49 | #define DIK_I 0x17
50 | #define DIK_J 0x24
51 | #define DIK_K 0x25
52 | #define DIK_L 0x26
53 | #define DIK_M 0x32
54 | #define DIK_N 0x31
55 | #define DIK_O 0x18
56 | #define DIK_P 0x19
57 | #define DIK_Q 0x10
58 | #define DIK_R 0x13
59 | #define DIK_S 0x1F
60 | #define DIK_T 0x14
61 | #define DIK_U 0x16
62 | #define DIK_V 0x2F
63 | #define DIK_W 0x11
64 | #define DIK_X 0x2D
65 | #define DIK_Y 0x15
66 | #define DIK_Z 0x2C
67 |
68 | /* Controls */
69 | #define DIK_ESCAPE 0x01
70 | #define DIK_TAB 0x0F
71 | #define DIK_LSHIFT 0x2A
72 | #define DIK_RSHIFT 0x36
73 | #define DIK_LCONTROL 0x1D
74 | #define DIK_RCONTROL 0x9D
75 | #define DIK_BACK 0x0E /* backspace */
76 | #define DIK_BACKSPACE DIK_BACK
77 | #define DIK_RETURN 0x1C /* Enter on main keyboard */
78 | #define DIK_NUMPADENTER 0x9C /* Enter on numeric keypad */
79 | #define DIK_LMENU 0x38 /* left Alt */
80 | #define DIK_LALT DIK_LMENU
81 | #define DIK_SPACE 0x39
82 | #define DIK_CAPITAL 0x3A /* capslock */
83 | #define DIK_CAPSLOCK DIK_CAPITAL
84 | #define DIK_NUMLOCK 0x45
85 | #define DIK_SCROLL 0x46 /* Scroll Lock */
86 | #define DIK_RMENU 0xB8 /* right Alt */
87 | #define DIK_RALT DIK_RMENU /* right Alt */
88 | #define Graphics
89 | #define DIK_AT 0x91 /* (NEC PC98) */
90 | #define DIK_COLON 0x92 /* (NEC PC98) */
91 | #define DIK_UNDERLINE 0x93 /* (NEC PC98) */
92 | #define DIK_MINUS 0x0C /* - on main keyboard */
93 | #define DIK_EQUALS 0x0D
94 | #define DIK_LBRACKET 0x1A
95 | #define DIK_RBRACKET 0x1B
96 | #define DIK_SEMICOLON 0x27
97 | #define DIK_APOSTROPHE 0x28
98 | #define DIK_GRAVE 0x29 /* accent grave */
99 | #define DIK_BACKSLASH 0x2B
100 | #define DIK_COMMA 0x33
101 | #define DIK_PERIOD 0x34 /* . on main keyboard */
102 | #define DIK_SLASH 0x35 /* / on main keyboard */
103 | #define DIK_MULTIPLY 0x37 /* * on numeric keypad */
104 | #define DIK_NUMPADSTAR DIK_MULTIPLY
105 | #define DIK_SUBTRACT 0x4A /* - on numeric keypad */
106 | #define DIK_ADD 0x4E /* + on numeric keypad */
107 | #define DIK_DECIMAL 0x53 /* . on numeric keypad */
108 | #define DIK_NUMPADEQUALS 0x8D /* = on numeric keypad (NEC PC98) */
109 | #define DIK_NUMPADMINUS DIK_SUBTRACT /* - on numeric keypad */
110 | #define DIK_NUMPADPLUS DIK_ADD /* + on numeric keypad */
111 | #define DIK_NUMPADPERIOD DIK_DECIMAL /* . on numeric keypad */
112 | #define DIK_NUMPADSLASH DIK_DIVIDE /* / on numeric keypad */
113 |
114 | /* KataKana */
115 | #define DIK_KANA 0x70 /* (Japanese keyboard) */
116 | #define DIK_ABNT_C1 0x73 /* / ? on Portugese (Brazilian) keyboards */
117 | #define DIK_CONVERT 0x79 /* (Japanese keyboard) */
118 | #define DIK_NOCONVERT 0x7B /* (Japanese keyboard) */
119 | #define DIK_YEN 0x7D /* (Japanese keyboard) */
120 | #define DIK_OEM_102 0x56 /* < > | on UK/Germany keyboards */
121 | #define DIK_ABNT_C2 0x7E /* Numpad . on Portugese (Brazilian) keyboards */
122 | #define DIK_PREVTRACK 0x90 /* Previous Track (DIK_CIRCUMFLEX on Japanese keyboard) */
123 | #define DIK_KANJI 0x94 /* (Japanese keyboard) */
124 | #define DIK_STOP 0x95 /* (NEC PC98) */
125 | #define DIK_AX 0x96 /* (Japan AX) */
126 | #define DIK_UNLABELED 0x97 /* (J3100) */
127 | #define DIK_NUMPADCOMMA 0xB3 /* ,on numeric keypad (NEC PC98) */
128 |
129 | /* Alternate names for keys originally not used on US keyboards. */
130 | #define DIK_CIRCUMFLEX DIK_PREVTRACK /* Japanese keyboard */
131 | #define Apps
132 | #define DIK_NEXTTRACK 0x99 /* Next Track */
133 | #define DIK_MUTE 0xA0 /* Mute */
134 | #define DIK_CALCULATOR 0xA1 /* Calculator */
135 | #define DIK_PLAYPAUSE 0xA2 /* Play / Pause */
136 | #define DIK_MEDIASTOP 0xA4 /* Media Stop */
137 | #define DIK_VOLUMEDOWN 0xAE /* Volume - */
138 | #define DIK_VOLUMEUP 0xB0 /* Volume + */
139 | #define DIK_WEBHOME 0xB2 /* Web home */
140 | #define DIK_SYSRQ 0xB7
141 | #define DIK_PAUSE 0xC5 /* Pause */
142 | #define DIK_APPS 0xDD /* AppMenu key */
143 | #define DIK_POWER 0xDE /* System Power */
144 | #define DIK_SLEEP 0xDF /* System Sleep */
145 | #define DIK_WAKE 0xE3 /* System Wake */
146 | #define DIK_WEBSEARCH 0xE5 /* Web Search */
147 | #define DIK_WEBFAVORITES 0xE6 /* Web Favorites */
148 | #define DIK_WEBREFRESH 0xE7 /* Web Refresh */
149 | #define DIK_WEBSTOP 0xE8 /* Web Stop */
150 | #define DIK_WEBFORWARD 0xE9 /* Web Forward */
151 | #define DIK_WEBBACK 0xEA /* Web Back */
152 | #define DIK_MYCOMPUTER 0xEB /* My Computer */
153 | #define DIK_MAIL 0xEC /* Mail */
154 | #define DIK_MEDIASELECT 0xED /* Media Select */
155 |
156 | /* ArrowKeypad */
157 | #define DIK_HOME 0xC7 /* Home on arrow keypad */
158 | #define DIK_UP 0xC8 /* UpArrow on arrow keypad */
159 | #define DIK_PRIOR 0xC9 /* PgUp on arrow keypad */
160 | #define DIK_LEFT 0xCB /* LeftArrow on arrow keypad */
161 | #define DIK_RIGHT 0xCD /* RightArrow on arrow keypad */
162 | #define DIK_END 0xCF /* End on arrow keypad */
163 | #define DIK_DOWN 0xD0 /* DownArrow on arrow keypad */
164 | #define DIK_NEXT 0xD1 /* PgDn on arrow keypad */
165 | #define DIK_INSERT 0xD2 /* Insert on arrow keypad */
166 | #define DIK_DELETE 0xD3 /* Delete on arrow keypad */
167 | #define DIK_UPARROW DIK_UP /* UpArrow on arrow keypad */
168 | #define DIK_PGUP DIK_PRIOR /* PgUp on arrow keypad */
169 | #define DIK_LEFTARROW DIK_LEFT /* LeftArrow on arrow keypad */
170 | #define DIK_RIGHTARROW DIK_RIGHT /* RightArrow on arrow keypad */
171 | #define DIK_DOWNARROW DIK_DOWN /* DownArrow on arrow keypad */
172 | #define DIK_PGDN DIK_NEXT /* PgDn on arrow keypad */
173 | #define other
174 | #define DIK_LWIN 0xDB /* Left Windows key */
175 | #define DIK_RWIN 0xDC /* Right Windows key */
176 |
177 | /* Numeric sort */
178 | #define DIK_ESCAPE 0x01
179 | #define DIK_1 0x02
180 | #define DIK_2 0x03
181 | #define DIK_3 0x04
182 | #define DIK_4 0x05
183 | #define DIK_5 0x06
184 | #define DIK_6 0x07
185 | #define DIK_7 0x08
186 | #define DIK_8 0x09
187 | #define DIK_9 0x0A
188 | #define DIK_0 0x0B
189 | #define DIK_MINUS 0x0C /* - on main keyboard */
190 | #define DIK_EQUALS 0x0D
191 | #define DIK_BACK 0x0E /* backspace */
192 | #define DIK_TAB 0x0F
193 | #define DIK_Q 0x10
194 | #define DIK_W 0x11
195 | #define DIK_E 0x12
196 | #define DIK_R 0x13
197 | #define DIK_T 0x14
198 | #define DIK_Y 0x15
199 | #define DIK_U 0x16
200 | #define DIK_I 0x17
201 | #define DIK_O 0x18
202 | #define DIK_P 0x19
203 | #define DIK_LBRACKET 0x1A
204 | #define DIK_RBRACKET 0x1B
205 | #define DIK_RETURN 0x1C /* Enter on main keyboard */
206 | #define DIK_LCONTROL 0x1D
207 | #define DIK_A 0x1E
208 | #define DIK_S 0x1F
209 | #define DIK_D 0x20
210 | #define DIK_F 0x21
211 | #define DIK_G 0x22
212 | #define DIK_H 0x23
213 | #define DIK_J 0x24
214 | #define DIK_K 0x25
215 | #define DIK_L 0x26
216 | #define DIK_SEMICOLON 0x27
217 | #define DIK_APOSTROPHE 0x28
218 | #define DIK_GRAVE 0x29 /* accent grave */
219 | #define DIK_LSHIFT 0x2A
220 | #define DIK_BACKSLASH 0x2B
221 | #define DIK_Z 0x2C
222 | #define DIK_X 0x2D
223 | #define DIK_C 0x2E
224 | #define DIK_V 0x2F
225 | #define DIK_B 0x30
226 | #define DIK_N 0x31
227 | #define DIK_M 0x32
228 | #define DIK_COMMA 0x33
229 | #define DIK_PERIOD 0x34 /* . on main keyboard */
230 | #define DIK_SLASH 0x35 /* / on main keyboard */
231 | #define DIK_RSHIFT 0x36
232 | #define DIK_MULTIPLY 0x37 /* * on numeric keypad */
233 | #define DIK_LMENU 0x38 /* left Alt */
234 | #define DIK_SPACE 0x39
235 | #define DIK_CAPITAL 0x3A
236 | #define DIK_F1 0x3B
237 | #define DIK_F2 0x3C
238 | #define DIK_F3 0x3D
239 | #define DIK_F4 0x3E
240 | #define DIK_F5 0x3F
241 | #define DIK_F6 0x40
242 | #define DIK_F7 0x41
243 | #define DIK_F8 0x42
244 | #define DIK_F9 0x43
245 | #define DIK_F10 0x44
246 | #define DIK_NUMLOCK 0x45
247 | #define DIK_SCROLL 0x46 /* Scroll Lock */
248 | #define DIK_NUMPAD7 0x47
249 | #define DIK_NUMPAD8 0x48
250 | #define DIK_NUMPAD9 0x49
251 | #define DIK_SUBTRACT 0x4A /* - on numeric keypad */
252 | #define DIK_NUMPAD4 0x4B
253 | #define DIK_NUMPAD5 0x4C
254 | #define DIK_NUMPAD6 0x4D
255 | #define DIK_ADD 0x4E /* + on numeric keypad */
256 | #define DIK_NUMPAD1 0x4F
257 | #define DIK_NUMPAD2 0x50
258 | #define DIK_NUMPAD3 0x51
259 | #define DIK_NUMPAD0 0x52
260 | #define DIK_DECIMAL 0x53 /* . on numeric keypad */
261 | #define DIK_OEM_102 0x56 /* < > | on UK/Germany keyboards */
262 | #define DIK_F11 0x57
263 | #define DIK_F12 0x58
264 | #define DIK_F13 0x64 /* (NEC PC98) */
265 | #define DIK_F14 0x65 /* (NEC PC98) */
266 | #define DIK_F15 0x66 /* (NEC PC98) */
267 | #define DIK_KANA 0x70 /* (Japanese keyboard) */
268 | #define DIK_ABNT_C1 0x73 /* / ? on Portugese (Brazilian) keyboards */
269 | #define DIK_CONVERT 0x79 /* (Japanese keyboard) */
270 | #define DIK_NOCONVERT 0x7B /* (Japanese keyboard) */
271 | #define DIK_YEN 0x7D /* (Japanese keyboard) */
272 | #define DIK_ABNT_C2 0x7E /* Numpad . on Portugese (Brazilian) keyboards */
273 | #define DIK_NUMPADEQUALS 0x8D /* = on numeric keypad (NEC PC98) */
274 | #define DIK_PREVTRACK 0x90 /* Previous Track (DIK_CIRCUMFLEX on Japanese keyboard) */
275 | #define DIK_AT 0x91 /* (NEC PC98) */
276 | #define DIK_COLON 0x92 /* (NEC PC98) */
277 | #define DIK_UNDERLINE 0x93 /* (NEC PC98) */
278 | #define DIK_KANJI 0x94 /* (Japanese keyboard) */
279 | #define DIK_STOP 0x95 /* (NEC PC98) */
280 | #define DIK_AX 0x96 /* (Japan AX) */
281 | #define DIK_UNLABELED 0x97 /* (J3100) */
282 | #define DIK_NEXTTRACK 0x99 /* Next Track */
283 | #define DIK_NUMPADENTER 0x9C /* Enter on numeric keypad */
284 | #define DIK_RCONTROL 0x9D
285 | #define DIK_MUTE 0xA0 /* Mute */
286 | #define DIK_CALCULATOR 0xA1 /* Calculator */
287 | #define DIK_PLAYPAUSE 0xA2 /* Play / Pause */
288 | #define DIK_MEDIASTOP 0xA4 /* Media Stop */
289 | #define DIK_VOLUMEDOWN 0xAE /* Volume - */
290 | #define DIK_VOLUMEUP 0xB0 /* Volume + */
291 | #define DIK_WEBHOME 0xB2 /* Web home */
292 | #define DIK_NUMPADCOMMA 0xB3 /* ,on numeric keypad (NEC PC98) */
293 | #define DIK_DIVIDE 0xB5 /* / on numeric keypad */
294 | #define DIK_SYSRQ 0xB7
295 | #define DIK_RMENU 0xB8 /* right Alt */
296 | #define DIK_PAUSE 0xC5 /* Pause */
297 | #define DIK_HOME 0xC7 /* Home on arrow keypad */
298 | #define DIK_UP 0xC8 /* UpArrow on arrow keypad */
299 | #define DIK_PRIOR 0xC9 /* PgUp on arrow keypad */
300 | #define DIK_LEFT 0xCB /* LeftArrow on arrow keypad */
301 | #define DIK_RIGHT 0xCD /* RightArrow on arrow keypad */
302 | #define DIK_END 0xCF /* End on arrow keypad */
303 | #define DIK_DOWN 0xD0 /* DownArrow on arrow keypad */
304 | #define DIK_NEXT 0xD1 /* PgDn on arrow keypad */
305 | #define DIK_INSERT 0xD2 /* Insert on arrow keypad */
306 | #define DIK_DELETE 0xD3 /* Delete on arrow keypad */
307 | #define DIK_LWIN 0xDB /* Left Windows key */
308 | #define DIK_RWIN 0xDC /* Right Windows key */
309 | #define DIK_APPS 0xDD /* AppMenu key */
310 | #define DIK_POWER 0xDE /* System Power */
311 | #define DIK_SLEEP 0xDF /* System Sleep */
312 | #define DIK_WAKE 0xE3 /* System Wake */
313 | #define DIK_WEBSEARCH 0xE5 /* Web Search */
314 | #define DIK_WEBFAVORITES 0xE6 /* Web Favorites */
315 | #define DIK_WEBREFRESH 0xE7 /* Web Refresh */
316 | #define DIK_WEBSTOP 0xE8 /* Web Stop */
317 | #define DIK_WEBFORWARD 0xE9 /* Web Forward */
318 | #define DIK_WEBBACK 0xEA /* Web Back */
319 | #define DIK_MYCOMPUTER 0xEB /* My Computer */
320 | #define DIK_MAIL 0xEC /* Mail */
321 | #define DIK_MEDIASELECT 0xED /* Media Select */
322 |
323 | /* Alternate names for keys,to facilitate transition from DOS. */
324 | #define DIK_BACKSPACE DIK_BACK /* backspace */
325 | #define DIK_NUMPADSTAR DIK_MULTIPLY /* * on numeric keypad */
326 | #define DIK_LALT DIK_LMENU /* left Alt */
327 | #define DIK_CAPSLOCK DIK_CAPITAL /* CapsLock */
328 | #define DIK_NUMPADMINUS DIK_SUBTRACT /* - on numeric keypad */
329 | #define DIK_NUMPADPLUS DIK_ADD /* + on numeric keypad */
330 | #define DIK_NUMPADPERIOD DIK_DECIMAL /* . on numeric keypad */
331 | #define DIK_NUMPADSLASH DIK_DIVIDE /* / on numeric keypad */
332 | #define DIK_RALT DIK_RMENU /* right Alt */
333 | #define DIK_UPARROW DIK_UP /* UpArrow on arrow keypad */
334 | #define DIK_PGUP DIK_PRIOR /* PgUp on arrow keypad */
335 | #define DIK_LEFTARROW DIK_LEFT /* LeftArrow on arrow keypad */
336 | #define DIK_RIGHTARROW DIK_RIGHT /* RightArrow on arrow keypad */
337 | #define DIK_DOWNARROW DIK_DOWN /* DownArrow on arrow keypad */
338 | #define DIK_PGDN DIK_NEXT /* PgDn on arrow keypad */
339 |
340 | /* Alternate names for keys originally not used on US keyboards. */
341 | #define DIK_CIRCUMFLEX DIK_PREVTRACK /* Japanese keyboard */
--------------------------------------------------------------------------------
/mission-files/badmin/client/gui_base.hpp:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | ///////////////////////////////////////////////////////////////////////////
5 | /// Styles
6 | ///////////////////////////////////////////////////////////////////////////
7 |
8 | // Control types
9 | #define CT_STATIC 0
10 | #define CT_BUTTON 1
11 | #define CT_EDIT 2
12 | #define CT_SLIDER 3
13 | #define CT_COMBO 4
14 | #define CT_LISTBOX 5
15 | #define CT_TOOLBOX 6
16 | #define CT_CHECKBOXES 7
17 | #define CT_PROGRESS 8
18 | #define CT_HTML 9
19 | #define CT_STATIC_SKEW 10
20 | #define CT_ACTIVETEXT 11
21 | #define CT_TREE 12
22 | #define CT_STRUCTURED_TEXT 13
23 | #define CT_CONTEXT_MENU 14
24 | #define CT_CONTROLS_GROUP 15
25 | #define CT_SHORTCUTBUTTON 16
26 | #define CT_XKEYDESC 40
27 | #define CT_XBUTTON 41
28 | #define CT_XLISTBOX 42
29 | #define CT_XSLIDER 43
30 | #define CT_XCOMBO 44
31 | #define CT_ANIMATED_TEXTURE 45
32 | #define CT_OBJECT 80
33 | #define CT_OBJECT_ZOOM 81
34 | #define CT_OBJECT_CONTAINER 82
35 | #define CT_OBJECT_CONT_ANIM 83
36 | #define CT_LINEBREAK 98
37 | #define CT_USER 99
38 | #define CT_MAP 100
39 | #define CT_MAP_MAIN 101
40 | #define CT_LISTNBOX 102
41 |
42 | // Static styles
43 | #define ST_POS 0x0F
44 | #define ST_HPOS 0x03
45 | #define ST_VPOS 0x0C
46 | #define ST_LEFT 0x00
47 | #define ST_RIGHT 0x01
48 | #define ST_CENTER 0x02
49 | #define ST_DOWN 0x04
50 | #define ST_UP 0x08
51 | #define ST_VCENTER 0x0C
52 |
53 | #define ST_TYPE 0xF0
54 | #define ST_SINGLE 0x00
55 | #define ST_MULTI 0x10
56 | #define ST_TITLE_BAR 0x20
57 | #define ST_PICTURE 0x30
58 | #define ST_FRAME 0x40
59 | #define ST_BACKGROUND 0x50
60 | #define ST_GROUP_BOX 0x60
61 | #define ST_GROUP_BOX2 0x70
62 | #define ST_HUD_BACKGROUND 0x80
63 | #define ST_TILE_PICTURE 0x90
64 | #define ST_WITH_RECT 0xA0
65 | #define ST_LINE 0xB0
66 |
67 | #define ST_SHADOW 0x100
68 | #define ST_NO_RECT 0x200
69 | #define ST_KEEP_ASPECT_RATIO 0x800
70 |
71 | #define ST_TITLE ST_TITLE_BAR + ST_CENTER
72 |
73 | // Slider styles
74 | #define SL_DIR 0x400
75 | #define SL_VERT 0
76 | #define SL_HORZ 0x400
77 |
78 | #define SL_TEXTURES 0x10
79 |
80 | // progress bar
81 | #define ST_VERTICAL 0x01
82 | #define ST_HORIZONTAL 0
83 |
84 | // Listbox styles
85 | #define LB_TEXTURES 0x10
86 | #define LB_MULTI 0x20
87 |
88 | // Tree styles
89 | #define TR_SHOWROOT 1
90 | #define TR_AUTOCOLLAPSE 2
91 |
92 | // MessageBox styles
93 | #define MB_BUTTON_OK 1
94 | #define MB_BUTTON_CANCEL 2
95 | #define MB_BUTTON_USER 4
96 |
97 |
98 | ///////////////////////////////////////////////////////////////////////////
99 | /// Base Classes
100 | ///////////////////////////////////////////////////////////////////////////
101 |
102 | class RscProgressBar {
103 | access = 0;
104 | type = CT_PROGRESS;
105 | style = ST_HORIZONTAL;
106 | colorFrame[] = {0, 0, 0, 1};
107 | colorBar[] = {0, 0, 0, 0.5};
108 | shadow = 2;
109 | texture = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa";
110 | };
111 |
112 | class RscText
113 | {
114 | access = 0;
115 | type = 0;
116 | idc = -1;
117 | colorBackground[] = {0, 0, 0, 0};
118 | colorText[] = {1, 1, 1, 1};
119 | text = "";
120 | fixedWidth = 0;
121 | x = 0;
122 | y = 0;
123 | h = 0.037;
124 | w = 0.3;
125 | style = 0;
126 | shadow = 1;
127 | colorShadow[] = {0, 0, 0, 0.5};
128 | font = "PuristaMedium";
129 | SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
130 | linespacing = 1;
131 | };
132 | class RscStructuredText
133 | {
134 | access = 0;
135 | type = 13;
136 | idc = -1;
137 | style = 0;
138 | colorText[] = {1, 1, 1, 1};
139 | class Attributes
140 | {
141 | font = "PuristaMedium";
142 | color = "#ffffff";
143 | align = "left";
144 | shadow = 1;
145 | };
146 | x = 0;
147 | y = 0;
148 | h = 0.035;
149 | w = 0.1;
150 | text = "";
151 | size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
152 | shadow = 1;
153 | };
154 | class RscPicture
155 | {
156 | access = 0;
157 | type = 0;
158 | idc = -1;
159 | style = 48;
160 | colorBackground[] = {0, 0, 0, 0};
161 | colorText[] = {1, 1, 1, 1};
162 | font = "TahomaB";
163 | sizeEx = 0;
164 | lineSpacing = 0;
165 | text = "";
166 | fixedWidth = 0;
167 | shadow = 0;
168 | x = 0;
169 | y = 0;
170 | w = 0.2;
171 | h = 0.15;
172 | };
173 | class RscEdit
174 | {
175 | access = 0;
176 | type = CT_EDIT;
177 | style = ST_LEFT + ST_FRAME;
178 | x = 0;
179 | y = 0;
180 | h = 0.04;
181 | w = 0.2;
182 | colorBackground[] = {0, 0, 0, 1};
183 | colorText[] = {0.95, 0.95, 0.95, 1};
184 | colorDisabled[] = {1, 1, 1, 0.25};
185 | colorSelection[] =
186 | {
187 | "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])",
188 | "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])",
189 | "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",
190 | 1
191 | };
192 | autocomplete = "";
193 | text = "";
194 | size = 0.2;
195 | font = "PuristaMedium";
196 | shadow = 2;
197 | sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
198 | canModify = 1;
199 | };
200 | class RscCombo
201 | {
202 | access = 0;
203 | type = CT_COMBO;
204 | style = SL_TEXTURES + ST_NO_RECT;
205 | colorSelect[] = {0, 0, 0, 1};
206 | colorText[] = {1, 1, 1, 1};
207 | colorBackground[] = {0, 0, 0, 1};
208 | colorScrollbar[] = {1, 0, 0, 1};
209 | colorPicture[] = {1, 1, 1, 1};
210 | colorPictureSelected[] = {1, 1, 1, 1};
211 | colorPictureDisabled[] = {1, 1, 1, 1};
212 | soundSelect[] = {"\A3\ui_f\data\sound\RscCombo\soundSelect", 0.1, 1};
213 | soundExpand[] = {"\A3\ui_f\data\sound\RscCombo\soundExpand", 0.1, 1};
214 | soundCollapse[] = {"\A3\ui_f\data\sound\RscCombo\soundCollapse", 0.1, 1};
215 | maxHistoryDelay = 1;
216 | class ComboScrollBar
217 | {
218 | color[] = {1, 1, 1, 0.6};
219 | colorActive[] = {1, 1, 1, 1};
220 | colorDisabled[] = {1, 1, 1, 0.3};
221 | shadow = 0;
222 | thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
223 | arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
224 | arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
225 | border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa";
226 | };
227 | x = 0;
228 | y = 0;
229 | w = 0.12;
230 | h = 0.035;
231 | shadow = 0;
232 | colorSelectBackground[] = {1, 1, 1, 0.7};
233 | arrowEmpty = "\A3\ui_f\data\GUI\RscCommon\rsccombo\arrow_combo_ca.paa";
234 | arrowFull = "\A3\ui_f\data\GUI\RscCommon\rsccombo\arrow_combo_active_ca.paa";
235 | wholeHeight = 0.45;
236 | color[] = {1, 1, 1, 1};
237 | colorActive[] = {1, 0, 0, 1};
238 | colorDisabled[] = {1, 1, 1, 0.25};
239 | font = "PuristaMedium";
240 | sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
241 | };
242 | class RscListBox
243 | {
244 | access = 0;
245 | type = 5;
246 | w = 0.4;
247 | h = 0.4;
248 | rowHeight = 0;
249 | colorText[] = {1, 1, 1, 1};
250 | colorDisabled[] = {1, 1, 1, 0.25};
251 | colorScrollbar[] = {1, 0, 0, 0};
252 | colorSelect[] = {0, 0, 0, 1};
253 | colorSelect2[] = {0, 0, 0, 1};
254 | colorSelectBackground[] = {0.95, 0.95, 0.95, 1};
255 | colorSelectBackground2[] = {1, 1, 1, 0.5};
256 | colorBackground[] = {0, 0, 0, 0.3};
257 | soundSelect[] = {"\A3\ui_f\data\sound\RscListbox\soundSelect", 0.09, 1};
258 | arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)";
259 | arrowFull = "#(argb,8,8,3)color(1,1,1,1)";
260 | class ListScrollBar
261 | {
262 | color[] = {1, 1, 1, 0.6};
263 | colorActive[] = {1, 1, 1, 1};
264 | colorDisabled[] = {1, 1, 1, 0.3};
265 | shadow = 0;
266 | thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
267 | arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
268 | arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
269 | border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa";
270 | };
271 | style = 16;
272 | font = "PuristaMedium";
273 | sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
274 | shadow = 0;
275 | colorShadow[] = {0, 0, 0, 0.5};
276 | color[] = {1, 1, 1, 1};
277 | period = 1.2;
278 | maxHistoryDelay = 1;
279 | autoScrollSpeed = -1;
280 | autoScrollDelay = 5;
281 | autoScrollRewind = 0;
282 | };
283 | class RscButton
284 | {
285 | access = 0;
286 | type = 1;
287 | text = "";
288 | colorText[] = {1, 1, 1, 1};
289 | colorDisabled[] = {0.4, 0.4, 0.4, 1};
290 | colorBackground[] =
291 | {
292 | "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])",
293 | "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])",
294 | "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",
295 | 0.7
296 | };
297 | colorBackgroundDisabled[] = {0.95, 0.95, 0.95, 1};
298 | colorBackgroundActive[] =
299 | {
300 | "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])",
301 | "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])",
302 | "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",
303 | 1
304 | };
305 | colorFocused[] =
306 | {
307 | "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])",
308 | "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])",
309 | "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",
310 | 1
311 | };
312 | colorShadow[] = {0, 0, 0, 1};
313 | colorBorder[] = {0, 0, 0, 1};
314 | soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter", 0.09, 1};
315 | soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush", 0.09, 1};
316 | soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick", 0.09, 1};
317 | soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape", 0.09, 1};
318 | style = 2;
319 | x = 0;
320 | y = 0;
321 | w = 0.095589;
322 | h = 0.039216;
323 | shadow = 2;
324 | font = "PuristaMedium";
325 | sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
326 | offsetX = 0.003;
327 | offsetY = 0.003;
328 | offsetPressedX = 0.002;
329 | offsetPressedY = 0.002;
330 | borderSize = 0;
331 | };
332 | class RscShortcutButton
333 | {
334 | type = 16;
335 | x = 0.1;
336 | y = 0.1;
337 | class HitZone
338 | {
339 | left = 0;
340 | top = 0;
341 | right = 0;
342 | bottom = 0;
343 | };
344 | class ShortcutPos
345 | {
346 | left = 0;
347 | top = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2";
348 | w = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1) * (3/4)";
349 | h = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
350 | };
351 | class TextPos
352 | {
353 | left = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1) * (3/4)";
354 | top = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2";
355 | right = 0.005;
356 | bottom = 0;
357 | };
358 | shortcuts[] =
359 | {
360 | };
361 | textureNoShortcut = "#(argb,8,8,3)color(0,0,0,0)";
362 | color[] = {1, 1, 1, 1};
363 | color2[] = {0.95, 0.95, 0.95, 1};
364 | colorFocused[] = {1, 1, 1, 1};
365 | colorDisabled[] = {1, 1, 1, 0.25};
366 | colorBackground[] =
367 | {
368 | "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])",
369 | "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])",
370 | "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",
371 | 1
372 | };
373 | colorBackground2[] = {1, 1, 1, 1};
374 | colorBackgroundFocused[] =
375 | {
376 | "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])",
377 | "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])",
378 | "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",
379 | 1
380 | };
381 | soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter", 0.09, 1};
382 | soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush", 0.09, 1};
383 | soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick", 0.09, 1};
384 | soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape", 0.09, 1};
385 | class Attributes
386 | {
387 | font = "PuristaMedium";
388 | color = "#E5E5E5";
389 | align = "left";
390 | shadow = "true";
391 | };
392 | idc = -1;
393 | style = 0;
394 | default = 0;
395 | shadow = 1;
396 | w = 0.183825;
397 | h = "((((safezoneW / safezoneH) min 1.2) / 1.2) / 20)";
398 | animTextureDefault = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa";
399 | animTextureNormal = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa";
400 | animTextureDisabled = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa";
401 | animTextureOver = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\over_ca.paa";
402 | animTextureFocused = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\focus_ca.paa";
403 | animTexturePressed = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\down_ca.paa";
404 | periodFocus = 1.2;
405 | periodOver = 0.8;
406 | period = 0.4;
407 | font = "PuristaMedium";
408 | size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
409 | sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
410 | text = "";
411 | action = "";
412 | class AttributesImage
413 | {
414 | font = "PuristaMedium";
415 | color = "#E5E5E5";
416 | align = "left";
417 | };
418 | };
419 | class RscShortcutButtonMain
420 | {
421 | idc = -1;
422 | style = 0;
423 | default = 0;
424 | w = 0.313726;
425 | h = 0.104575;
426 | color[] = {1, 1, 1, 1};
427 | colorDisabled[] = {1, 1, 1, 0.25};
428 | class HitZone
429 | {
430 | left = 0;
431 | top = 0;
432 | right = 0;
433 | bottom = 0;
434 | };
435 | class ShortcutPos
436 | {
437 | left = 0.0145;
438 | top = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)) / 2";
439 | w = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2) * (3/4)";
440 | h = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)";
441 | };
442 | class TextPos
443 | {
444 | left = "(((safezoneW / safezoneH) min 1.2) / 32) * 1.5";
445 | top = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 20)*2 - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)) / 2";
446 | right = 0.005;
447 | bottom = 0;
448 | };
449 | animTextureNormal = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButtonMain\normal_ca.paa";
450 | animTextureDisabled = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButtonMain\disabled_ca.paa";
451 | animTextureOver = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButtonMain\over_ca.paa";
452 | animTextureFocused = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButtonMain\focus_ca.paa";
453 | animTexturePressed = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButtonMain\down_ca.paa";
454 | animTextureDefault = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButtonMain\normal_ca.paa";
455 | period = 0.5;
456 | font = "PuristaMedium";
457 | size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)";
458 | sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)";
459 | text = "";
460 | action = "";
461 | class Attributes
462 | {
463 | font = "PuristaMedium";
464 | color = "#E5E5E5";
465 | align = "left";
466 | shadow = "false";
467 | };
468 | class AttributesImage
469 | {
470 | font = "PuristaMedium";
471 | color = "#E5E5E5";
472 | align = "false";
473 | };
474 | };
475 | class RscFrame
476 | {
477 | type = 0;
478 | idc = -1;
479 | style = 64;
480 | shadow = 2;
481 | colorBackground[] = {0, 0, 0, 0};
482 | colorText[] = {1, 1, 1, 1};
483 | font = "PuristaMedium";
484 | sizeEx = 0.02;
485 | text = "";
486 | };
487 | class RscSlider
488 | {
489 | access = 0;
490 | type = 3;
491 | style = 1024;
492 | w = 0.3;
493 | color[] = {1, 1, 1, 0.8};
494 | colorActive[] = {1, 1, 1, 1};
495 | shadow = 0;
496 | h = 0.025;
497 | };
498 | class IGUIBack
499 | {
500 | type = 0;
501 | idc = 124;
502 | style = 128;
503 | text = "";
504 | colorText[] = {0, 0, 0, 0};
505 | font = "PuristaMedium";
506 | sizeEx = 0;
507 | shadow = 0;
508 | x = 0.1;
509 | y = 0.1;
510 | w = 0.1;
511 | h = 0.1;
512 | colorbackground[] =
513 | {
514 | "(profilenamespace getvariable ['IGUI_BCG_RGB_R',0])",
515 | "(profilenamespace getvariable ['IGUI_BCG_RGB_G',1])",
516 | "(profilenamespace getvariable ['IGUI_BCG_RGB_B',1])",
517 | "(profilenamespace getvariable ['IGUI_BCG_RGB_A',0.8])"
518 | };
519 | };
520 | class RscCheckbox
521 | {
522 | idc = -1;
523 | type = 7;
524 | style = 0;
525 | x = "LINE_X(XVAL)";
526 | y = "LINE_Y";
527 | w = "LINE_W(WVAL)";
528 | h = 0.029412;
529 | colorText[] = {1, 0, 0, 1};
530 | color[] = {0, 0, 0, 0};
531 | colorBackground[] = {0, 0, 1, 1};
532 | colorTextSelect[] = {0, 0.8, 0, 1};
533 | colorSelectedBg[] =
534 | {
535 | "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])",
536 | "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])",
537 | "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",
538 | 1
539 | };
540 | colorSelect[] = {0, 0, 0, 1};
541 | colorTextDisable[] = {0.4, 0.4, 0.4, 1};
542 | colorDisable[] = {0.4, 0.4, 0.4, 1};
543 | font = "PuristaMedium";
544 | sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)";
545 | rows = 1;
546 | columns = 1;
547 | strings[] =
548 | {
549 | "UNCHECKED"
550 | };
551 | checked_strings[] =
552 | {
553 | "CHECKED"
554 | };
555 | };
556 | class RscButtonMenu
557 | {
558 | idc = -1;
559 | type = 16;
560 | style = "0x02 + 0xC0";
561 | default = 0;
562 | shadow = 0;
563 | x = 0;
564 | y = 0;
565 | w = 0.095589;
566 | h = 0.039216;
567 | animTextureNormal = "#(argb,8,8,3)color(1,1,1,1)";
568 | animTextureDisabled = "#(argb,8,8,3)color(1,1,1,1)";
569 | animTextureOver = "#(argb,8,8,3)color(1,1,1,0.5)";
570 | animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)";
571 | animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)";
572 | animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)";
573 | colorBackground[] = {0, 0, 0, 0.8};
574 | colorBackground2[] = {1, 1, 1, 0.5};
575 | color[] = {1, 1, 1, 1};
576 | color2[] = {1, 1, 1, 1};
577 | colorText[] = {1, 1, 1, 1};
578 | colorDisabled[] = {1, 1, 1, 0.25};
579 | period = 1.2;
580 | periodFocus = 1.2;
581 | periodOver = 1.2;
582 | size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
583 | sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
584 | class TextPos
585 | {
586 | left = "0.25 * (((safezoneW / safezoneH) min 1.2) / 40)";
587 | top = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2";
588 | right = 0.005;
589 | bottom = 0;
590 | };
591 | class Attributes
592 | {
593 | font = "PuristaLight";
594 | color = "#E5E5E5";
595 | align = "left";
596 | shadow = "false";
597 | };
598 | class ShortcutPos
599 | {
600 | left = "(6.25 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.0225 - 0.005";
601 | top = 0.005;
602 | w = 0.0225;
603 | h = 0.03;
604 | };
605 | soundEnter[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundEnter", 0.09, 1};
606 | soundPush[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundPush", 0.09, 1};
607 | soundClick[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundClick", 0.09, 1};
608 | soundEscape[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundEscape", 0.09, 1};
609 | };
610 | class RscButtonMenuOK
611 | {
612 | idc = 1;
613 | shortcuts[] =
614 | {
615 | "0x00050000 + 0",
616 | 28,
617 | 57,
618 | 156
619 | };
620 | default = 1;
621 | text = "OK";
622 | soundPush[] = {"\A3\ui_f\data\sound\RscButtonMenuOK\soundPush", 0.09, 1};
623 | };
624 | class RscButtonMenuCancel
625 | {
626 | idc = 2;
627 | shortcuts[] =
628 | {
629 | "0x00050000 + 1"
630 | };
631 | text = "Cancel";
632 | };
633 | class RscControlsGroup
634 | {
635 | class VScrollbar
636 | {
637 | color[] = {1, 1, 1, 1};
638 | width = 0.021;
639 | autoScrollSpeed = -1;
640 | autoScrollDelay = 5;
641 | autoScrollRewind = 0;
642 | shadow = 0;
643 | };
644 | class HScrollbar
645 | {
646 | color[] = {1, 1, 1, 1};
647 | height = 0.028;
648 | shadow = 0;
649 | };
650 | class ScrollBar
651 | {
652 | color[] = {1, 1, 1, 0.6};
653 | colorActive[] = {1, 1, 1, 1};
654 | colorDisabled[] = {1, 1, 1, 0.3};
655 | shadow = 0;
656 | thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
657 | arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
658 | arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
659 | border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa";
660 | };
661 | class Controls
662 | {
663 | };
664 | type = 15;
665 | idc = -1;
666 | x = 0;
667 | y = 0;
668 | w = 1;
669 | h = 1;
670 | shadow = 0;
671 | style = 16;
672 | };
673 | class RscControlsGroup_NoScroll : RscControlsGroup
674 | {
675 | class VScrollbar
676 | {
677 | color[] = {0, 0, 0, 0};
678 | width = 0;
679 | };
680 | class HScrollbar
681 | {
682 | color[] = {0, 0, 0, 0};
683 | height = 0;
684 | };
685 | class ScrollBar
686 | {
687 | color[] = {0, 0, 0, 0};
688 | colorActive[] = {0, 0, 0, 0};
689 | colorDisabled[] = {0, 0, 0, 0};
690 | };
691 | };
692 |
--------------------------------------------------------------------------------
/mission-files/badmin/client/systems/common.hpp:
--------------------------------------------------------------------------------
1 | // *****************************************************************************************
2 | // * This script is licensed under the GNU Lesser GPL v3. Copyright © 2015 A3Wasteland.com *
3 | // *****************************************************************************************
4 | /*
5 | @file Version: 1.0
6 | @file Name: common.hpp
7 | @file Author: [404] Deadbeat
8 | @file Created: 11/09/2012 04:23
9 | @file Args:
10 | */
11 |
12 | #define CT_STATIC 0
13 | #define CT_BUTTON 1
14 | #define CT_EDIT 2
15 | #define CT_SLIDER 3
16 | #define CT_COMBO 4
17 | #define CT_LISTBOX 5
18 | #define CT_TOOLBOX 6
19 | #define CT_CHECKBOXES 7
20 | #define CT_PROGRESS 8
21 | #define CT_HTML 9
22 | #define CT_STATIC_SKEW 10
23 | #define CT_ACTIVETEXT 11
24 | #define CT_TREE 12
25 | #define CT_STRUCTURED_TEXT 13
26 | #define CT_CONTEXT_MENU 14
27 | #define CT_CONTROLS_GROUP 15
28 | #define CT_SHORTCUT_BUTTON 16 // Arma 2 - textured button
29 | #define CT_XKEYDESC 40
30 | #define CT_XBUTTON 41
31 | #define CT_XLISTBOX 42
32 | #define CT_XSLIDER 43
33 | #define CT_XCOMBO 44
34 | #define CT_ANIMATED_TEXTURE 45
35 | #define CT_CHECKBOX 77
36 | #define CT_OBJECT 80
37 | #define CT_OBJECT_ZOOM 81
38 | #define CT_OBJECT_CONTAINER 82
39 | #define CT_OBJECT_CONT_ANIM 83
40 | #define CT_LINEBREAK 98
41 | #define CT_USER 99
42 | #define CT_MAP 100
43 | #define CT_MAP_MAIN 101
44 | #define CT_List_N_Box 102 // Arma 2 - N columns list box
45 |
46 | // Static styles
47 | #define ST_POS 0x0F
48 | #define ST_HPOS 0x03
49 | #define ST_VPOS 0x0C
50 | #define ST_LEFT 0x00
51 | #define ST_RIGHT 0x01
52 | #define ST_CENTER 0x02
53 | #define ST_DOWN 0x04
54 | #define ST_UP 0x08
55 | #define ST_VCENTER 0x0c
56 | #define ST_TYPE 0xF0
57 | #define ST_SINGLE 0
58 | #define ST_MULTI 16
59 | #define ST_TITLE_BAR 32
60 | #define ST_PICTURE 48
61 | #define ST_FRAME 64
62 | #define ST_BACKGROUND 80
63 | #define ST_GROUP_BOX 96
64 | #define ST_GROUP_BOX2 112
65 | #define ST_HUD_BACKGROUND 128
66 | #define ST_TILE_PICTURE 144
67 | #define ST_WITH_RECT 160
68 | #define ST_LINE 176
69 | #define ST_SHADOW 0x100
70 | #define ST_NO_RECT 0x200
71 | #define ST_KEEP_ASPECT_RATIO 0x800
72 | #define ST_TITLE ST_TITLE_BAR + ST_CENTER
73 |
74 | // Slider styles
75 | #define SL_DIR 0x400
76 | #define SL_VERT 0
77 | #define SL_HORZ 0x400
78 | #define SL_TEXTURES 0x10
79 |
80 | // Listbox styles
81 | #define LB_TEXTURES 0x10
82 | #define LB_MULTI 0x20
83 |
84 | #define true 1
85 | #define false 1
86 |
87 | class w_RscText {
88 |
89 | idc = -1;
90 | type = CT_STATIC;
91 | style = ST_LEFT;
92 | colorBackground[] = { 1 , 1 , 1 , 0 };
93 | colorText[] = { 1 , 1 , 1 , 1 };
94 | font = "PuristaMedium";
95 | sizeEx = 0.025;
96 | h = 0.25;
97 | text = "";
98 | };
99 |
100 | class w_RscTextCenter : w_RscText
101 | {
102 | style = ST_CENTER;
103 | };
104 |
105 | class w_RscStructuredText
106 | {
107 | access = 0;
108 | type = 13;
109 | idc = -1;
110 | style = 0;
111 | colorText[] = { 1 , 1 , 1 , 1 };
112 | class Attributes
113 | {
114 | font = "PuristaMedium";
115 | //color = "#e0d8a6";
116 | align = "center";
117 | shadow = 0;
118 | };
119 | x = 0;
120 | y = 0;
121 | h = 0.035;
122 | w = 0.1;
123 | text = "";
124 | size = 0.03921;
125 | shadow = 2;
126 | };
127 |
128 | class w_RscStructuredTextLeft
129 | {
130 | access = 0;
131 | type = 13;
132 | idc = -1;
133 | style = 0;
134 | colorText[] = { 1 , 1 , 1 , 1 };
135 | class Attributes
136 | {
137 | font = "PuristaMedium";
138 | //color = "#e0d8a6";
139 | align = "left";
140 | shadow = 0;
141 | };
142 | x = 0;
143 | y = 0;
144 | h = 0.035;
145 | w = 0.1;
146 | text = "";
147 | size = 0.03921;
148 | shadow = 2;
149 | };
150 |
151 | class w_RscBackground
152 | {
153 |
154 | colorBackground[] = {0.14, 0.18, 0.13, 0.8};
155 | text = "";
156 | type = CT_STATIC;
157 | idc = -1;
158 | style = ST_LEFT;
159 | colorText[] = {1, 1, 1, 1};
160 | font = "PuristaMedium";
161 | sizeEx = 0.04;
162 | };
163 |
164 | class w_RscEdit
165 | {
166 | idc = -1;
167 | type = CT_EDIT;
168 | style = ST_LEFT;
169 | x = 0;
170 | y = 0;
171 | w = .2;
172 | h = .4;
173 | sizeEx = .02;
174 | font = "PuristaMedium";
175 |
176 | text = "";
177 | colorText[] = {1,1,1,1};
178 |
179 | autocomplete = false;
180 | colorSelection[] = {0,0,0,1};
181 | };
182 |
183 | class w_RscListBox
184 | {
185 | idc = -1;
186 | type = CT_LISTBOX;
187 | style = ST_MULTI;
188 | w = 0.4;
189 | h = 0.4;
190 | rowHeight = 0;
191 | colorText[] = {1, 1, 1, 1};
192 | colorDisabled[] = {1, 1, 1, 0.25};
193 | colorScrollbar[] = {1, 0, 0, 0};
194 | colorSelect[] = {0, 0, 0, 1};
195 | colorSelect2[] = {0, 0, 0, 1};
196 | colorSelectBackground[] = {0.95, 0.95, 0.95, 1};
197 | colorSelectBackground2[] = {1, 1, 1, 0.5};
198 | colorBackground[] = {0, 0, 0, 0.3};
199 | soundSelect[] = {"\A3\ui_f\data\sound\RscListbox\soundSelect", 0.09, 1};
200 | autoScrollSpeed = -1;
201 | autoScrollDelay = 5;
202 | autoScrollRewind = 0;
203 | arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)";
204 | arrowFull = "#(argb,8,8,3)color(1,1,1,1)";
205 | colorPicture[] = {1, 1, 1, 1};
206 | colorPictureSelected[] = {1, 1, 1, 1};
207 | colorPictudeDisabled[] = {1, 1, 1, 0.25};
208 | tooltipColorText[] = {1, 1, 1, 1};
209 | tooltipColorBox[] = {1, 1, 1, 1};
210 | tooltipColorShade[] = {0, 0, 0, 0.65};
211 | font = "PuristaMedium";
212 | sizeEx = 0.035;
213 | shadow = 0;
214 | colorShadow[] = {0, 0, 0, 0.5};
215 | period = 0.8;
216 | maxHistoryDelay = 1;
217 | colorPictureDisabled[] = {1, 1, 1, 1};
218 |
219 | class ListScrollBar
220 | {
221 | color[] = {1, 1, 1, 1};
222 | colorActive[] = {1, 1, 1, 1};
223 | colorDisabled[] = {1, 1, 1, 0.3};
224 | thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
225 | arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
226 | arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
227 | border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa";
228 | };
229 | };
230 |
231 | class w_RscList: w_RscListBox {};
232 |
233 | class w_RscPicture
234 | {
235 |
236 | idc = -1;
237 | type = CT_STATIC;
238 | style = ST_PICTURE;
239 |
240 | font = "PuristaMedium";
241 | sizeEx = 0.023;
242 |
243 | colorBackground[] = {};
244 | colorText[] = {};
245 |
246 | x = 0.0; y = 0.2;
247 | w = 0.2; h = 0.2;
248 |
249 | text = "";
250 |
251 | };
252 |
253 | class w_RscButtonBase {
254 |
255 | idc = -1;
256 | type = 16;
257 | style = 0;
258 |
259 | w = 0.183825;
260 | h = 0.104575;
261 |
262 | color[] = {0.95, 0.95, 0.95, 1};
263 | color2[] = {1, 1, 1, 0.4};
264 | colorBackground[] = {0.75, 0.75, 0.75, 0.8};
265 | colorbackground2[] = {1, 1, 1, 0.4};
266 | colorDisabled[] = {1, 1, 1, 0.25};
267 |
268 | periodFocus = 1.2;
269 | periodOver = 0.8;
270 |
271 | class HitZone {
272 |
273 | left = 0.004;
274 | top = 0.029;
275 | right = 0.004;
276 | bottom = 0.029;
277 |
278 | };
279 |
280 | class ShortcutPos {
281 |
282 | left = 0.004;
283 | top = 0.026;
284 | w = 0.0392157;
285 | h = 0.0522876;
286 |
287 | };
288 |
289 | class TextPos {
290 |
291 | left = 0.05;
292 | top = 0.025;
293 | right = 0.005;
294 | bottom = 0.025;
295 |
296 | };
297 |
298 | animTextureDefault = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa";
299 | animTextureNormal = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa";
300 | animTextureDisabled = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa";
301 | animTextureOver = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\over_ca.paa";
302 | animTextureFocused = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\focus_ca.paa";
303 | animTexturePressed = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\down_ca.paa";
304 | textureNoShortcut = "";
305 |
306 | period = 0.4;
307 | font = "PuristaMedium";
308 | size = 0.023;
309 | sizeEx = 0.023;
310 | text = "";
311 |
312 | soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter", 0.09, 1};
313 | soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush", 0.09, 1};
314 | soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick", 0.09, 1};
315 | soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape", 0.09, 1};
316 |
317 | action = "";
318 |
319 | class Attributes {
320 |
321 | font = "PuristaMedium";
322 | color = "#E5E5E5";
323 | align = "left";
324 | shadow = false;
325 |
326 | };
327 |
328 | class AttributesImage {
329 |
330 | font = "PuristaMedium";
331 | color = "#E5E5E5";
332 | align = "left";
333 |
334 | };
335 | };
336 |
337 | class w_RscButton
338 | {
339 | access = 0;
340 | type = CT_BUTTON;
341 | text = "";
342 | colorText[] = {1,1,1,.9};
343 | colorDisabled[] = {0,0,0,1};
344 | colorBackground[] = {0.2,0.41,0.78,1}; // normal
345 | colorFocused[] = {0.14,0.25,0.49,1}; // pulse
346 | colorBackgroundActive[] = {0.25,0.51,0.96,1}; // hover
347 | colorBackgroundDisabled[] = {0.3,0.3,0.3,1};
348 | colorShadow[] = {0,0,0,1};
349 | colorBorder[] = {0,0,0,1};
350 | soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter", 0.09, 1};
351 | soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush", 0.09, 1};
352 | soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick", 0.09, 1};
353 | soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape", 0.09, 1};
354 | animTextureDefault = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa";
355 | animTextureNormal = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa";
356 | animTextureDisabled = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa";
357 | animTextureOver = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\over_ca.paa";
358 | animTextureFocused = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\focus_ca.paa";
359 | animTexturePressed = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\down_ca.paa";
360 | style = 2;
361 | x = 0;
362 | y = 0;
363 | w = 0.055589;
364 | h = 0.039216;
365 | shadow = 0;
366 | font = "PuristaMedium";
367 | sizeEx = 0.04;
368 | offsetX = 0.003;
369 | offsetY = 0.003;
370 | offsetPressedX = 0.002;
371 | offsetPressedY = 0.002;
372 | borderSize = 0;
373 | };
374 |
375 | class w_RscCombo {
376 |
377 | idc = -1;
378 | type = 4;
379 | style = 0;
380 | x = "0.0 + 0.365";
381 | y = "0.0 + 0.038";
382 | w = 0.301000;
383 | h = 0.039216;
384 | font = "PuristaMedium";
385 | sizeEx = 0.025000;
386 | rowHeight = 0.025000;
387 | wholeHeight = "4 * 0.2";
388 | color[] = {1, 1, 1, 1};
389 | colorDisabled[] = {0,0,0,0.3};
390 | colorText[] = {0, 0, 0, 1};
391 | colorBackground[] = {1, 1, 1, 1};
392 | colorSelect[] = {1, 0, 0, 1};
393 | colorSelectBackground[] = {0.25,0.51,0.96,0.5};
394 | soundSelect[] = {"", 0.000000, 1};
395 | soundExpand[] = {"", 0.000000, 1};
396 | soundCollapse[] = {"", 0.000000, 1};
397 | maxHistoryDelay = 10;
398 | autoScrollSpeed = -1;
399 | autoScrollDelay = 5;
400 | autoScrollRewind = 0;
401 | colorScrollbar[] = {0.2, 0.2, 0.2, 1};
402 |
403 | period = 1;
404 | thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
405 | arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
406 | arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
407 | border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa";
408 |
409 | class ComboScrollBar {
410 | color[] = {1, 1, 1, 0.6};
411 | colorActive[] = {1, 1, 1, 1};
412 | colorDisabled[] = {1, 1, 1, 0.3};
413 | thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
414 | arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
415 | arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
416 | border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa";
417 | };
418 | };
419 |
420 | class w_RscCheckBox
421 | {
422 | idc = -1;
423 | type = CT_CHECKBOX;
424 | style = 0;
425 | checked = 0;
426 | w = "0.04 * (safezoneW min safezoneH)";
427 | h = "0.04 * (safezoneW min safezoneH)";
428 | color[] = {1, 1, 1, 0.7};
429 | colorFocused[] = {1, 1, 1, 1};
430 | colorHover[] = {1, 1, 1, 1};
431 | colorPressed[] = {1, 1, 1, 1};
432 | colorDisabled[] = {1, 1, 1, 0.2};
433 | colorBackground[] = {0, 0, 0, 0};
434 | colorBackgroundFocused[] = {0, 0, 0, 0};
435 | colorBackgroundHover[] = {0, 0, 0, 0};
436 | colorBackgroundPressed[] = {0, 0, 0, 0};
437 | colorBackgroundDisabled[] = {0, 0, 0, 0};
438 | textureChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa";
439 | textureUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa";
440 | textureFocusedChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa";
441 | textureFocusedUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa";
442 | textureHoverChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa";
443 | textureHoverUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa";
444 | texturePressedChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa";
445 | texturePressedUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa";
446 | textureDisabledChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa";
447 | textureDisabledUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa";
448 | tooltipColorText[] = {1, 1, 1, 1};
449 | tooltipColorBox[] = {1, 1, 1, 1};
450 | tooltipColorShade[] = {1, 1, 1, 1};
451 | soundEnter[] = {1, 1, 1, 1};
452 | soundPush[] = {1, 1, 1, 1};
453 | soundClick[] = {1, 1, 1, 1};
454 | soundEscape[] = {1, 1, 1, 1};
455 | };
456 |
457 | class w_RscXListBox
458 | {
459 | idc = -1;
460 | type = CT_XLISTBOX;
461 | style = SL_HORZ + SL_TEXTURES + ST_CENTER;
462 | x = 0;
463 | y = 0;
464 | w = 0.5;
465 | h = 0.1;
466 | color[] = {1, 1, 1, 0.6};
467 | colorActive[] = {1, 1, 1, 1};
468 | colorDisabled[] = {1, 1, 1, 0.25};
469 | colorSelect[] = {0.95, 0.95, 0.95, 1};
470 | colorText[] = {1, 1, 1, 1};
471 | soundSelect[] = {"\A3\ui_f\data\sound\RscListbox\soundSelect", 0.09, 1};
472 | colorPicture[] = {1, 1, 1, 1};
473 | colorPictureSelected[] = {1, 1, 1, 1};
474 | colorPictudeDisabled[] = {1, 1, 1, 0.25};
475 | tooltipColorText[] = {1, 1, 1, 1};
476 | tooltipColorBox[] = {1, 1, 1, 1};
477 | tooltipColorShade[] = {0, 0, 0, 0.65};
478 | shadow = 2;
479 | arrowEmpty = "\A3\ui_f\data\gui\cfg\slider\arrowEmpty_ca.paa";
480 | arrowFull = "\A3\ui_f\data\gui\cfg\slider\arrowFull_ca.paa";
481 | border = "\A3\ui_f\data\gui\cfg\slider\border_ca.paa";
482 | font = "PuristaMedium";
483 | sizeEx = 0.035;
484 | };
485 |
486 | class w_RscMapControl
487 | {
488 | type = CT_MAP_MAIN;
489 | style = ST_PICTURE;
490 | idc = 51;
491 | colorBackground[] = {0.969, 0.957, 0.949, 1};
492 | colorOutside[] = {0, 0, 0, 1};
493 | colorText[] = {0, 0, 0, 1};
494 | font = "TahomaB";
495 | sizeEx = 0.04;
496 | colorSea[] = {0.467, 0.631, 0.851, 0.5};
497 | colorForest[] = {0.624, 0.78, 0.388, 0.5};
498 | colorRocks[] = {0, 0, 0, 0.3};
499 | colorCountlines[] = {0.572, 0.354, 0.188, 0.25};
500 | colorMainCountlines[] = {0.572, 0.354, 0.188, 0.5};
501 | colorCountlinesWater[] = {0.491, 0.577, 0.702, 0.3};
502 | colorMainCountlinesWater[] = {0.491, 0.577, 0.702, 0.6};
503 | colorForestBorder[] = {0, 0, 0, 0};
504 | colorRocksBorder[] = {0, 0, 0, 0};
505 | colorPowerLines[] = {0.1, 0.1, 0.1, 1};
506 | colorRailWay[] = {0.8, 0.2, 0, 1};
507 | colorNames[] = {0.1, 0.1, 0.1, 0.9};
508 | colorInactive[] = {1, 1, 1, 0.5};
509 | colorLevels[] = {0.286, 0.177, 0.094, 0.5};
510 | colorTracks[] = {0.84, 0.76, 0.65, 0.15};
511 | colorRoads[] = {0.7, 0.7, 0.7, 1};
512 | colorMainRoads[] = {0.9, 0.5, 0.3, 1};
513 | colorTracksFill[] = {0.84, 0.76, 0.65, 1};
514 | colorRoadsFill[] = {1, 1, 1, 1};
515 | colorMainRoadsFill[] = {1, 0.6, 0.4, 1};
516 | colorGrid[] = {0.1, 0.1, 0.1, 0.6};
517 | colorGridMap[] = {0.1, 0.1, 0.1, 0.6};
518 | stickX[] = {0.2, {"Gamma", 1, 1.5}};
519 | stickY[] = {0.2, {"Gamma", 1, 1.5}};
520 | moveOnEdges = 1;
521 | x = 0;
522 | y = 0;
523 | w = 1;
524 | h = 1;
525 | shadow = 0;
526 | ptsPerSquareSea = 5;
527 | ptsPerSquareTxt = 20;
528 | ptsPerSquareCLn = 10;
529 | ptsPerSquareExp = 10;
530 | ptsPerSquareCost = 10;
531 | ptsPerSquareFor = 9;
532 | ptsPerSquareForEdge = 9;
533 | ptsPerSquareRoad = 6;
534 | ptsPerSquareObj = 9;
535 | showCountourInterval = 0;
536 | scaleMin = 0.001;
537 | scaleMax = 1;
538 | scaleDefault = 0.16;
539 | maxSatelliteAlpha = 0.85;
540 | alphaFadeStartScale = 2;
541 | alphaFadeEndScale = 2;
542 | fontLabel = "PuristaMedium";
543 | sizeExLabel = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)";
544 | fontGrid = "TahomaB";
545 | sizeExGrid = 0.02;
546 | fontUnits = "TahomaB";
547 | sizeExUnits = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)";
548 | fontNames = "EtelkaNarrowMediumPro";
549 | sizeExNames = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8) * 2";
550 | fontInfo = "PuristaMedium";
551 | sizeExInfo = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)";
552 | fontLevel = "TahomaB";
553 | sizeExLevel = 0.02;
554 | text = "#(argb,8,8,3)color(1,1,1,1)";
555 |
556 | class Legend {
557 | colorBackground[] = {1, 1, 1, 0.5};
558 | color[] = {0, 0, 0, 1};
559 | x = "SafeZoneX + (((safezoneW / safezoneH) min 1.2) / 40)";
560 | y = "SafeZoneY + safezoneH - 4.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
561 | w = "10 * (((safezoneW / safezoneH) min 1.2) / 40)";
562 | h = "3.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
563 | font = "PuristaMedium";
564 | sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)";
565 | };
566 | class ActiveMarker {
567 | color[] = {0.3, 0.1, 0.9, 1};
568 | size = 50;
569 | };
570 | class Command {
571 | color[] = {1, 1, 1, 1};
572 | icon = "\A3\ui_f\data\map\mapcontrol\waypoint_ca.paa";
573 | size = 18;
574 | importance = 1;
575 | coefMin = 1;
576 | coefMax = 1;
577 | };
578 | class Task {
579 | colorCreated[] = {1, 1, 1, 1};
580 | colorCanceled[] = {0.7, 0.7, 0.7, 1};
581 | colorDone[] = {0.7, 1, 0.3, 1};
582 | colorFailed[] = {1, 0.3, 0.2, 1};
583 | color[] = {"(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])", "(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])", "(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])", "(profilenamespace getvariable ['IGUI_TEXT_RGB_A',0.8])"};
584 | icon = "\A3\ui_f\data\map\mapcontrol\taskIcon_CA.paa";
585 | iconCreated = "\A3\ui_f\data\map\mapcontrol\taskIconCreated_CA.paa";
586 | iconCanceled = "\A3\ui_f\data\map\mapcontrol\taskIconCanceled_CA.paa";
587 | iconDone = "\A3\ui_f\data\map\mapcontrol\taskIconDone_CA.paa";
588 | iconFailed = "\A3\ui_f\data\map\mapcontrol\taskIconFailed_CA.paa";
589 | size = 27;
590 | importance = 1;
591 | coefMin = 1;
592 | coefMax = 1;
593 | };
594 | class CustomMark {
595 | color[] = {0, 0, 0, 1};
596 | icon = "\A3\ui_f\data\map\mapcontrol\custommark_ca.paa";
597 | size = 24;
598 | importance = 1;
599 | coefMin = 1;
600 | coefMax = 1;
601 | };
602 | class Tree {
603 | color[] = {0.45, 0.64, 0.33, 0.4};
604 | icon = "\A3\ui_f\data\map\mapcontrol\bush_ca.paa";
605 | size = 12;
606 | importance = "0.9 * 16 * 0.05";
607 | coefMin = 0.25;
608 | coefMax = 4;
609 | };
610 | class SmallTree {
611 | color[] = {0.45, 0.64, 0.33, 0.4};
612 | icon = "\A3\ui_f\data\map\mapcontrol\bush_ca.paa";
613 | size = 12;
614 | importance = "0.6 * 12 * 0.05";
615 | coefMin = 0.25;
616 | coefMax = 4;
617 | };
618 | class Bush {
619 | color[] = {0.45, 0.64, 0.33, 0.4};
620 | icon = "\A3\ui_f\data\map\mapcontrol\bush_ca.paa";
621 | size = "14/2";
622 | importance = "0.2 * 14 * 0.05 * 0.05";
623 | coefMin = 0.25;
624 | coefMax = 4;
625 | };
626 | class Church {
627 | color[] = {1, 1, 1, 1};
628 | icon = "\A3\ui_f\data\map\mapcontrol\church_CA.paa";
629 | size = 24;
630 | importance = 1;
631 | coefMin = 0.85;
632 | coefMax = 1;
633 | };
634 | class Chapel {
635 | color[] = {0, 0, 0, 1};
636 | icon = "\A3\ui_f\data\map\mapcontrol\Chapel_CA.paa";
637 | size = 24;
638 | importance = 1;
639 | coefMin = 0.85;
640 | coefMax = 1;
641 | };
642 | class Cross {
643 | color[] = {0, 0, 0, 1};
644 | icon = "\A3\ui_f\data\map\mapcontrol\Cross_CA.paa";
645 | size = 24;
646 | importance = 1;
647 | coefMin = 0.85;
648 | coefMax = 1;
649 | };
650 | class Rock {
651 | color[] = {0.1, 0.1, 0.1, 0.8};
652 | icon = "\A3\ui_f\data\map\mapcontrol\rock_ca.paa";
653 | size = 12;
654 | importance = "0.5 * 12 * 0.05";
655 | coefMin = 0.25;
656 | coefMax = 4;
657 | };
658 | class Bunker {
659 | color[] = {0, 0, 0, 1};
660 | icon = "\A3\ui_f\data\map\mapcontrol\bunker_ca.paa";
661 | size = 14;
662 | importance = "1.5 * 14 * 0.05";
663 | coefMin = 0.25;
664 | coefMax = 4;
665 | };
666 | class Fortress {
667 | color[] = {0, 0, 0, 1};
668 | icon = "\A3\ui_f\data\map\mapcontrol\bunker_ca.paa";
669 | size = 16;
670 | importance = "2 * 16 * 0.05";
671 | coefMin = 0.25;
672 | coefMax = 4;
673 | };
674 | class Fountain {
675 | color[] = {0, 0, 0, 1};
676 | icon = "\A3\ui_f\data\map\mapcontrol\fountain_ca.paa";
677 | size = 11;
678 | importance = "1 * 12 * 0.05";
679 | coefMin = 0.25;
680 | coefMax = 4;
681 | };
682 | class ViewTower {
683 | color[] = {0, 0, 0, 1};
684 | icon = "\A3\ui_f\data\map\mapcontrol\viewtower_ca.paa";
685 | size = 16;
686 | importance = "2.5 * 16 * 0.05";
687 | coefMin = 0.5;
688 | coefMax = 4;
689 | };
690 | class Lighthouse {
691 | color[] = {1, 1, 1, 1};
692 | icon = "\A3\ui_f\data\map\mapcontrol\lighthouse_CA.paa";
693 | size = 24;
694 | importance = 1;
695 | coefMin = 0.85;
696 | coefMax = 1;
697 | };
698 | class Quay {
699 | color[] = {1, 1, 1, 1};
700 | icon = "\A3\ui_f\data\map\mapcontrol\quay_CA.paa";
701 | size = 24;
702 | importance = 1;
703 | coefMin = 0.85;
704 | coefMax = 1;
705 | };
706 | class Fuelstation {
707 | color[] = {1, 1, 1, 1};
708 | icon = "\A3\ui_f\data\map\mapcontrol\fuelstation_CA.paa";
709 | size = 24;
710 | importance = 1;
711 | coefMin = 0.85;
712 | coefMax = 1;
713 | };
714 | class Hospital {
715 | color[] = {1, 1, 1, 1};
716 | icon = "\A3\ui_f\data\map\mapcontrol\hospital_CA.paa";
717 | size = 24;
718 | importance = 1;
719 | coefMin = 0.85;
720 | coefMax = 1;
721 | };
722 | class BusStop {
723 | color[] = {1, 1, 1, 1};
724 | icon = "\A3\ui_f\data\map\mapcontrol\busstop_CA.paa";
725 | size = 24;
726 | importance = 1;
727 | coefMin = 0.85;
728 | coefMax = 1;
729 | };
730 | class Transmitter {
731 | color[] = {1, 1, 1, 1};
732 | icon = "\A3\ui_f\data\map\mapcontrol\transmitter_CA.paa";
733 | size = 24;
734 | importance = 1;
735 | coefMin = 0.85;
736 | coefMax = 1;
737 | };
738 | class Stack {
739 | color[] = {0, 0, 0, 1};
740 | icon = "\A3\ui_f\data\map\mapcontrol\stack_ca.paa";
741 | size = 20;
742 | importance = "2 * 16 * 0.05";
743 | coefMin = 0.9;
744 | coefMax = 4;
745 | };
746 | class Ruin {
747 | color[] = {0, 0, 0, 1};
748 | icon = "\A3\ui_f\data\map\mapcontrol\ruin_ca.paa";
749 | size = 16;
750 | importance = "1.2 * 16 * 0.05";
751 | coefMin = 1;
752 | coefMax = 4;
753 | };
754 | class Tourism {
755 | color[] = {0, 0, 0, 1};
756 | icon = "\A3\ui_f\data\map\mapcontrol\tourism_ca.paa";
757 | size = 16;
758 | importance = "1 * 16 * 0.05";
759 | coefMin = 0.7;
760 | coefMax = 4;
761 | };
762 | class Watertower {
763 | color[] = {1, 1, 1, 1};
764 | icon = "\A3\ui_f\data\map\mapcontrol\watertower_CA.paa";
765 | size = 24;
766 | importance = 1;
767 | coefMin = 0.85;
768 | coefMax = 1;
769 | };
770 | class Waypoint {
771 | color[] = {0, 0, 0, 1};
772 | size = 24;
773 | importance = 1;
774 | coefMin = 1;
775 | coefMax = 1;
776 | icon = "\A3\ui_f\data\map\mapcontrol\waypoint_ca.paa";
777 | };
778 | class WaypointCompleted {
779 | color[] = {0, 0, 0, 1};
780 | size = 24;
781 | importance = 1;
782 | coefMin = 1;
783 | coefMax = 1;
784 | icon = "\A3\ui_f\data\map\mapcontrol\waypointCompleted_ca.paa";
785 | };
786 | class power {
787 | icon = "\A3\ui_f\data\map\mapcontrol\power_CA.paa";
788 | size = 24;
789 | importance = 1;
790 | coefMin = 0.85;
791 | coefMax = 1;
792 | color[] = {1, 1, 1, 1};
793 | };
794 | class powersolar {
795 | icon = "\A3\ui_f\data\map\mapcontrol\powersolar_CA.paa";
796 | size = 24;
797 | importance = 1;
798 | coefMin = 0.85;
799 | coefMax = 1;
800 | color[] = {1, 1, 1, 1};
801 | };
802 | class powerwave {
803 | icon = "\A3\ui_f\data\map\mapcontrol\powerwave_CA.paa";
804 | size = 24;
805 | importance = 1;
806 | coefMin = 0.85;
807 | coefMax = 1;
808 | color[] = {1, 1, 1, 1};
809 | };
810 | class powerwind {
811 | icon = "\A3\ui_f\data\map\mapcontrol\powerwind_CA.paa";
812 | size = 24;
813 | importance = 1;
814 | coefMin = 0.85;
815 | coefMax = 1;
816 | color[] = {1, 1, 1, 1};
817 | };
818 | class Shipwreck {
819 | icon = "\A3\ui_f\data\map\mapcontrol\Shipwreck_CA.paa";
820 | size = 24;
821 | importance = 1;
822 | coefMin = 0.85;
823 | coefMax = 1;
824 | color[] = {0, 0, 0, 1};
825 | };
826 | };
827 |
--------------------------------------------------------------------------------
/mission-files/badmin/client/camera/functions.sqf:
--------------------------------------------------------------------------------
1 | #include "dikcodes.h"
2 | #include "macro.h"
3 |
4 | if (not(undefined(camera_functions_defined))) exitWith {nil};
5 | diag_log format["Loading camera functions ..."];
6 |
7 | object_calcualte_vectors = {
8 | ARGVX2(0,_data);
9 | def(_direction);
10 | def(_angle);
11 | def(_pitch);
12 |
13 | _direction = _data select 0;
14 | _angle = _data select 1;
15 | _pitch = _data select 2;
16 |
17 | _vecdx = sin(_direction) * cos(_angle);
18 | _vecdy = cos(_direction) * cos(_angle);
19 | _vecdz = sin(_angle);
20 |
21 | _vecux = cos(_direction) * cos(_angle) * sin(_pitch);
22 | _vecuy = sin(_direction) * cos(_angle) * sin(_pitch);
23 | _vecuz = cos(_angle) * cos(_pitch);
24 |
25 |
26 | def(_dir_vector);
27 | def(_up_vector);
28 | _dir_vector = [_vecdx,_vecdy,_vecdz];
29 | _up_vector = [_vecux,_vecuy,_vecuz];
30 |
31 | ([_dir_vector,_up_vector])
32 | };
33 |
34 | object_set_heading = {
35 | ARGVX2(0,_object);
36 | ARGVX2(1,_data);
37 |
38 | def(_vectors);
39 | _vectors = [_data] call object_calcualte_vectors;
40 | _object setVectorDirAndUp _vectors;
41 | };
42 |
43 | object_setVariable = {
44 | ARGVX2(0,_object);
45 | ARGVX2(1,_variable_name);
46 | ARGV2(2,_variable_value);
47 | ARGV2(3,_remote);
48 |
49 | if (undefined(_remote)) then {
50 | _remote = false;
51 | };
52 |
53 | if (undefined(_variable_name)) exitWith {nil};
54 |
55 | if (undefined(_variable_value)) then {
56 | _object setVariable [_variable_name,nil,_remote];
57 | }
58 | else {
59 | _object setVariable [_variable_name,_variable_value,_remote];
60 | };
61 | };
62 |
63 |
64 | object_getVariable = {
65 | ARGVX2(0,_object);
66 | ARGVX2(1,_variable_name);
67 | ARGV2(2,_default);
68 | if (typeName _object != "OBJECT") exitWith {nil};
69 | if (undefined(_variable_name)) exitWith {nil};
70 |
71 |
72 | //player commandChat format["_object = %1",_object];
73 | def(_result);
74 | _result = _object getVariable [_variable_name,OR(_default,nil)];
75 |
76 | if (undefined(_result)) exitWith {OR(_default,nil)};
77 | _result
78 | };
79 |
80 | camera_keyUpHandler = {
81 | //player commandChat format["camera_keyUpHandler %1",_this];
82 | ARGVX2(0,_this);
83 |
84 | ARGV2(0,_display);
85 | ARGV2(1,_key);
86 | ARGV2(2,_shift);
87 | ARGV2(3,_control);
88 | ARGV2(4,_alt);
89 |
90 | init(_player,camera_unit);
91 | [false,_key] call camera_update_key_tracker;
92 |
93 | if (_shift) then {
94 | camera_shift_held = false;
95 | };
96 |
97 | if (_control) then {
98 | camera_control_held = false;
99 | };
100 |
101 | if (_alt) then {
102 | camera_alt_held = false;
103 | };
104 |
105 | if (_key == DIK_LWIN) then {
106 | camera_lwin_held = false;
107 | };
108 |
109 | if (_key == DIK_SPACE) then {
110 | camera_space_held = false;
111 | };
112 |
113 |
114 | if ((_key in (actionKeys "MoveForward") ||
115 | _key in (actionKeys "MoveBack") ||
116 | _key in (actionKeys "TurnLeft") ||
117 | _key in (actionKeys "TurnRight") ||
118 | _key in [DIK_Q, DIK_Z]) &&
119 | (count(camera_key_tracker) == 0)) then {
120 | [_player,0] call camera_set_velocity;
121 | };
122 |
123 | false
124 | };
125 |
126 | camera_remove_keyUp = {
127 | disableSerialization;
128 | _display = findDisplay 46;
129 | if (not(undefined(camera_keyUpHandler_id))) then {
130 | _display displayRemoveEventHandler ["keyUp",camera_keyUpHandler_id];
131 | camera_keyUpHandler_id = nil;
132 | };
133 | };
134 |
135 |
136 | camera_setup_keyUp = {
137 | init(_data,_this);
138 |
139 | disableSerialization;
140 | _display = findDisplay 46;
141 | if ( undefined(camera_keyUpHandler_id) ) then {
142 | camera_keyUpHandler_id = _display displayAddEventHandler ["keyUp",format["[_this,%1] call camera_keyUpHandler",_data]];
143 | };
144 | };
145 |
146 |
147 | camera_move_pos_vector = {
148 | ARGVX2(0,_pos);
149 | ARGVX2(1,_data);
150 | ARGVX2(2,_velocity);
151 |
152 | def(_direction);
153 | def(_angle);
154 | def(_pitch);
155 | _direction = _data select 0;
156 | _angle = _data select 1;
157 | _pitch = _data select 2;
158 |
159 | _vecdx = (sin(_direction) * cos(_angle)) * _velocity;
160 | _vecdy = (cos(_direction) * cos(_angle)) * _velocity;
161 | _vecdz = (sin(_angle)) * _velocity;
162 |
163 | _pos = [((_pos select 0) + _vecdx),((_pos select 1) + _vecdy),((_pos select 2) + _vecdz)];
164 | _pos
165 | };
166 |
167 |
168 | camera_next_target = {
169 | ARGVX2(0,_direction);
170 | ARGV2(1,_target);
171 |
172 | def(_units);
173 | _units = playableUnits;
174 | _target = if (undefined(_target)) then {_units select 0} else {_target};
175 |
176 | def(_index);
177 | _index = _units find _target;
178 | _index = _index + _direction;
179 | _index = if (_index >= (count(_units))) then {0} else {_index};
180 | _index = if (_index < 0) then { (count _units) - 1} else {_index};
181 | _target = _units select _index;
182 |
183 | (_target)
184 | };
185 |
186 | camera_update_target = {
187 | ARGVX2(0,_player);
188 | ARGVX2(1,_key);
189 | ARGVX2(2,_shift);
190 | ARGVX2(3,_control);
191 |
192 |
193 | def(_target);
194 | def(_previous_target);
195 | _target = [_player,"camera_target"] call object_getVariable;
196 | _previous_target = _target;
197 |
198 | def(_handled);
199 | _handled = false;
200 | if (_shift && _key in (actionKeys "NextChannel")) then {
201 | _target = [+1,_target] call camera_next_target;
202 | camera_unit commandChat format["Attaching to %1",(name _target)];
203 | [_player, _target, OR(_previous_target,nil)] call camera_attach_to_target;
204 |
205 | _handled = true;
206 | };
207 |
208 | if (_shift && _key in (actionKeys "PrevChannel")) then {
209 | _target = [-1,_target] call camera_next_target;
210 | camera_unit commandChat format["Attaching to %1",(name _target)];
211 | [_player, _target, OR(_previous_target,nil)] call camera_attach_to_target;
212 | _handled = true;
213 | };
214 |
215 | if (_shift && _key in (actionKeys "Chat")) then {
216 | private["_new_target", "_current_target"];
217 | _new_target = [10] call camera_target;
218 |
219 | def(_aiming_at_same_player);
220 | _aiming_at_same_player = (!isNil "_new_target" && {!isNil "_previous_target" && {_new_target == _previous_target}});
221 |
222 | def(_not_aiming_at_anything);
223 | _not_aiming_at_anything = (isNil "_new_target" && {!isNil "_previous_target"});
224 |
225 | if (_not_aiming_at_anything || _aiming_at_same_player) then {
226 | camera_unit commandChat format["Detaching from %1", (name _previous_target)];
227 | [_player, _previous_target] call camera_detach_from_target;
228 | }
229 | else { if (not(_aiming_at_same_player) && {not(isNil "_new_target")}) then {
230 | camera_unit commandChat format["Attaching to %1",(name _new_target)];
231 | [_player, _new_target, OR(_previous_target,nil)] call camera_attach_to_target;
232 | }
233 | else {
234 | camera_unit commandChat format["Nothing to detach from, or attach to"];
235 | };};
236 |
237 | _handled = true;
238 | };
239 |
240 | if (_control && _key == DIK_H) then {
241 | camera_hud_enabled = if (isNil "camera_hud_enabled") then {true} else {nil};
242 | _handled = true;
243 | };
244 |
245 | if (_control && _key == DIK_E) then {
246 | [] call camera_toggle;
247 | _handled = true;
248 | };
249 |
250 | _handled
251 | };
252 |
253 | camera_detach_from_target = {
254 | ARGVX3(0,_player,objNull);
255 | ARGV3(1,_previous_target,objNull);
256 |
257 | _camera = [_player,"camera"] call object_getVariable;
258 |
259 | detach _camera;
260 | [_player,"camera_target",nil] call object_setVariable;
261 |
262 | def(_heading);
263 | _heading = if (undefined(_previous_target)) then {nil} else {[_previous_target,([_player] call camera_get_heading)] call camera_heading_modelToWorld;};
264 | [_player,OR(_heading,nil)] call camera_set_heading;
265 |
266 | def(_pos);
267 | _pos = if (undefined(_previous_target)) then {nil} else {_previous_target modelToWorld ([_player] call camera_get_position)};
268 | [_player,OR(_pos,nil)] call camera_set_position;
269 |
270 | };
271 |
272 | camera_attach_to_target = {
273 | ARGVX3(0,_player,objNull);
274 | ARGVX3(1,_target,objNull);
275 | ARGV3(2,_previous_target,objNull);
276 |
277 | [_player,"camera_target",_target] call object_setVariable;
278 |
279 | def(_pos);
280 | _pos = if (undefined(_previous_target)) then {nil} else {[_player] call camera_get_position};
281 | [_player,OR(_pos,nil)] call camera_set_position;
282 |
283 | def(_heading);
284 | _heading = if (undefined(_previous_target)) then {[0,0,0]} else {[_player] call camera_get_heading};
285 | [_player,OR(_heading,nil)] call camera_set_heading;
286 | };
287 |
288 | camera_get_map_open = {
289 | ARGVX2(0,_player);
290 |
291 | def(_map_open);
292 | _map_open = [_player,"camera_map_open"] call object_getVariable;
293 | _map_open = if (undefined(_map_open)) then {false} else {_map_open};
294 | _map_open
295 | };
296 |
297 | camera_set_map_open = {
298 | ARGVX2(0,_player);
299 | ARGVX2(1,_map_open);
300 |
301 | [_player,"camera_map_open",_map_open] call object_setVariable;
302 | };
303 |
304 | camera_map_control = {
305 | ((finddisplay 12) displayctrl 51)
306 | };
307 |
308 | camera_map_open = {
309 | ARGVX2(0,_player);
310 |
311 | [_player,true] call camera_set_map_open;
312 | openMap [true,true];
313 |
314 | (call camera_map_control) mapCenterOnCamera false;
315 |
316 | def(_pos);
317 | _pos = [_player] call camera_get_world_position;
318 | mapAnimAdd [0,(ctrlMapScale (call camera_map_control)) ,_pos];
319 | mapAnimCommit;
320 | };
321 |
322 | camera_map_close = {
323 | ARGVX2(0,_player);
324 |
325 | [_player,false] call camera_set_map_open;
326 | openMap [false,false];
327 |
328 | def(_pos);
329 | _pos = [_player] call camera_get_world_position;
330 | mapAnimAdd [0,(ctrlMapScale (call camera_map_control)) ,_pos];
331 | mapAnimCommit;
332 | };
333 |
334 |
335 | camera_update_map = {
336 | ARGVX2(0,_player);
337 | ARGVX2(1,_key);
338 | ARGVX2(2,_shift);
339 |
340 | if (not(_key in (actionKeys "ShowMap"))) exitWith {nil};
341 |
342 | if (not([_player] call camera_get_map_open)) then {
343 | [_player] call camera_map_open;
344 | }
345 | else {
346 | [_player] call camera_map_close;
347 | };
348 | };
349 |
350 | camera_get_max_velocity = {
351 | ARGVX2(0,_player);
352 |
353 | def(_velocity);
354 | _velocity = [_player,"camera_max_velocity"] call object_getVariable;
355 | _velocity = if (undefined(_velocity)) then {0} else {_velocity};
356 | _velocity
357 | };
358 |
359 | camera_set_max_velocity = {
360 | ARGVX2(0,_player);
361 | ARGVX2(1,_velocity);
362 | [_player,"camera_max_velocity",_velocity] call object_setVariable;
363 |
364 | };
365 |
366 | camera_get_velocity = {
367 | ARGVX2(0,_player);
368 |
369 | def(_velocity);
370 | _velocity = [_player,"camera_velocity"] call object_getVariable;
371 | _velocity = if (undefined(_velocity)) then {0} else {_velocity};
372 | _velocity
373 | };
374 |
375 | camera_set_velocity = {
376 | ARGVX2(0,_player);
377 | ARGVX2(1,_velocity);
378 | [_player,"camera_velocity",_velocity] call object_setVariable;
379 | };
380 |
381 |
382 | camera_calculate_velocity = {
383 | ARGVX2(0,_player);
384 | ARGVX2(1,_shift);
385 |
386 | def(_velocity);
387 | def(_max_velocity);
388 | def(_delta);
389 | _delta = 0.05;
390 |
391 | _velocity = [_player] call camera_get_velocity;
392 | _max_velocity = [_player] call camera_get_max_velocity;
393 |
394 | if (_velocity < _max_velocity) then {
395 | _velocity = (_velocity + _delta);
396 | _velocity = (_velocity) min (_max_velocity);
397 | }
398 | else {
399 | _velocity = (_velocity - _delta);
400 | _velocity = (_velocity) max (_max_velocity);
401 | };
402 |
403 | [_player,_velocity] call camera_set_velocity;
404 |
405 | _velocity = if (_shift) then {_velocity + 3} else {_velocity};
406 | (_velocity)
407 | };
408 |
409 | camera_get_position = {
410 | ARGVX2(0,_player);
411 |
412 | def(_target);
413 | _target = [_player,"camera_target"] call object_getVariable;
414 |
415 | def(_position);
416 | def(_relative);
417 | def(_default);
418 | _relative = [0,-3,3];
419 | _default = if (undefined(_target)) then {_player modelToWorld _relative} else {_relative};
420 |
421 | _position = [_player,"camera_pos"] call object_getVariable;
422 | _position = if (undefined(_position)) then {_default} else {_position};
423 | _position
424 | };
425 |
426 | camera_get_world_position = {
427 | ARGVX2(0,_player);
428 |
429 | def(_pos);
430 | _pos = [_player] call camera_get_position;
431 |
432 | def(_target);
433 | _target = [_player,"camera_target"] call object_getVariable;
434 | _pos = if (undefined(_target)) then { _pos } else { _target modelToWorld _pos };
435 | _pos
436 | };
437 |
438 | camera_save_position = {
439 | ARGVX2(0,_player);
440 | ARGV2(1,_position);
441 | [_player,"camera_pos",OR(_position,nil)] call object_setVariable;
442 | };
443 |
444 |
445 | camera_set_position = {
446 | ARGVX2(0,_player);
447 | ARGV2(1,_position);
448 |
449 | [_player,OR(_position,nil)] call camera_save_position;
450 | _position = [_player] call camera_get_position;
451 |
452 | def(_target);
453 | _target = [_player,"camera_target"] call object_getVariable;
454 |
455 | def(_camera);
456 | _camera = [_player,"camera"] call object_getVariable;
457 | if (undefined(_camera)) exitWith {nil};
458 |
459 | if (undefined(_target)) then {
460 | _camera setPos _position;
461 | //_camera camSetPos _position;
462 | //_camera camCommit 0.3;
463 | }
464 | else {
465 | _camera attachTo [(vehicle _target),_position];
466 | };
467 |
468 | };
469 |
470 | camera_update_position = {
471 | //player commandChat format["camera_update_position %1",_this];
472 | ARGVX2(0,_player);
473 | ARGVX2(1,_key);
474 | ARGVX2(2,_shift);
475 |
476 | def(_position);
477 | _position = [_player] call camera_get_position;
478 |
479 | def(_velocity);
480 | _velocity = [_player,_shift] call camera_calculate_velocity;
481 |
482 | def(_heading);
483 | def(_direction);
484 | def(_angle);
485 | def(_bank);
486 | _heading = [_player] call camera_get_heading;
487 | _direction = _heading select 0;
488 | _angle = _heading select 1;
489 | _bank = _heading select 2;
490 |
491 | if (_key in (actionKeys "MoveForward")) then {
492 | _position = [_position,[_direction,_angle,_bank],_velocity] call camera_move_pos_vector;
493 | };
494 |
495 | if (_key in (actionKeys "MoveBack")) then {
496 | _angle = _angle + 180;
497 | _angle = if (_angle > 360) then { _angle - 360 } else {_angle};
498 | _position = [_position,[_direction,_angle,_bank],_velocity] call camera_move_pos_vector;
499 | };
500 |
501 | if (_key in (actionKeys "TurnLeft") || _key in (actionKeys "MoveLeft")) then {
502 | _direction = _direction - 90;
503 | _direction = if (_direction < 0) then { 360 - abs(_direction) } else {_direction};
504 | _position = [_position,[_direction,0,_bank],_velocity] call camera_move_pos_vector;
505 | };
506 |
507 | if (_key in (actionKeys "TurnRight") || _key in (actionKeys "MoveRight")) then {
508 | _direction = _direction + 90;
509 | _direction = if (_direction > 360) then {_direction - 360} else {_direction};
510 | _position = [_position,[_direction,0,_bank],_velocity] call camera_move_pos_vector;
511 | };
512 |
513 |
514 | if (_key == DIK_Q) then {
515 | _angle = _angle + 90;
516 | _angle = if (_angle > 360) then { _angle - 360 } else {_angle};
517 | _position = [_position,[_direction,_angle,_bank],_velocity] call camera_move_pos_vector;
518 | };
519 |
520 |
521 | if (_key == DIK_Z) then {
522 | _angle = _angle - 90;
523 | _angle = if (_angle < 0) then { 360 - abs(_angle) } else {_angle};
524 | _position = [_position,[_direction,_angle,_bank],_velocity] call camera_move_pos_vector;
525 | };
526 |
527 | [_player,OR(_position,nil)] call camera_set_position;
528 | };
529 |
530 |
531 | camera_MouseZChanged_handler = {
532 | //player commandChat format["camera_MouseZChanged_handler %1",_this];
533 | ARGVX2(0,_this);
534 | init(_player,camera_unit);
535 |
536 | ARGV2(1,_zc);
537 |
538 | def(_velocity);
539 | _velocity = [_player] call camera_get_max_velocity;
540 | _velocity = if (_zc > 0) then {_velocity + 0.1} else {_velocity - 0.1};
541 | _velocity = (_velocity) min (5);
542 | _velocity = (_velocity) max (0);
543 | _velocity = (round(_velocity * 100) / 100);
544 | //player commandChat format["Camera max velocity set at %1",_velocity];
545 | [_player,_velocity] call camera_set_max_velocity;
546 |
547 | true
548 | };
549 |
550 | camera_remove_MouseZChanged = {
551 | disableSerialization;
552 | def(_control);
553 | _control = findDisplay 46;
554 | if (not(undefined(camera_MouseZChanged_id))) then {
555 | _control displayRemovEeventHandler ["MouseZChanged",camera_MouseZChanged_id];
556 | camera_MouseZChanged_id = nil;
557 | };
558 | };
559 |
560 | camera_setup_MouseZChanged = {
561 | init(_data,_this);
562 | disableSerialization;
563 | def(_control);
564 | _control = findDisplay 46;
565 | if ( undefined(camera_MouseZChanged_id) ) then {
566 | camera_MouseZChanged_id = _control displayAddEventHandler ["MouseZChanged",format["[_this,%1] call camera_MouseZChanged_handler",_data]];
567 | //player commandChat format["camera_MouseZChanged_id = %1",camera_MouseZChanged_id];
568 | };
569 | };
570 |
571 | camera_get_nightvision = {
572 | ARGVX2(0,_player);
573 |
574 | def(_nightvision);
575 | _nightvision = [_player,"camera_nightvision"] call object_getVariable;
576 | _nightvision = if (undefined(_nightvision)) then {0} else {_nightvision};
577 | _nightvision
578 | };
579 |
580 | camera_set_nightvision = {
581 | ARGVX2(0,_player);
582 | ARGVX2(1,_nightvision);
583 |
584 | [_player,"camera_nightvision",_nightvision] call object_setVariable;
585 | (_nightvision)
586 | };
587 |
588 | camera_update_nightvision = {
589 | ARGVX2(0,_player);
590 | ARGVX2(1,_key);
591 |
592 | if (not(_key in actionKeys "NightVision")) exitWith {nil};
593 |
594 | def(_nightvision);
595 | _nightvision = [_player] call camera_get_nightvision;
596 | _nightvision = ((_nightvision + 1) % 10);
597 | //player commandChat format["_nightvision = %1",_nightvision];
598 | switch (_nightvision) do {
599 | case 0: {
600 | camera_unit commandChat format["Setting camera default mode"];
601 | camUseNVG false;
602 | false SetCamUseTi 0;
603 | };
604 | case 1: {
605 | camera_unit commandChat format["Setting camera NV "];
606 | camUseNVG true;
607 | false SetCamUseTi 0;
608 | };
609 | case 2: {
610 | camera_unit commandChat format["Setting camera thermal white-hot"];
611 | camUseNVG false;
612 | true SetCamUseTi 0;
613 | };
614 | case 3: {
615 | camera_unit commandChat format["Setting camera thermal black-hot"];
616 | camUseNVG false;
617 | true SetCamUseTi 1;
618 | };
619 | case 4: {
620 | camera_unit commandChat format["Setting camera thermal light-green-hot"];
621 | camUseNVG false;
622 | true SetCamUseTi 2;
623 | };
624 | case 5: {
625 | camera_unit commandChat format["Setting camera thermal dark-green-hot"];
626 | camUseNVG false;
627 | true SetCamUseTi 3;
628 | };
629 | case 6: {
630 | camera_unit commandChat format["Setting camera light-orange-hot "];
631 | camUseNVG false;
632 | true SetCamUseTi 4;
633 | };
634 | case 7: {
635 | camera_unit commandChat format["Setting camera dark-orange-hot "];
636 | camUseNVG false;
637 | true SetCamUseTi 5;
638 | };
639 | case 8: {
640 | camera_unit commandChat format["Setting camera orange body-heat "];
641 | camUseNVG false;
642 | true SetCamUseTi 6;
643 | };
644 | case 9: {
645 | camera_unit commandChat format["Setting camera colored body-heat "];
646 | camUseNVG false;
647 | true SetCamUseTi 7;
648 | };
649 | };
650 |
651 | [_player,_nightvision] call camera_set_nightvision;
652 | };
653 |
654 | camera_target = {
655 | ARGVX3(0,_distance,0);
656 | private["_objects", "_object"];
657 | _objects = nearestObjects [(screenToWorld [(safezoneX + 0.5 * safezoneW),(safezoneY + 0.5 * safezoneH)]),["LandVehicle","Man"],_distance];
658 | if (count _objects == 0) exitWith {nil};
659 | _object = (_objects select 0);
660 |
661 | if (isNil "_object" || isNull _object) exitWith {nil};
662 |
663 | if (_object isKindOf "Man" && {!isPlayer _object}) exitWith {nil};
664 | if (_object isKindOf "LandVehicle" && {(count (crew _object)) == 0}) exitWith {nil};
665 |
666 | _object
667 | };
668 |
669 | camera_enabled = {
670 | ARGVX2(0,_player);
671 |
672 | def(_camera);
673 | _camera = [_player,"camera"] call object_getVariable;
674 | not(isNil "_camera" || {isNull _camera})
675 | };
676 |
677 | camera_keyDownHandler = {
678 | //player commandChat format["camera_keyDownHandler = %1",_this];
679 | init(_player,camera_unit);
680 |
681 | ARGVX2(0,_this);
682 | ARGVX2(1,_key);
683 | ARGVX2(2,_shift);
684 | ARGVX2(3,_control);
685 | ARGVX2(4,_alt);
686 |
687 | [true,_key] call camera_update_key_tracker;
688 | //player commandChat format["_key = %1",_key];
689 |
690 | if (_shift) then {
691 | camera_shift_held = true;
692 | };
693 |
694 | if (_control) then {
695 | camera_control_held = true;
696 | };
697 |
698 | if (_alt) then {
699 | camera_alt_held = true;
700 | };
701 |
702 | if (_key == DIK_LWIN) then {
703 | camera_lwin_held = true;
704 | };
705 |
706 | if (_key == DIK_SPACE) then {
707 | camera_space_held = true;
708 | };
709 |
710 |
711 |
712 | def(_camera);
713 | _camera = [_player,"camera"] call object_getVariable;
714 | if (undefined(_camera)) exitWith {nil};
715 |
716 | [_player,_key,_shift] call camera_update_map;
717 | if ([_player] call camera_get_map_open) exitWith {false};
718 |
719 | [_player,_key] call camera_update_nightvision;
720 |
721 | def(_handled);
722 | _handled = [_player,_key,_shift,_control] call camera_update_target;
723 |
724 |
725 | [_player,_key,_shift] call camera_update_position;
726 |
727 |
728 | _handled
729 | };
730 |
731 | camera_remove_keyDown = {
732 | disableSerialization;
733 | _display = findDisplay 46;
734 | if (not(undefined(camera_keyDownHandler_id))) then {
735 | _display displayRemoveEventHandler ["keyDown",camera_keyDownHandler_id];
736 | camera_keyDownHandler_id = nil;
737 | };
738 | };
739 |
740 | camera_setup_keyDown = {
741 | init(_data,_this);
742 |
743 | disableSerialization;
744 | _display = findDisplay 46;
745 | if ( undefined(camera_keyDownHandler_id) ) then {
746 | camera_keyDownHandler_id = _display displayAddEventHandler ["keyDown",format["[_this,%1] call camera_keyDownHandler",_data]];
747 | };
748 | };
749 |
750 |
751 | camera_mouseMoving_handler = {
752 | //player commandChat format["camera_mouseMoving_handler %1",_this];
753 |
754 | ARGVX2(0,_this);
755 | ARGVX2(1,_xc);
756 | ARGVX2(2,_yc);
757 |
758 |
759 | init(_player,camera_unit);
760 |
761 | if (dialog) exitWith {false};
762 |
763 | if ([_player] call camera_get_map_open) exitWith {false};
764 |
765 |
766 | [_player,_xc,_yc] call camera_update_heading;
767 | false
768 | };
769 |
770 | camera_remove_mouseMoving = {
771 | disableSerialization;
772 | _display = findDisplay 46;
773 | if (not(undefined(camera_mouseMoving_id))) then {
774 | _display displayRemoveEventHandler ["mouseMoving",camera_mouseMoving_id];
775 | camera_mouseMoving_id = nil;
776 | };
777 | };
778 |
779 | camera_setup_mouseMoving = {
780 | init(_data,_this);
781 | disableSerialization;
782 | _display = findDisplay 46;
783 | if ( undefined(camera_mouseMoving_id) ) then {
784 | camera_mouseMoving_id = _display displayAddEventHandler ["mouseMoving",format["[_this,%1] call camera_mouseMoving_handler",_data]];
785 | };
786 | };
787 |
788 |
789 | camera_heading2vectors = {
790 | ARGVX2(0,_heading);
791 |
792 | def(_direction);
793 | def(_angle);
794 | def(_bank);
795 | _direction = _heading select 0;
796 | _angle = _heading select 1;
797 | _bank = _heading select 2;
798 |
799 | _vecdx = sin(_direction) * cos(_angle);
800 | _vecdy = cos(_direction) * cos(_angle);
801 | _vecdz = sin(_angle);
802 |
803 | _vecux = cos(_direction) * cos(_angle) * sin(_bank);
804 | _vecuy = sin(_direction) * cos(_angle) * sin(_bank);
805 | _vecuz = cos(_angle) * cos(_bank);
806 |
807 | ([ [_vecdx,_vecdy,_vecdz],[_vecux,_vecuy,_vecuz] ])
808 | };
809 |
810 | camera_vectorDir2heading = {
811 | //player commandChat format["camera_vectorDir2heading %1",_this];
812 | ARGVX2(0,_vectorDir);
813 |
814 | def(_vecdz);
815 | def(_vecdy);
816 | def(_vecdx);
817 | _vecdx = _vectorDir select 0;
818 | _vecdy = _vectorDir select 1;
819 | _vecdz = _vectorDir select 2;
820 |
821 | def(_angle);
822 | _angle = asin(_vecdz);
823 | _direction = asin(_vecdx / cos(_angle));
824 |
825 | _angle = if (_angle < 0) then {360 - abs(_angle)} else {_angle};
826 | _direction = if (_direction < 0) then {360 - abs(_direction)} else {_direction};
827 |
828 | def(_heading);
829 | _heading = [_direction,_angle,0];
830 |
831 | //player commandChat format["_convert = %1",_heading];
832 | _heading
833 | };
834 |
835 | camera_save_heading = {
836 | ARGVX2(0,_player);
837 | ARGVX2(1,_heading);
838 | [_player,"camera_heading",_heading] call object_setVariable;
839 | };
840 |
841 | camera_get_heading = {
842 | ARGVX2(0,_player);
843 |
844 | def(_camera);
845 | _camera = [_player,"camera"] call object_getVariable;
846 |
847 | def(_heading);
848 | _heading = [_player,"camera_heading"] call object_getVariable;
849 | _heading = if (undefined(_heading)) then {[_player,[0,0,0]] call camera_heading_modelToWorld} else {_heading};
850 | _heading
851 | };
852 |
853 | camera_update_heading = {
854 | ARGVX2(0,_player);
855 | ARGVX2(1,_xc);
856 | ARGVX2(2,_yc);;
857 |
858 | def(_heading);
859 | _heading = [_player] call camera_get_heading;
860 |
861 | def(_dir);
862 | _dir = _heading select 0;
863 | _dir = _dir + _xc;
864 | _dir = if (_dir > 360) then { _dir - 360 } else { _dir };
865 | _dir = if (_dir < 0) then { 360 - abs(_dir) } else { _dir};
866 |
867 | def(_angle);
868 | _angle = _heading select 1;
869 | _angle = if (undefined(_angle)) then {0} else {_angle};
870 | _angle = _angle - _yc;
871 | _angle = if (_angle > 360) then { _angle - 360 } else { _angle };
872 | _angle = if (_angle < 0) then { 360 - abs(_angle) } else { _angle};
873 |
874 | def(_bank);
875 | _bank = _heading select 2;
876 |
877 | _heading = [_dir,_angle,_bank];
878 | //player commandChat format["_update_heading = %1",_heading];
879 | [_player,_heading] call camera_set_heading;
880 | };
881 |
882 |
883 | camera_set_heading = {
884 | ARGVX2(0,_player);
885 | ARGVX2(1,_heading);
886 |
887 | def(_camera);
888 | _camera = [_player,"camera"] call object_getVariable;
889 | if (undefined(_camera)) exitWith {nil};
890 |
891 | //player commandChat format["_heading_before = %1",_heading];
892 | [_player,_heading] call camera_save_heading;
893 | _heading = [_player] call camera_get_heading;
894 |
895 | //player commandChat format["_heading_last = %1",_heading];
896 | def(_vectors);
897 | _vectors = [_heading] call camera_heading2vectors;
898 | _camera setVectorDirAndUp _vectors;
899 |
900 |
901 | };
902 |
903 | camera_heading_modelToWorld = {
904 | ARGVX2(0,_target);
905 | ARGVX2(1,_heading);
906 |
907 | //player commandChat format["_heading2_before = %1",_heading];
908 | def(_tdir);
909 | _tdir = getDir _target;
910 |
911 | def(_dir);
912 | _dir = _heading select 0;
913 | _dir = _dir + _tdir;
914 | _dir = if (_dir > 360) then { _dir - 360 } else { _dir };
915 | _heading set [0,_dir];
916 | //player commandChat format["_heading2_after = %1",_heading];
917 | _heading
918 | };
919 |
920 | camera_destroy = {
921 | //camera_unit commandChat format["camera_destroy %1",_this];
922 | ARGVX3(0,_player, objNull);
923 |
924 | def(_camera);
925 | _camera = [_player,"camera"] call object_getVariable;
926 | if (undefined(_camera)) exitWith {};
927 |
928 | [_player,"camera",nil] call object_setVariable;
929 | [_player] call camera_map_close;
930 |
931 | _camera cameraEffect ["terminate","back"];
932 | //camera_unit commandChat format["destroying camera! %1",_camera];
933 | camDestroy _camera;
934 | };
935 |
936 |
937 | camera_create = {
938 | ARGVX3(0,_player, objNull);
939 | if (not(isPlayer _player)) exitWith {};
940 |
941 | def(_pos);
942 | def(_camera);
943 | _pos = (getPosATL _player);
944 | _camera = "camera" camCreate [(_pos select 0),(_pos select 1),((_pos select 2) + 3)];
945 | _camera cameraEffect ["Internal","LEFT"];
946 | _camera setPos _pos;
947 | _camera camSetFoV 1;
948 | _camera camPrepareFocus [-1,-1];
949 | _camera camCommitPrepared 0;
950 |
951 | showCinemaBorder false;
952 | cameraEffectEnableHUD true;
953 | clearRadio;
954 | enableRadio true;
955 | //_camera camCommand "MANUAL ON";
956 | _camera camCommand "INERTIA OFF";
957 |
958 | [_player,"camera",_camera] call object_setVariable;
959 | [_player,"camera_target",nil] call object_setVariable;
960 | [_player,nil] call camera_set_heading;
961 | [_player,nil] call camera_set_position;
962 | [_player] call camera_map_close;
963 | [_player,0] call camera_set_velocity;
964 | [_player,1] call camera_set_max_velocity;
965 |
966 |
967 | //hook for disabling camera when player dies
968 | [_camera,_player] spawn {
969 | ARGVX2(0,_camera);
970 | ARGVX2(1,_player);
971 |
972 | camera_unit commandChat format["waiting!"];
973 | waitUntil {
974 | (not(alive _player) || (isNull ([_player,"camera",objNull] call object_getVariable)))
975 | };
976 |
977 | [_player] call camera_destroy;
978 | };
979 |
980 | _camera
981 | };
982 |
983 | camera_mouseButtonClick_handler = {
984 | //player commandChat format["camera_mouseButtonClick_handler %1",_this];
985 | ARGVX2(0,_this);
986 |
987 | init(_player,camera_unit);
988 |
989 | if (not([_player] call camera_get_map_open)) exitWith {false};
990 |
991 | ARGVX2(0,_display);
992 | ARGVX2(1,_button);
993 | ARGVX2(2,_x);
994 | ARGVX2(3,_y);
995 | ARGVX2(5,_control);
996 |
997 | if (not(_button == 0)) exitWith {nil};
998 |
999 | def(_target);
1000 | _target = [_player,"camera_target"] call object_getVariable;
1001 | if (not(undefined(_target))) exitWith {
1002 | player commandChat format["Cannot teleport while camera is attached to a target"];
1003 | false
1004 | };
1005 |
1006 | def(_world_pos);
1007 | _world_pos = _display posScreenToWorld [_x,_y];
1008 |
1009 | def(_pos);
1010 | _pos = [_player] call camera_get_position;
1011 | _world_pos set [2,(_pos select 2)];
1012 |
1013 | [_player,_world_pos] call camera_set_position;
1014 | mapAnimAdd [0,(ctrlMapScale _display),_world_pos];
1015 | mapAnimCommit;
1016 |
1017 | [_player] call camera_map_close;
1018 |
1019 | true
1020 | };
1021 |
1022 | camera_remove_mouseButtonClick = {
1023 | disableSerialization;
1024 | def(_control);
1025 | _control = call camera_map_control;
1026 | if (not(undefined(camera_mouseButtonClick_id))) then {
1027 | _control ctrlRemovEeventHandler ["MouseButtonClick",camera_mouseButtonClick_id];
1028 | camera_mouseButtonClick_id = nil;
1029 | };
1030 | };
1031 |
1032 | camera_setup_mouseButtonClick = {
1033 | init(_data,_this);
1034 | disableSerialization;
1035 | def(_control);
1036 | _control = call camera_map_control;
1037 | if (undefined(camera_mouseButtonClick_id)) then {
1038 | camera_mouseButtonClick_id = _control ctrlAddEventHandler ["MouseButtonClick",format["[_this,%1] call camera_mouseButtonClick_handler",_data]];
1039 | //player commandChat format["camera_mouseButtonClick_id = %1",camera_mouseButtonClick_id];
1040 | };
1041 | };
1042 |
1043 | camera_MouseButtonDown_handler = {
1044 | //player commandChat format["camera_MouseButtonDown_handler %1",_this];
1045 | ARGV2(0,_this);
1046 |
1047 | init(_player,camera_unit);
1048 |
1049 | ARGV2(0,_display);
1050 | ARGV2(1,_button);
1051 | ARGV2(2,_x);
1052 | ARGV2(3,_y);
1053 | ARGV2(4,_shift);
1054 | ARGV2(5,_control);
1055 |
1056 |
1057 | true
1058 | };
1059 |
1060 | camera_remove_MouseButtonDown = {
1061 | disableSerialization;
1062 | def(_display);
1063 | _display = findDisplay 46;
1064 | if (not(undefined(camera_MouseButtonDown_id))) then {
1065 | _display displayRemoveEventHandler ["MouseButtonDown",camera_MouseButtonDown_id];
1066 | camera_MouseButtonDown_id = nil;
1067 | };
1068 | };
1069 |
1070 | camera_setup_MouseButtonDown = {
1071 | init(_data,_this);
1072 | disableSerialization;
1073 |
1074 | def(_display);
1075 | _display = findDisplay 46;
1076 | if ( undefined(camera_MouseButtonDown_id) ) then {
1077 | camera_MouseButtonDown_id = _display displayAddEventHandler ["MouseButtonDown",format["[_this,%1] call camera_MouseButtonDown_handler",_data]];
1078 | //player commandChat format["camera_MouseButtonDown_id = %1",camera_MouseButtonDown_id];
1079 | };
1080 | };
1081 |
1082 | camera_MouseButtonUp_handler = {
1083 | //player commandChat format["camera_MouseButtonUp_handler %1",_this];
1084 | ARGVX2(0,_this);
1085 |
1086 | init(_player,camera_unit);
1087 |
1088 | ARGVX2(0,_display);
1089 | ARGVX2(1,_button);
1090 | ARGVX2(2,_x);
1091 | ARGVX2(3,_y);
1092 | ARGVX2(5,_control);
1093 |
1094 |
1095 | true
1096 | };
1097 |
1098 | camera_remove_MouseButtonUp = {
1099 | disableSerialization;
1100 |
1101 | def(_display);
1102 | _display = findDisplay 46;
1103 | if (not(undefined(camera_MouseButtonUp_id))) then {
1104 | _display displayRemoveEventHandler ["MouseButtonUp",camera_MouseButtonUp_id];
1105 | camera_MouseButtonUp_id = nil;
1106 | };
1107 | };
1108 |
1109 | camera_setup_MouseButtonUp = {
1110 | init(_data,_this);
1111 | disableSerialization;
1112 |
1113 | def(_display);
1114 | _display = findDisplay 46;
1115 | if ( undefined(camera_MouseButtonUp_id) ) then {
1116 | camera_MouseButtonUp_id = _display displayAddEventHandler ["MouseButtonUp",format["[_this,%1] call camera_MouseButtonUp_handler",_data]];
1117 | //player commandChat format["camera_MouseButtonUp_id = %1",camera_MouseButtonUp_id];
1118 | };
1119 | };
1120 |
1121 |
1122 |
1123 |
1124 |
1125 | camera_start_loop = {
1126 | //player commandChat format["camera_start_loop %1"];
1127 | camera_loop_active = true;
1128 | ["A3W_camera_oneachFrame", "onEachFrame", camera_loop] call BIS_fnc_addStackedEventHandler;
1129 | };
1130 |
1131 | camera_stop_loop = {
1132 | //player commandChat format["camera_stop_loop %1"];
1133 | camera_loop_active = false;
1134 | ["A3W_camera_oneachFrame", "onEachFrame"] call BIS_fnc_removeStackedEventHandler;
1135 | };
1136 |
1137 |
1138 | camera_loop = {
1139 | if (not(camera_loop_active)) exitWith {};
1140 | if (isNil "camera_unit" || {typeName camera_unit != "OBJECT" || {isNull camera_unit}}) exitWith {};
1141 |
1142 | private["_player"];
1143 | _player = camera_unit;
1144 | if (not([_player] call camera_enabled)) exitWith {};
1145 |
1146 | [_player] call camera_hud_update;
1147 | };
1148 |
1149 | camera_hud_target = nil;
1150 | camera_hud_update = {
1151 | private["_player", "_target"];
1152 | _player = _this select 0;
1153 | _target = [3] call camera_target;
1154 |
1155 | if (isNil "_target" || {
1156 | typeName _target != typeName objNull || {
1157 | isNull _target || {
1158 | isNil "camera_hud_enabled"}}}) exitWith {
1159 | if (!isNil "camera_hud_target") then {
1160 | camera_hud_target = nil;
1161 | hintSilent "";
1162 | };
1163 | };
1164 |
1165 | camera_hud_target = _target;
1166 | [_target] call camera_3d_tags_draw;
1167 | [_target] call camera_show_info;
1168 | };
1169 |
1170 | camera_toggle = {
1171 | if (!isOBJECT(camera_unit) || {isNull camera_unit || {!alive camera_unit}}) then {
1172 | camera_unit = player;
1173 | };
1174 |
1175 | init(_player,camera_unit);
1176 |
1177 |
1178 | def(_camera);
1179 | _camera = [_player,"camera"] call object_getVariable;
1180 | _camera = if (undefined(_camera)) then {objNull} else {_camera};
1181 |
1182 |
1183 | if (isNull _camera) then {
1184 | camera_unit commandChat format["Enabling camera"];
1185 | [] call camera_setup_mouseMoving;
1186 | [] call camera_setup_keyDown;
1187 | [] call camera_setup_keyUp;
1188 | [] call camera_setup_mouseButtonClick;
1189 | [] call camera_setup_MouseZChanged;
1190 | [] call camera_setup_MouseButtonDown;
1191 | [] call camera_setup_MouseButtonUp;
1192 | [_player] call camera_create;
1193 |
1194 | [] call camera_start_loop;
1195 |
1196 | }
1197 | else {
1198 | camera_unit commandChat format["Disabling camera"];
1199 | [] call camera_remove_mouseMoving;
1200 | [] call camera_remove_keyDown;
1201 | [] call camera_remove_keyUp;
1202 | [] call camera_remove_mouseButtonClick;
1203 | [] call camera_remove_MouseZChanged;
1204 | [] call camera_remove_MouseButtonDown;
1205 | [] call camera_remove_MouseButtonUp;
1206 |
1207 | [] call camera_stop_loop;
1208 |
1209 | [_player] call camera_destroy;
1210 |
1211 | };
1212 | };
1213 |
1214 | camera_shift_held = false;
1215 | camera_control_held = false;
1216 | camera_alt_held = false;
1217 | camera_lwin_held = false;
1218 | camera_space_held = false;
1219 |
1220 |
1221 | camera_key_tracker = [];
1222 | camera_update_key_tracker = {
1223 | ARGVX2(0,_down);
1224 | ARGVX2(1,_key);
1225 |
1226 | if (not(_key in (actionKeys "MoveForward") ||
1227 | _key in (actionKeys "MoveBack") ||
1228 | _key in (actionKeys "TurnLeft") ||
1229 | _key in (actionKeys "TurnRight") ||
1230 | _key in [DIK_Q, DIK_Z])) exitWith {};
1231 |
1232 | if (_down && {(camera_key_tracker find _key) == -1}) then {
1233 | camera_key_tracker set [count(camera_key_tracker),_key];
1234 | };
1235 |
1236 | if (not(_down) && {(camera_key_tracker find _key) >= 0}) then {
1237 | camera_key_tracker = camera_key_tracker - [_key];
1238 | };
1239 | };
1240 |
1241 |
1242 | camera_show_info = {
1243 | private["_target"];
1244 | _target = _this select 0;
1245 |
1246 | hintSilent format["name: %1\ndamage: %2\nfatigue: %3\nrecoil: %4",
1247 | (name _target),
1248 | (damage _target),
1249 | (getFatigue _target),
1250 | (unitRecoilCoefficient _target)
1251 | ];
1252 | };
1253 |
1254 | camera_3d_tags_draw = {
1255 | private["_target"];
1256 | _target = _this select 0;
1257 |
1258 | private["_player"];
1259 | _player = camera_unit;
1260 |
1261 |
1262 | disableSerialization;
1263 |
1264 | if (not(alive _target) || visibleMap) exitWith {};
1265 |
1266 | private["_vehicle"];
1267 | _vehicle = (vehicle _target);
1268 |
1269 | if (not(alive _vehicle) || {not(isPlayer _target) || {not(alive _target)}}) exitWith {};
1270 |
1271 | private["_distance", "_has_admin_camera", "_under_base"];
1272 | _distance = _target distance ([_player,"camera",objNull] call object_getVariable);
1273 |
1274 | if (_distance > 25) exitWith {};
1275 |
1276 |
1277 | private["_part", "_pos", "_pos3d", "_pos2d"];
1278 | _part = if (_vehicle == _target) then {"neck" } else {"engine"};
1279 | _pos = (_target selectionPosition _part);
1280 | _pos = [(_pos select 0), (_pos select 1), (_pos select 2) + 0.3];
1281 | _pos3d = ((vehicle _target) modelToWorld (_pos));
1282 | if (not(count _pos3d == 3)) exitWith {};
1283 |
1284 | private["_size", "_font"];
1285 | _size = 0.045;
1286 | _font = "PuristaMedium";
1287 |
1288 | private["_text", "_icon"];
1289 | _icon = "\A3\ui_f\data\map\markers\military\triangle_CA.paa";
1290 |
1291 | _pos2d = worldToScreen((vehicle _target) modelToWorld (_pos));
1292 | if (not(count (_pos2d) == 2)) exitWith {};
1293 |
1294 | private["_x", "_y"];
1295 | _x = abs((_pos2d select 0) - 0.5);
1296 | _y = abs((_pos2d select 1) - 0.5);
1297 |
1298 | _text = format["%1 (%2) [%3]", (name _target), (side _target), round(_distance)];
1299 |
1300 | drawIcon3D [_icon, [0.71,0.28,0,0.8], _pos3d, 0.6,0.6, 180, _text, 2, _size, _font];
1301 | };
1302 |
1303 |
1304 | diag_log format["Loading camera functions loaded ..."];
1305 | camera_functions_defined = true;
--------------------------------------------------------------------------------