From 6323087d878057b9d4960ad0e84cf64599c97961 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Mon, 6 Sep 2010 16:09:16 +0300 Subject: [PATCH] More changes to the menu --- data/gfx/menu/simplygoo/skinvalues.txt | 2 +- data/qcsrc/menu/classes.c | 2 +- data/qcsrc/menu/skin-customizables.inc | 2 +- .../voret/dialog_multiplayer_playersetup.c | 2 +- ...c => dialog_multiplayer_playersetup_hud.c} | 88 +++++++++---------- data/qcsrc/menu/voret/mainwindow.c | 4 +- 6 files changed, 50 insertions(+), 50 deletions(-) rename data/qcsrc/menu/voret/{dialog_multiplayer_playersetup_radar.c => dialog_multiplayer_playersetup_hud.c} (84%) diff --git a/data/gfx/menu/simplygoo/skinvalues.txt b/data/gfx/menu/simplygoo/skinvalues.txt index 9f5879da..96e50149 100644 --- a/data/gfx/menu/simplygoo/skinvalues.txt +++ b/data/gfx/menu/simplygoo/skinvalues.txt @@ -29,7 +29,7 @@ COLOR_DIALOG_USERBIND '0.25 0.25 0.25' COLOR_DIALOG_SINGLEPLAYER '0.25 0.25 0.25' COLOR_DIALOG_CREDITS '0.25 0.25 0.25' COLOR_DIALOG_WEAPONS '0.25 0.25 0.25' -COLOR_DIALOG_RADAR '0.25 0.25 0.25' +COLOR_DIALOG_HUD '0.25 0.25 0.25' COLOR_DIALOG_SERVERINFO '0.25 0.25 0.25' COLOR_DIALOG_CVARS '1 0 0' diff --git a/data/qcsrc/menu/classes.c b/data/qcsrc/menu/classes.c index 1973a202..4e46eba7 100644 --- a/data/qcsrc/menu/classes.c +++ b/data/qcsrc/menu/classes.c @@ -73,7 +73,7 @@ #include "voret/credits.c" #include "voret/dialog_multiplayer_playersetup_weapons.c" #include "voret/weaponslist.c" -#include "voret/dialog_multiplayer_playersetup_radar.c" +#include "voret/dialog_multiplayer_playersetup_hud.c" #include "voret/dialog_multiplayer_demo.c" #include "voret/demolist.c" #include "voret/colorpicker.c" diff --git a/data/qcsrc/menu/skin-customizables.inc b/data/qcsrc/menu/skin-customizables.inc index 2d318188..a17b7c06 100644 --- a/data/qcsrc/menu/skin-customizables.inc +++ b/data/qcsrc/menu/skin-customizables.inc @@ -62,7 +62,7 @@ SKINBEGIN SKINVECTOR(COLOR_DIALOG_SINGLEPLAYER, '1 1 0.7'); SKINVECTOR(COLOR_DIALOG_CREDITS, '0.7 0.7 1'); SKINVECTOR(COLOR_DIALOG_WEAPONS, '1 0.7 0.7'); - SKINVECTOR(COLOR_DIALOG_RADAR, '0.7 0.7 1'); + SKINVECTOR(COLOR_DIALOG_HUD, '0.7 0.7 1'); SKINVECTOR(COLOR_DIALOG_SERVERINFO, '0.7 0.7 1'); SKINVECTOR(COLOR_DIALOG_CVARS, '1 0 0'); diff --git a/data/qcsrc/menu/voret/dialog_multiplayer_playersetup.c b/data/qcsrc/menu/voret/dialog_multiplayer_playersetup.c index 791b6490..caffe537 100644 --- a/data/qcsrc/menu/voret/dialog_multiplayer_playersetup.c +++ b/data/qcsrc/menu/voret/dialog_multiplayer_playersetup.c @@ -116,7 +116,7 @@ void fillVoretPlayerSettingsTab(entity me) me.TDempty(me, 0.4); me.TD(me, 1, 2.2, e = makeVoretButton("Radar, HUD & Waypoints...", '0 0 0')); e.onClick = DialogOpenButton_Click; - e.onClickEntity = main.radarDialog; + e.onClickEntity = main.hudDialog; me.TDempty(me, 0.5); me.TR(me); #ifdef ALLOW_FORCEMODELS diff --git a/data/qcsrc/menu/voret/dialog_multiplayer_playersetup_radar.c b/data/qcsrc/menu/voret/dialog_multiplayer_playersetup_hud.c similarity index 84% rename from data/qcsrc/menu/voret/dialog_multiplayer_playersetup_radar.c rename to data/qcsrc/menu/voret/dialog_multiplayer_playersetup_hud.c index ccbae9ff..24c7b564 100644 --- a/data/qcsrc/menu/voret/dialog_multiplayer_playersetup_radar.c +++ b/data/qcsrc/menu/voret/dialog_multiplayer_playersetup_hud.c @@ -1,59 +1,28 @@ #ifdef INTERFACE -CLASS(VoretRadarDialog) EXTENDS(VoretDialog) - METHOD(VoretRadarDialog, toString, string(entity)) - METHOD(VoretRadarDialog, fill, void(entity)) - METHOD(VoretRadarDialog, showNotify, void(entity)) - ATTRIB(VoretRadarDialog, title, string, "Radar, HUD & Waypoints") - ATTRIB(VoretRadarDialog, color, vector, SKINCOLOR_DIALOG_RADAR) - ATTRIB(VoretRadarDialog, intendedWidth, float, 0.7) - ATTRIB(VoretRadarDialog, rows, float, 20) - ATTRIB(VoretRadarDialog, columns, float, 4) -ENDCLASS(VoretRadarDialog) +CLASS(VoretHudDialog) EXTENDS(VoretDialog) + METHOD(VoretHudDialog, toString, string(entity)) + METHOD(VoretHudDialog, fill, void(entity)) + METHOD(VoretHudDialog, showNotify, void(entity)) + ATTRIB(VoretHudDialog, title, string, "Radar, HUD & Waypoints") + ATTRIB(VoretHudDialog, color, vector, SKINCOLOR_DIALOG_HUD) + ATTRIB(VoretHudDialog, intendedWidth, float, 0.7) + ATTRIB(VoretHudDialog, rows, float, 20) + ATTRIB(VoretHudDialog, columns, float, 4) +ENDCLASS(VoretHudDialog) #endif #ifdef IMPLEMENTATION -void showNotifyVoretRadarDialog(entity me) +void showNotifyVoretHudDialog(entity me) { loadAllCvars(me); } -string toStringVoretRadarDialog(entity me) +string toStringVoretHudDialog(entity me) { return "XXX"; } -void fillVoretRadarDialog(entity me) +void fillVoretHudDialog(entity me) { entity e, sl; - me.TR(me); - me.TD(me, 1, 4, makeVoretTextLabel(0, "Radar settings:")); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 0.8, e = makeVoretTextLabel(0, "Position:")); - me.TD(me, 1, 1, e = makeVoretRadioButton(1, "cl_teamradar_position", "0 0", "Top left")); - me.TD(me, 1, 1, e = makeVoretRadioButton(1, "cl_teamradar_position", "0.5 0", "Top middle")); - me.TD(me, 1, 1, e = makeVoretRadioButton(1, "cl_teamradar_position", "1 0", "Top right")); - me.TR(me); - me.TDempty(me, 1); - me.TD(me, 1, 1, e = makeVoretRadioButton(1, "cl_teamradar_position", "0 0.5", "Middle left")); - me.TDempty(me, 1); - me.TD(me, 1, 1, e = makeVoretRadioButton(1, "cl_teamradar_position", "1 0.5", "Middle right")); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 0.8, e = makeVoretTextLabel(0, "Size:")); - me.TD(me, 1, 3, e = makeVoretTextSlider("cl_teamradar_size")); - e.addValue(e, "96x96", "96 96"); - e.addValue(e, "128x96", "128 96"); - e.addValue(e, "128x128", "128 128"); - e.addValue(e, "192x144", "192 144"); - e.addValue(e, "192x192", "192 192"); - e.addValue(e, "256x192", "256 192"); - e.addValue(e, "256x256", "256 256"); - e.configureVoretTextSliderValues(e); - me.TR(me); - me.TDempty(me, 0.2); - sl = makeVoretSlider(0.20, 1, 0.01, "cl_teamradar_background_alpha"); - me.TD(me, 1, 0.8, e = makeVoretSliderCheckBox(-1, 1, sl, "Background:")); - me.TD(me, 1, 3, sl); - me.TR(me); me.TR(me); me.TD(me, 1, 4, makeVoretTextLabel(0, "HUD settings:")); me.TR(me); @@ -86,6 +55,37 @@ void fillVoretRadarDialog(entity me) me.TD(me, 1, 3, e = makeVoretSlider(0.1, 1, 0.01, "sbar_color_bg_team")); setDependent(e, "viewsize", 0, 100); me.TR(me); + me.TR(me); + me.TD(me, 1, 4, makeVoretTextLabel(0, "Radar settings:")); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 0.8, e = makeVoretTextLabel(0, "Position:")); + me.TD(me, 1, 1, e = makeVoretRadioButton(1, "cl_teamradar_position", "0 0", "Top left")); + me.TD(me, 1, 1, e = makeVoretRadioButton(1, "cl_teamradar_position", "0.5 0", "Top middle")); + me.TD(me, 1, 1, e = makeVoretRadioButton(1, "cl_teamradar_position", "1 0", "Top right")); + me.TR(me); + me.TDempty(me, 1); + me.TD(me, 1, 1, e = makeVoretRadioButton(1, "cl_teamradar_position", "0 0.5", "Middle left")); + me.TDempty(me, 1); + me.TD(me, 1, 1, e = makeVoretRadioButton(1, "cl_teamradar_position", "1 0.5", "Middle right")); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 0.8, e = makeVoretTextLabel(0, "Size:")); + me.TD(me, 1, 3, e = makeVoretTextSlider("cl_teamradar_size")); + e.addValue(e, "96x96", "96 96"); + e.addValue(e, "128x96", "128 96"); + e.addValue(e, "128x128", "128 128"); + e.addValue(e, "192x144", "192 144"); + e.addValue(e, "192x192", "192 192"); + e.addValue(e, "256x192", "256 192"); + e.addValue(e, "256x256", "256 256"); + e.configureVoretTextSliderValues(e); + me.TR(me); + me.TDempty(me, 0.2); + sl = makeVoretSlider(0.20, 1, 0.01, "cl_teamradar_background_alpha"); + me.TD(me, 1, 0.8, e = makeVoretSliderCheckBox(-1, 1, sl, "Background:")); + me.TD(me, 1, 3, sl); + me.TR(me); me.TR(me); me.TD(me, 1, 4, makeVoretTextLabel(0, "Waypoint settings:")); me.TR(me); diff --git a/data/qcsrc/menu/voret/mainwindow.c b/data/qcsrc/menu/voret/mainwindow.c index efee1884..56a0dd7d 100644 --- a/data/qcsrc/menu/voret/mainwindow.c +++ b/data/qcsrc/menu/voret/mainwindow.c @@ -7,7 +7,7 @@ CLASS(MainWindow) EXTENDS(ModalController) ATTRIB(MainWindow, mapInfoDialog, entity, NULL) ATTRIB(MainWindow, userbindEditDialog, entity, NULL) ATTRIB(MainWindow, winnerDialog, entity, NULL) - ATTRIB(MainWindow, radarDialog, entity, NULL) + ATTRIB(MainWindow, hudDialog, entity, NULL) ATTRIB(MainWindow, serverInfoDialog, entity, NULL) ATTRIB(MainWindow, cvarsDialog, entity, NULL) ATTRIB(MainWindow, mainNexposee, entity, NULL) @@ -57,7 +57,7 @@ void configureMainWindowMainWindow(entity me) i.configureDialog(i); me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); - me.radarDialog = i = spawnVoretRadarDialog(); + me.hudDialog = i = spawnVoretHudDialog(); i.configureDialog(i); me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); -- 2.39.2