Skip to content

Commit

Permalink
added tooltips for US
Browse files Browse the repository at this point in the history
  • Loading branch information
nomisum committed Oct 30, 2015
1 parent 8bc2912 commit 908a79b
Show file tree
Hide file tree
Showing 7 changed files with 124 additions and 14 deletions.
6 changes: 6 additions & 0 deletions helpers/spawnBluforHQ.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ spawnBluforHQ = {
BLUFOR_TELEPORT_TARGET = getPos (_bluforSpawnSuccess select 2);
publicVariableServer "BLUFOR_TELEPORT_TARGET";

_usActionHelper = createVehicle ["Land_SatellitePhone_F", [(getPos _vehicle1 select 0) -1, (getPos _vehicle1 select 1) - 1, 1.5], [], 0, "NONE"];


debugLog("blufor published target");
diag_log format ["creating blufor stuff on position: %1",US_VEHICLE_SPAWN];
};
Expand Down Expand Up @@ -168,6 +171,9 @@ spawnOpforHQ = {
RUS_VEHICLE_SPAWN = getPos (_opforSpawnSuccess select 2);
publicVariable "RUS_VEHICLE_SPAWN";

_rusActionHelper = createVehicle ["Land_SatellitePhone_F", [(getPos _vehicle1 select 0) -1, (getPos _vehicle1 select 1) - 1, 1.5], [], 0, "NONE"];


/* OPFOR_TELEPORT_TARGET = getPos (_opforSpawnSuccess select 2);
publicVariableServer "OPFOR_TELEPORT_TARGET"; */

Expand Down
4 changes: 3 additions & 1 deletion helpers/teleportPlayer.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ cutText ["", "BLACK IN", 1];

// make player vulnerable again
player allowDamage true;
3 call fn_sthud_usermenu_changeMode;
3 call fn_sthud_usermenu_changeMode;
sleep 1;
cutText ["", "PLAIN"];
4 changes: 2 additions & 2 deletions mission.sqm
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@ class Mission
id=22;
side="EAST";
vehicle="O_officer_F";
player="PLAYER COMMANDER";
player="PLAY CDG";
leader=1;
rank="MAJOR";
skill=0.5;
Expand Down Expand Up @@ -2132,7 +2132,7 @@ class Mission
id=81;
side="WEST";
vehicle="B_officer_F";
player="PLAY CDG";
player="PLAYER COMMANDER";
leader=1;
rank="MAJOR";
skill=0.5;
Expand Down
8 changes: 4 additions & 4 deletions spawn/addInteractions.sqf
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
_usAction = ["ACE_MainActions", (localize "str_GRAD_buy_vehicles"), "",
{0 = createDialog "USSupplyGUI"; disableSerialization; [USSupplies, false, 0, "","",""] call refreshUSUI;},
{side player == west},{},[],[1,0,0],5] call ace_interact_menu_fnc_createAction;
{side player == west},{},[],[0,0,0],5] call ace_interact_menu_fnc_createAction;

["Land_Cargo_House_V3_F", 0, [], _usAction] call ace_interact_menu_fnc_addActionToClass;
["Land_SatellitePhone_F", 0, [], _usAction] call ace_interact_menu_fnc_addActionToClass;


_rusAction = ["ACE_MainActions", (localize "str_GRAD_buy_vehicles"), "",
{0 = createDialog "RussianSupplyGUI"; disableSerialization; [RussianSupplies, false, 0, "","",""] call refreshRussianUI;},
{side player == east},{},[],[1,0,0],5] call ace_interact_menu_fnc_createAction;
{side player == east},{},[],[0,0,0],5] call ace_interact_menu_fnc_createAction;

["Land_Cargo_House_V1_F", 0, [], _rusAction] call ace_interact_menu_fnc_addActionToClass;
["Land_SatellitePhone_F", 0, [], _rusAction] call ace_interact_menu_fnc_addActionToClass;



Expand Down
94 changes: 94 additions & 0 deletions spawn/gui/_dialogs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,7 @@ class USSupplyGUI
enableSimulation = 1;
enableDisplay = 1;
objects[] = {};
onLoad = "disableSerialization; [3000,[3801,3802,3803,3804,3805,3806,3807]] execVM 'spawn\gui\hideControl.sqf';";

class ControlsBackground
{
Expand Down Expand Up @@ -990,6 +991,99 @@ class USSupplyGUI
colorText[] = {1,1,1,0.5};
colorBackground[] = {-1,-1,-1,0};
};

class US_gui_tooltip_1: RscStructuredTextTooltip
{
idc = 3801;
x = -3.5 * GUI_GRID_W + GUI_GRID_X;
y = 3.5 * GUI_GRID_H + GUI_GRID_Y;
w = 7 * GUI_GRID_W;
h = 12 * GUI_GRID_H;
colorBackground[] = {0,0,0,0.8};
text = "loading";
size = 0.028;
onMouseEnter = "disableSerialization; [3000,3801] execVM 'spawn\gui\showControl.sqf';";
onMouseExit = "disableSerialization; [3000,[3801]] execVM 'spawn\gui\hideControl.sqf';";
};
class US_gui_tooltip_2: RscStructuredTextTooltip
{
idc = 3802;
x = 4.5 * GUI_GRID_W + GUI_GRID_X;
y = 3.5 * GUI_GRID_H + GUI_GRID_Y;
w = 7 * GUI_GRID_W;
h = 12 * GUI_GRID_H;
colorBackground[] = {0,0,0,0.8};
text = "loading";
size = 0.028;
onMouseEnter = "disableSerialization; [3000,3802] execVM 'spawn\gui\showControl.sqf';";
onMouseExit = "disableSerialization; [3000,[3802]] execVM 'spawn\gui\hideControl.sqf';";
};
class US_gui_tooltip_3: RscStructuredTextTooltip
{
idc = 3803;
x = 12 * GUI_GRID_W + GUI_GRID_X;
y = 3.5 * GUI_GRID_H + GUI_GRID_Y;
w = 7 * GUI_GRID_W;
h = 12 * GUI_GRID_H;
colorBackground[] = {0,0,0,0.8};
text = "loading";
size = 0.028;
onMouseEnter = "disableSerialization; [3000,3803] execVM 'spawn\gui\showControl.sqf';";
onMouseExit = "disableSerialization; [3000,[3803]] execVM 'spawn\gui\hideControl.sqf';";
};
class US_gui_tooltip_4: RscStructuredTextTooltip
{
idc = 3804;
x = 19.5 * GUI_GRID_W + GUI_GRID_X;
y = 3.5 * GUI_GRID_H + GUI_GRID_Y;
w = 7 * GUI_GRID_W;
h = 12 * GUI_GRID_H;
colorBackground[] = {0,0,0,0.8};
text = "loading";
size = 0.028;
onMouseEnter = "disableSerialization; [3000,3804] execVM 'spawn\gui\showControl.sqf';";
onMouseExit = "disableSerialization; [3000,[3804]] execVM 'spawn\gui\hideControl.sqf';";
};
class US_gui_tooltip_5: RscStructuredTextTooltip
{
idc = 3805;
x = 27 * GUI_GRID_W + GUI_GRID_X;
y = 3.5 * GUI_GRID_H + GUI_GRID_Y;
w = 7 * GUI_GRID_W;
h = 12 * GUI_GRID_H;
colorBackground[] = {0,0,0,0.8};
text = "loading";
size = 0.028;
onMouseEnter = "disableSerialization; [3000,3805] execVM 'spawn\gui\showControl.sqf';";
onMouseExit = "disableSerialization; [3000,[3805]] execVM 'spawn\gui\hideControl.sqf';";
};
class US_gui_tooltip_6: RscStructuredTextTooltip
{
idc = 3806;
x = 34.5 * GUI_GRID_W + GUI_GRID_X;
y = 3.5 * GUI_GRID_H + GUI_GRID_Y;
w = 7 * GUI_GRID_W;
h = 12 * GUI_GRID_H;
colorBackground[] = {0,0,0,0.8};
text = "loading";
size = 0.028;
onMouseEnter = "disableSerialization; [3000,3806] execVM 'spawn\gui\showControl.sqf';";
onMouseExit = "disableSerialization; [3000,[3806]] execVM 'spawn\gui\hideControl.sqf';";
};
class US_gui_tooltip_7: RscStructuredTextTooltip
{
idc = 3807;
x = 42 * GUI_GRID_W + GUI_GRID_X;
y = 3.5 * GUI_GRID_H + GUI_GRID_Y;
w = 7 * GUI_GRID_W;
h = 12 * GUI_GRID_H;
colorBackground[] = {0,0,0,0.8};
text = "loading";
size = 0.028;
onMouseEnter = "disableSerialization; [3000,3807] execVM 'spawn\gui\showControl.sqf';";
onMouseExit = "disableSerialization; [3000,[3807]] execVM 'spawn\gui\hideControl.sqf';";
};

class US_gui_text_headline: RscStructuredTextHeadline
{
idc = 3600;
Expand Down
14 changes: 7 additions & 7 deletions spawn/gui/addPublicVariableEventhandler.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ fillUSSupplies = {
clearBackpackCargoGlobal (_this select 0);
clearMagazineCargoGlobal (_this select 0);
},
format['%1<br/>%2<br/>%3<br/>%4','My Multi-line Tool-tip:','Line 1','Line 2','Line 3','Line 4']
format['%1<br/>%2<br/>%3<br/>%4<br/>%5','Crew: 1','Seats: 5','Speed: 109','','']
],
[
hmmwv_m2,
Expand All @@ -249,7 +249,7 @@ fillUSSupplies = {
clearBackpackCargoGlobal (_this select 0);
clearMagazineCargoGlobal (_this select 0);
},
format['%1<br/>%2<br/>%3<br/>%4','My Multi-line Tool-tip:','Line 1','Line 2','Line 3','Line 4']
format['%1<br/>%2<br/>%3<br/>%4<br/>%5','Crew: 1','Seats: 3','Speed: 109','','']
],
[
m113_m2,
Expand All @@ -265,7 +265,7 @@ fillUSSupplies = {
clearBackpackCargoGlobal (_this select 0);
clearMagazineCargoGlobal (_this select 0);
},
format['%1<br/>%2<br/>%3<br/>%4','My Multi-line Tool-tip:','Line 1','Line 2','Line 3','Line 4']
format['%1<br/>%2<br/>%3<br/>%4<br/>%5','Crew: 2','Seats: 11','Speed: 67','','']
],
[
m113_ammo,
Expand Down Expand Up @@ -300,7 +300,7 @@ fillUSSupplies = {
['AddCargoByClass', _this select 0, ['ACE_wheel', _this select 0, 3]] call ace_common_fnc_targetEvent;
['AddCargoByClass', _this select 0, ['ACE_Track', _this select 0, 1]] call ace_common_fnc_targetEvent;
},
format['%1<br/>%2<br/>%3<br/>%4','My Multi-line Tool-tip:','Line 1','Line 2','Line 3','Line 4']
format['%1<br/>%2<br/>%3<br/>%4<br/>%5<br/>%6<br/>%7<br/>%8<br/>%9<br/>%10<br/>%11<br/>%12<br/>%13','Crew: 2','Seats: 11','Speed: 67','','Cargo:','40 Smokes','60 AK Mags','20 MG Mags','20 Grenades','30 Flares','Medical Stuff','5 GPS','3 Repair Wheels','1 Repair Track']
],
[
"Ace_Box_Ammo",
Expand All @@ -317,7 +317,7 @@ fillUSSupplies = {
clearMagazineCargoGlobal (_this select 0);
(_this select 0) addBackpackCargoGlobal ['B_Parachute',14];
},
format['%1<br/>%2<br/>%3<br/>%4','My Multi-line Tool-tip:','Line 1','Line 2','Line 3','Line 4']
format['%1','14 Parachutes in a Box']
],
[
"B_Heli_Light_01_F",
Expand All @@ -333,7 +333,7 @@ fillUSSupplies = {
clearBackpackCargoGlobal (_this select 0);
clearMagazineCargoGlobal (_this select 0);
},
format['%1<br/>%2<br/>%3<br/>%4','My Multi-line Tool-tip:','Line 1','Line 2','Line 3','Line 4']
format['%1<br/>%2<br/>%3<br/>%4<br/>%5','Crew: 1','Seats: 7','Speed: 245','','']
],
[
"RHS_UH60M",
Expand All @@ -350,7 +350,7 @@ fillUSSupplies = {
clearMagazineCargoGlobal (_this select 0);
(_this select 0) setVehicleAmmo 0.4;
},
format['%1<br/>%2<br/>%3<br/>%4','My Multi-line Tool-tip:','Line 1','Line 2','Line 3','Line 4']
format['%1<br/>%2<br/>%3<br/>%4<br/>%5','Crew: 3','Seats: 13','Speed: 295','','']
]
];

Expand Down
8 changes: 8 additions & 0 deletions spawn/gui/refreshUSUI.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ refreshUSUI = {
disableSerialization;
_display = findDisplay 3000;

_display displayCtrl 3801 ctrlSetStructuredText parseText ((_array select 1) select 8);
_display displayCtrl 3802 ctrlSetStructuredText parseText ((_array select 2) select 8);
_display displayCtrl 3803 ctrlSetStructuredText parseText ((_array select 3) select 8);
_display displayCtrl 3804 ctrlSetStructuredText parseText ((_array select 4) select 8);
_display displayCtrl 3805 ctrlSetStructuredText parseText ((_array select 5) select 8);
_display displayCtrl 3806 ctrlSetStructuredText parseText ((_array select 6) select 8);
_display displayCtrl 3807 ctrlSetStructuredText parseText ((_array select 7) select 8);

if (!(_vehicleOrdered == "")) then {
VEHICLE_ORDERED_WEST = [true,_vehicleEta];
publicVariable "VEHICLE_ORDERED_WEST";
Expand Down

0 comments on commit 908a79b

Please sign in to comment.