Moin,
hab mir ein kleines GUI Fenster erstellt, bei dem es zwei Buttons zum öffnen und schließen einer Schranke, die im Umfeld von 25 M steht.
Code: schranke.hpp
////////////////////////////////////////////////////////////////////////////
////// This HPP was created by Shinji`s GUI tool //////
////////////////////////////////////////////////////////////////////////////
class GUI_1000 {
idd = 1000;
name = "GUI_1000";
onLoad = "uiNamespace setVariable ['GUI_1000', _this select 0];";
onUnLoad = "uiNamespace setVariable ['GUI_1000', nil];";
movingEnable = false;
enableSimulation = true;
class controlsBackground {
};
class controls {
class Button_1105: RscButton
{
idc = 1105;
text = "Öffnen";
onButtonClick = "[] call life_fnc_Opener;";
x = 0.468831 * safezoneW + safezoneX;
y = 0.602459 * safezoneH + safezoneY;
w = 0.062510 * safezoneW;
h = 0.058032 * safezoneH;
ColorBackground[] = {0,0,0,0.627450};
ColorText[] = {1,1,1,1};
font = EtelkaNarrowMediumPro;
SizeEx = 0.6;
colorFocused[] = {0,0,0,1};
colorDisabled[] = {0,0,0,1};
};
class Button_1107: RscButton
{
idc = 1107;
text = "Schließen";
onButtonClick = "[] call life_fnc_Opener;";
x = 0.468831 * safezoneW + safezoneX;
y = 0.673278 * safezoneH + safezoneY;
w = 0.06251 * safezoneW;
h = 0.058032 * safezoneH;
ColorBackground[] = {0,0,0,0.627450};
ColorText[] = {1,1,1,1};
font = TahomaB;
SizeEx = 0.6;
colorFocused[] = {0,0,0,1};
colorDisabled[] = {0,0,0,1};
};
class Small_1108: RscText
{
idc = 1108;
text = " Schranken-Menü";
x = 0.451380 * safezoneW + safezoneX;
y = 0.518729 * safezoneH + safezoneY;
w = 0.093245 * safezoneW;
h = 0.036639 * safezoneH;
ColorBackground[] = {1,0.270588,0,0.592156};
ColorText[] = {1,1,1,1};
font = TahomaB;
SizeEx = 0.43;
};
class Frame_1109: RscFrame
{
idc = 1109;
x = 0.428459 * safezoneW + safezoneX;
y = 0.493770 * safezoneH + safezoneY;
w = 0.139868 * safezoneW;
h = 0.275409 * safezoneH;
ColorBackground[] = {0.011764,0.011764,0.011764,0.145098};
ColorText[] = {1,1,1,1};
};
};
};
////////////////////////////////////////////////////////////////////////////
Alles anzeigen
Und jetzt möchte ich einen Infostand der die .hpp aufruft bzw. das Fenster. Hat einer eine Idee wie das funktioniert?
LG