Ich habe ein GUI selber mit einem GUI Editor gemacht... Aller dings sieht das ganze ingame so aus:
Meine hud_stats.hpp:
Code
#define ST_CENTER 0x02
/*
Author: Daniel Stuart
File: hud_stats.hpp
*/
class playerHUD {
idd = -1;
duration = 10e10;
movingEnable = 0;
fadein = 0;
fadeout = 0;
name = "playerHUD";
onLoad = "uiNamespace setVariable ['playerHUD',_this select 0]";
objects[] = {};
controls[] = {
Life_RscBackground_HUD,
Life_RscProgress_HUDFood,
Life_RscProgress_HUDHealth,
Life_RscProgress_HUDWater,
Life_RscText_HUDFood,
Life_RscText_HUDHealth,
Life_RscText_HUDWater
};
/* Background */
class Life_RscBackground_HUD: Life_RscBackground {
colorBackground[] = {0,0,0,0.35};
x = 0.825404 * safezoneW + safezoneX;
y = 0.648456 * safezoneH + safezoneY;
w = 0.170371 * safezoneW;
h = 0.35 * safezoneH;
};
/* Progress Bars */
class LIFE_RscProgress_HUDCommon: Life_RscProgress {
colorFrame[] = {0, 0, 0, 0.8};
y = 0.972223 * safezoneH + safezoneY;
w = 0.0462964 * safezoneW;
h = 0.0222222 * safezoneH;
};
class Life_RscProgress_HUDFood: LIFE_RscProgress_HUDCommon {
idc = 2200;
colorBar[] = {0,0.50,0,0.65};
x = 0.863715 * safezoneW + safezoneX;
y = 0.708641 * safezoneH + safezoneY;
w = 0.125 * safezoneW;
h = 0.037037 * safezoneH;
};
class Life_RscProgress_HUDHealth: LIFE_RscProgress_HUDCommon {
idc = 2201;
colorBar[] = {0.85,0.05,0,0.65};
x = 0.863715 * safezoneW + safezoneX;
y = 0.882715 * safezoneH + safezoneY;
w = 0.125 * safezoneW;
h = 0.037037 * safezoneH;
};
class Life_RscProgress_HUDWater: LIFE_RscProgress_HUDCommon {
idc = 2202;
colorBar[] = {0,0.25,0.65,0.65};
x = 0.863715 * safezoneW + safezoneX;
y = 0.793826 * safezoneH + safezoneY;
w = 0.125 * safezoneW;
h = 0.037037 * safezoneH;
};
/* Texts */
class Life_RscText_HUDCommon: Life_RscText {
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)";
style = ST_CENTER;
y = 0.970023 * safezoneH + safezoneY;
w = 0.0462964 * safezoneW;
h = 0.0222222 * safezoneH;
};
class Life_RscText_HUDFood: Life_RscText_HUDCommon {
idc = 1200;
text = "$STR_HUD_Food";
x = 0.888715 * safezoneW + safezoneX;
y = 0.659567 * safezoneH + safezoneY;
w = 0.083333 * safezoneW;
h = 0.031481 * safezoneH;
};
class Life_RscText_HUDHealth: Life_RscText_HUDCommon {
idc = 1201;
text = "$STR_HUD_Health";
x = 0.888715 * safezoneW + safezoneX;
y = 0.845 * safezoneH + safezoneY;
w = 0.083333 * safezoneW;
h = 0.031481 * safezoneH;
};
class Life_RscText_HUDWater: Life_RscText_HUDCommon {
idc = 1202;
text = "$STR_HUD_Water";
x = 0.888715 * safezoneW + safezoneX;
y = 0.755 * safezoneH + safezoneY;
w = 0.083333 * safezoneW;
h = 0.031481 * safezoneH;
};
};
Alles anzeigen