Hallo,
ich habe ein neues Menü gebaut, welches ich in das Spiel integrieren möchte und über das Z-Menü öffnen möchte.
Dieses habe ich versucht mit dem Befehl onButtonClick = "createDialog ""Medicmenu"";"; aufzurufen.
Die Class in meiner .hpp habe ich mit dem selben Namen benannt.
Die Menüs, welche ich für jede Fraktion gebaut habe sind in der Description.ext eingetragen und werden von Spiel auch erkannt (das weiß ich, weil ich eine Klammer in dem Menü vergessen hatte und das Spiel dann rumgejault hat ).
Mein Menüdialog:
Spoiler anzeigen
Code
/*
Author: BioniC
Version: V1.01; #Qodiso
*/
class Medicmenu {
idd = 988721;
name = "medicmenu";
movingEnable = 0;
enableSimulation = 1;
class controlsBackground {
class bg: Life_RscText
{
idc = -1;
x = 0.396875 * safezoneW + safezoneX;
y = 0.302 * safezoneH + safezoneY;
w = 0.185625 * safezoneW;
h = 0.374 * safezoneH;
colorBackground[] = {-1,-1,-1,0.7};
};
class redtop: Life_RscText
{
idc = -1;
x = 0.396875 * safezoneW + safezoneX;
y = 0.302 * safezoneH + safezoneY;
w = 0.185625 * safezoneW;
h = 0.0055 * safezoneH;
colorBackground[] = {0.569,0.086,0.086,1};
};
class RedTextHeader: Life_RscText
{
idc = -1;
text = "Sanitätermenü"; //--- ToDo: Localize;
x = 0.396875 * safezoneW + safezoneX;
y = 0.313 * safezoneH + safezoneY;
w = 0.185625 * safezoneW;
h = 0.022 * safezoneH;
colorBackground[] = {0.569,0.086,0.086,1};
};
class redbelow: Life_RscText
{
idc = -1;
x = 0.396875 * safezoneW + safezoneX;
y = 0.676 * safezoneH + safezoneY;
w = 0.185625 * safezoneW;
h = 0.0055 * safezoneH;
colorBackground[] = {0.569,0.086,0.086,1};
};
};
class controls {
class Button1: Life_RscButtonMenu
{
idc = 2012;
text = "Barriere errichten"; //--- ToDo: Localize;
onButtonClick = "closeDialog 0; [] call life_fnc_placeablesMenu";
x = 0.4175 * safezoneW + safezoneX;
y = 0.357 * safezoneH + safezoneY;
w = 0.144375 * safezoneW;
h = 0.022 * safezoneH;
colorBackground[] = {0.569,0.086,0.086,1};
};
class Button2: Life_RscButtonMenu
{
idc = -1;
text = "Navigationssystem"; //--- ToDo: Localize;
onButtonClick = "closeDialog 0; createDialog ""MAV_guiNavigation"";";
x = 0.4175 * safezoneW + safezoneX;
y = 0.401 * safezoneH + safezoneY;
w = 0.144375 * safezoneW;
h = 0.022 * safezoneH;
colorBackground[] = {0.569,0.086,0.086,1};
};
/*
class Button3: Life_RscButtonMenu
{
idc = -1;
text = "Navigationssystem"; //--- ToDo: Localize;
onButtonClick = "closeDialog 0; createDialog ""MAV_guiNavigation"";";
x = 0.4175 * safezoneW + safezoneX;
y = 0.445 * safezoneH + safezoneY;
w = 0.144375 * safezoneW;
h = 0.022 * safezoneH;
colorBackground[] = {0.569,0.086,0.086,1};
};
class Button4: Life_RscButtonMenu
{
idc = 2403;
text = "In Börse einsehen"; //--- ToDo: Localize;
onButtonClick = "closeDialog 0; createDialog ""life_dynmarket_prices"";";
x = 0.4175 * safezoneW + safezoneX;
y = 0.489 * safezoneH + safezoneY;
w = 0.144375 * safezoneW;
h = 0.022 * safezoneH;
colorBackground[] = {0.569,0.086,0.086,1};
};
*/
class ButtonClose: Life_RscButtonMenu
{
text = "Schliessen"; //--- ToDo: Localize;
onButtonClick = "closeDialog 0;";
x = 0.448438 * safezoneW + safezoneX;
y = 0.621 * safezoneH + safezoneY;
w = 0.0825 * safezoneW;
h = 0.033 * safezoneH;
colorBackground[] = {0.569,0.086,0.086,1};
};
};
};
Alles anzeigen
Vielen Dank im Voraus!
Gruß BioniC