mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Show Cargo Example
This commit is contained in:
parent
7fc1c87bc4
commit
424c6fe878
@ -1,3 +1,4 @@
|
||||
class RscControlsGroup;
|
||||
class RscControlsGroupNoScrollbars;
|
||||
class RscText;
|
||||
class RscListbox;
|
||||
@ -9,7 +10,9 @@ class RscDisplayAttributes {
|
||||
class Controls {
|
||||
class Background;
|
||||
class Title;
|
||||
class Content;
|
||||
class Content: RscControlsGroup {
|
||||
class controls;
|
||||
};
|
||||
class ButtonOK;
|
||||
class ButtonCancel;
|
||||
};
|
||||
@ -108,3 +111,49 @@ class GVAR(RscDisplayAttributes_globalSetSkill): RscDisplayAttributes {
|
||||
class ButtonCancel: ButtonCancel {};
|
||||
};
|
||||
};
|
||||
|
||||
class GVAR(cargoAttribute): RscControlsGroupNoScrollbars {
|
||||
onSetFocus = QUOTE(_this call FUNC(zeusAttributes_vehCargo));
|
||||
idc = 80085;
|
||||
x = "7 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
|
||||
y = "10 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - ( ((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
|
||||
w = "26 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "3 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
class controls {
|
||||
class Title: RscText {
|
||||
idc = -1;
|
||||
text = "Cargo:";
|
||||
x = "0 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "10 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "3 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0,0,0,0.5};
|
||||
};
|
||||
class Background: RscText {
|
||||
idc = -1;
|
||||
x = "10 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "16 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "2.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {1,1,1,0.1};
|
||||
};
|
||||
class Cargo: RscListBox {
|
||||
idc = 80086;
|
||||
x = "10 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "16 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "3 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
class RscDisplayAttributesVehicle: RscDisplayAttributes {
|
||||
class Controls: Controls {
|
||||
class Content: Content {
|
||||
class Controls: controls {
|
||||
class Cargo: GVAR(cargoAttribute) { };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -18,3 +18,4 @@ PREP(setSkillsLocal);
|
||||
PREP(zeus_globalSetSkill);
|
||||
PREP(zeusAttributes);
|
||||
PREP(zeusAttributes_globalSetSkill);
|
||||
PREP(zeusAttributes_vehCargo);
|
||||
|
14
addons/zeus/functions/fnc_zeusAttributes_vehCargo.sqf
Normal file
14
addons/zeus/functions/fnc_zeusAttributes_vehCargo.sqf
Normal file
@ -0,0 +1,14 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_control"];
|
||||
TRACE_1("params",_control);
|
||||
|
||||
private _veh = missionNamespace getVariable ["BIS_fnc_initCuratorAttributes_target", objnull];
|
||||
TRACE_1("",_veh);
|
||||
|
||||
private _loaded = _veh getVariable [QEGVAR(cargo,loaded), []];
|
||||
TRACE_1("",_loaded);
|
||||
|
||||
{
|
||||
((ctrlParent _control) displayCtrl 80086) lbAdd (str _x);
|
||||
} forEach _loaded;
|
Loading…
Reference in New Issue
Block a user