if(cvar_string("menu_skin") != "")
{
draw_currentSkin = strcat("gfx/menu/", cvar_string("menu_skin"));
- fh = fopen(language_file(strcat(draw_currentSkin, "/skinvalues.txt")), FILE_READ);
+ fh = fopen(language_filename(strcat(draw_currentSkin, "/skinvalues.txt")), FILE_READ);
}
if(fh < 0)
if(cvar_defstring("menu_skin") != "")
{
draw_currentSkin = strcat("gfx/menu/", cvar_defstring("menu_skin"));
- fh = fopen(language_file(strcat(draw_currentSkin, "/skinvalues.txt")), FILE_READ);
+ fh = fopen(language_filename(strcat(draw_currentSkin, "/skinvalues.txt")), FILE_READ);
}
if(fh < 0)
{
draw_currentSkin = "gfx/menu/default";
- fh = fopen(language_file(strcat(draw_currentSkin, "/skinvalues.txt")), FILE_READ);
+ fh = fopen(language_filename(strcat(draw_currentSkin, "/skinvalues.txt")), FILE_READ);
}
draw_currentSkin = strzone(draw_currentSkin);
while((s = fgets(fh)))
{
entity e;
string panelname = "ammo";
- float i;
DIALOG_HUDPANEL_COMMON();
{
entity e;
string panelname = "chat";
- float i;
DIALOG_HUDPANEL_COMMON();
{
entity e;
string panelname = "engineinfo";
- float i;
DIALOG_HUDPANEL_COMMON();
{
entity e;
string panelname = "healtharmor";
- float i;
DIALOG_HUDPANEL_COMMON();
{
entity e;
string panelname = "infomessages";
- float i;
DIALOG_HUDPANEL_COMMON();
{
entity e;
string panelname = "modicons";
- float i;
DIALOG_HUDPANEL_COMMON();
}
{
entity e;
string panelname = "notify";
- float i;
DIALOG_HUDPANEL_COMMON();
{
entity e;
string panelname = "powerups";
- float i;
DIALOG_HUDPANEL_COMMON();
{
entity e;
string panelname = "pressedkeys";
- float i;
me.TR(me);
me.TD(me, 1, 2, e = makeXonoticTextSlider("hud_panel_pressedkeys"));
{
entity e;
string panelname = "racetimer";
- float i;
DIALOG_HUDPANEL_COMMON();
}
{
entity e;
string panelname = "radar";
- float i;
me.TR(me);
me.TD(me, 1, 2, e = makeXonoticTextSlider("hud_panel_radar"));
{
entity e;
string panelname = "score";
- float i;
DIALOG_HUDPANEL_COMMON();
}
{
entity e;
string panelname = "timer";
- float i;
DIALOG_HUDPANEL_COMMON();
{
entity e;
string panelname = "vote";
- float i;
DIALOG_HUDPANEL_COMMON();
bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_TITLE, _("<TITLE>"));
bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_AUTHOR, _("<AUTHOR>"));
bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_PREVIEW, strcat("/gfx/menu/", substring(s, 9, strlen(s) - 24), "/skinpreview"));
- fh = fopen(language_file(s), FILE_READ);
+ fh = fopen(language_filename(s), FILE_READ);
if(fh < 0)
{
print("Warning: can't open skinvalues.txt file\n");
}
return s;
}
+
+void dialog_hudpanel_common_notoggle(entity me, string panelname)
+{
+ float i;
+ entity e;
+
+ me.TR(me);
+ me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Background:")));
+ me.TD(me, 1, 1.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg"))));
+ e.addValue(e, _("Default"), "");
+ e.addValue(e, _("Disable"), "0");
+ e.addValue(e, strzone(strcat("border_", panelname)), strzone(strcat("border_", panelname)));
+ e.configureXonoticTextSliderValues(e);
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Color:")));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
+ setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), _("Use default")));
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Border size:")));
+ me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_border"))));
+ e.addValue(e, _("Default"), "");
+ e.addValue(e, _("Disable"), "0");
+ for(i = 1; i <= 10; ++i)
+ e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2)));
+ e.configureXonoticTextSliderValues(e);
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Alpha:")));
+ me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_alpha"))));
+ e.addValue(e, _("Default"), "");
+ for(i = 1; i <= 10; ++i)
+ e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
+ e.configureXonoticTextSliderValues(e);
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Team Color:")));
+ me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_color_team"))));
+ e.addValue(e, _("Default"), "");
+ e.addValue(e, _("Disable"), "0");
+ for(i = 1; i <= 10; ++i)
+ e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
+ e.configureXonoticTextSliderValues(e);
+ me.TR(me);
+ me.TDempty(me, 0.4);
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", _("Test the team color in HUD configure mode")));
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Padding:")));
+ me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_padding"))));
+ e.addValue(e, _("Default"), "");
+ for(i = 0; i <= 10; ++i)
+ e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5)));
+ e.configureXonoticTextSliderValues(e);
+}
string GameType_GetName(float cnt);
float GameType_GetCount();
+void dialog_hudpanel_common_notoggle(entity me, string panelname);
#define DIALOG_HUDPANEL_COMMON_NOTOGGLE() \
- me.TR(me); \
- me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Background:"))); \
- me.TD(me, 1, 1.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg")))); \
- e.addValue(e, _("Default"), ""); \
- e.addValue(e, _("Disable"), "0"); \
- e.addValue(e, strzone(strcat("border_", panelname)), strzone(strcat("border_", panelname))); \
- e.configureXonoticTextSliderValues(e); \
- me.TR(me); \
- me.TDempty(me, 0.2); \
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Color:"))); \
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color")); \
- setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), ""); \
- me.TR(me); \
- me.TDempty(me, 0.2); \
- me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), _("Use default"))); \
- me.TR(me); \
- me.TDempty(me, 0.2); \
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Border size:"))); \
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_border")))); \
- e.addValue(e, _("Default"), ""); \
- e.addValue(e, _("Disable"), "0"); \
- for(i = 1; i <= 10; ++i) \
- e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2))); \
- e.configureXonoticTextSliderValues(e); \
- me.TR(me); \
- me.TDempty(me, 0.2); \
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Alpha:"))); \
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_alpha")))); \
- e.addValue(e, _("Default"), ""); \
- for(i = 1; i <= 10; ++i) \
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10))); \
- e.configureXonoticTextSliderValues(e); \
- me.TR(me); \
- me.TDempty(me, 0.2); \
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Team Color:"))); \
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_color_team")))); \
- e.addValue(e, _("Default"), ""); \
- e.addValue(e, _("Disable"), "0"); \
- for(i = 1; i <= 10; ++i) \
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10))); \
- e.configureXonoticTextSliderValues(e); \
- me.TR(me); \
- me.TDempty(me, 0.4); \
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", _("Test the team color in HUD configure mode"))); \
- me.TR(me); \
- me.TDempty(me, 0.2); \
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Padding:"))); \
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_padding")))); \
- e.addValue(e, _("Default"), ""); \
- for(i = 0; i <= 10; ++i) \
- e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5))); \
- e.configureXonoticTextSliderValues(e)
+ dialog_hudpanel_common_notoggle(me, panelname)
#define DIALOG_HUDPANEL_COMMON() \
me.TR(me); \
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, strzone(strcat("hud_panel_", hudpanel)), _("Enable panel"))); \
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, strzone(strcat("hud_panel_", panelname)), _("Enable panel"))); \
DIALOG_HUDPANEL_COMMON_NOTOGGLE()
string language_filename(string s);