ALPHA_BEHIND 0.5
ALPHA_TEXT 0.7
COLOR_TEXT '1 1 1'
+ALPHA_HEADER 0.5
+COLOR_HEADER '1 1 1'
// mouse
// uses "cursor" images
ALPHA_BEHIND 0.5
ALPHA_TEXT 0.7
COLOR_TEXT '1 1 1'
+ALPHA_HEADER 0.5
+COLOR_HEADER '1 1 1'
// mouse
// uses "cursor" images
ALPHA_BEHIND 1
ALPHA_TEXT 0.7
COLOR_TEXT '1 1 1'
+ALPHA_HEADER 0.5
+COLOR_HEADER '1 1 1'
// item: button
// uses "button" images
#include "xonotic/bigbutton.c"
#include "xonotic/commandbutton.c"
#include "xonotic/bigcommandbutton.c"
+#include "xonotic/textlabel.c"
#include "xonotic/dialog_firstrun.c"
#include "xonotic/dialog_teamselect.c"
#include "xonotic/dialog_sandboxtools.c"
#include "xonotic/dialog_multiplayer.c"
#include "xonotic/dialog_multiplayer_profile.c"
#include "xonotic/tabcontroller.c"
-#include "xonotic/textlabel.c"
#include "xonotic/slider.c"
#include "xonotic/slider_resolution.c"
#include "xonotic/checkbox.c"
SKINFLOAT(ALPHA_BEHIND, 0.5);
SKINFLOAT(ALPHA_TEXT, 0.7);
SKINVECTOR(COLOR_TEXT, '1 1 1');
-
+ SKINFLOAT(ALPHA_HEADER, 0.5);
+ SKINVECTOR(COLOR_HEADER, '1 1 1');
+
// item: button
SKINSTRING(GFX_BUTTON, "button");
SKINSTRING(GFX_BUTTON_GRAY, "buttongray");
entity e, e0;
me.gotoRC(me, 0.5, 0);
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Gametype")));
- e.isBold = TRUE;
- e.alpha = 0.5;
+ me.TD(me, 1, 3, makeXonoticHeaderLabel(_("Gametype")));
me.TR(me);
me.TD(me, 10.5, 3, e = makeXonoticGametypeList());
me.gotoRC(me, 0.5, 3.2); me.setFirstColumn(me, me.currentColumn);
me.mapListBox = makeXonoticMapList();
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Maplist")));
- e.isBold = TRUE;
- e.alpha = 0.5;
+ me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Maplist")));
makeCallback(e, me.mapListBox, me.mapListBox.refilterCallback);
me.TR(me);
me.TD(me, me.rows - 4, 3, me.mapListBox);
ATTRIB(XonoticProfileTab, rows, float, 23)
ATTRIB(XonoticProfileTab, columns, float, 6.1) // added extra .2 for center space
ATTRIB(XonoticProfileTab, playerNameLabel, entity, NULL)
- ATTRIB(XonoticProfileTab, playerNameLabelAlpha, float, 0)
+ ATTRIB(XonoticProfileTab, playerNameLabelAlpha, float, SKINALPHA_HEADER)
ENDCLASS(XonoticProfileTab)
entity makeXonoticProfileTab();
#endif
// NAME SECTION
// ==============
me.gotoRC(me, 0.5, 0);
- me.TD(me, 1, 3, me.playerNameLabel = makeXonoticTextLabel(0.5, _("Name")));
- me.playerNameLabel.isBold = TRUE;
- me.playerNameLabelAlpha = 0.5;
+ me.TD(me, 1, 3, me.playerNameLabel = makeXonoticHeaderLabel(_("Name")));
me.gotoRC(me, 1.5, 0);
me.TD(me, 1, 3, label = makeXonoticTextLabel(0.5, string_null));
//me.gotoRC(me, 0.5, 3.1); me.setFirstColumn(me, me.currentColumn); // TOP RIGHT
//me.gotoRC(me, 9, 3.1); me.setFirstColumn(me, me.currentColumn); // BOTTOM RIGHT
me.gotoRC(me, 9, 0); me.setFirstColumn(me, me.currentColumn); // BOTTOM LEFT
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Model")));
- e.isBold = TRUE;
- e.alpha = 0.5;
+ me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Model")));
+
me.TR(me);
//me.TDempty(me, 0); // MODEL LEFT, COLOR RIGHT
me.TDempty(me, 1); // MODEL RIGHT, COLOR LEFT
//me.setFirstColumn(me, me.currentColumn + 2); // MODEL LEFT, COLOR RIGHT
me.gotoRC(me, me.currentRow, 0); me.setFirstColumn(me, me.currentColumn); // MODEL RIGHT, COLOR LEFT
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0.5, _("Glowing color")));
- e.isBold = TRUE;
- e.alpha = 0.5;
+ me.TD(me, 1, 1, e = makeXonoticHeaderLabel(_("Glowing color")));
for(i = 0; i < 15; ++i)
{
if(mod(i, 5) == 0)
}
me.TR(me);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0.5, _("Detail color")));
- e.isBold = TRUE;
- e.alpha = 0.5;
+ me.TD(me, 1, 1, e = makeXonoticHeaderLabel(_("Detail color")));
for(i = 0; i < 15; ++i)
{
if(mod(i, 5) == 0)
me.gotoRC(me, 0.5, 3.1); me.setFirstColumn(me, me.currentColumn); // TOP RIGHT
//me.gotoRC(me, 9, 3.1); me.setFirstColumn(me, me.currentColumn); // BOTTOM RIGHT
//me.gotoRC(me, 9, 0); me.setFirstColumn(me, me.currentColumn); // BOTTOM LEFT
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Statistics")));
- e.isBold = TRUE;
- e.alpha = 0.5;
+ me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Statistics")));
+
me.TR(me);
me.TDempty(me, 0.25);
me.TD(me, 1, 2.5, e = makeXonoticCheckBox(0, "cl_allow_uidtracking", _("Allow player statistics to track your client")));
me.gotoRC(me, 16, 3.1); me.setFirstColumn(me, me.currentColumn); // BOTTOM SECTION, TOP POS
//me.gotoRC(me, 13.5, 3.1); me.setFirstColumn(me, me.currentColumn); // BOTTOM SECTION, TOP POS
//me.gotoRC(me, 0.5, 3.1); me.setFirstColumn(me, me.currentColumn); // TOP SECTION, TOP POS
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Country")));
- e.isBold = TRUE;
- e.alpha = 0.5;
+ me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Country")));
+
me.TR(me);
me.TDempty(me, 0.5);
me.TD(me, 4.5, 2, e = makeXonoticLanguageList()); // todo: cl_country: create proper country list
e.addValue(e, ZCTX(_("GENDER^Male")), "2");
e.configureXonoticTextSliderValues(e);
#else
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Gender")));
- e.isBold = TRUE;
- e.alpha = 0.5;
+ me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Gender")));
me.TR(me);
#define GENDERWIDTH_OFFSET 0.25
#define GENDERWIDTH_LENGTH 2.5
//me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Scoreboard")));
- e.isBold = TRUE;
- e.alpha = 0.5;
+ me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Scoreboard")));
//me.TR(me);
// me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Alpha:")));
// me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.05, "scoreboard_alpha_bg"));
me.TR(me);
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Waypoints")));
- e.isBold = TRUE;
- e.alpha = 0.5;
+ me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Waypoints")));
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_hidewaypoints", _("Display waypoint markers for objectives on the map")));
me.TR(me);
#if 0
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Damage")));
- e.isBold = TRUE;
- e.alpha = 0.5;
+ me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Damage")));
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Overlay:")));
me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.05, "hud_damage"));
#endif
me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Player Names")));
- e.isBold = TRUE;
- e.alpha = 0.5;
+ me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Player Names")));
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_shownames", _("Show names above players")));
entity e;
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Frag Information")));
- e.isBold = TRUE;
- e.alpha = 0.5;
+ me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Frag Information")));
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_show_sprees", _("Display information about killing sprees")));
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_show_location", _("Add frag location to death messages when available")));
me.gotoRC(me, 9, 0); me.setFirstColumn(me, me.currentColumn);
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Gamemode Settings")));
- e.isBold = TRUE;
- e.alpha = 0.5;
+ me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Gamemode Settings")));
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 1, "notification_CHOICE_CTF_CAPTURE_TIME_RED", _("Display capture times in Capture The Flag")));
makeMulti(e, "notification_CHOICE_CTF_CAPTURE_TIME_BLUE notification_CHOICE_CTF_CAPTURE_BROKEN_RED notification_CHOICE_CTF_CAPTURE_BROKEN_BLUE notification_CHOICE_CTF_CAPTURE_UNBROKEN_RED notification_CHOICE_CTF_CAPTURE_UNBROKEN_BLUE ");
e.sendCvars = TRUE;
me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Other")));
- e.isBold = TRUE;
- e.alpha = 0.5;
+ me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Other")));
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(4, 1, "con_notify", _("Display console messages in the top left corner")));
me.TR(me);
makeMulti(e, "notification_INFO_ITEM_WEAPON_DROP notification_INFO_ITEM_WEAPON_GOT notification_INFO_ITEM_WEAPON_NOAMMO notification_INFO_ITEM_WEAPON_PRIMORSEC notification_INFO_ITEM_WEAPON_UNAVAILABLE");
me.gotoRC(me, 9, 3.2); me.setFirstColumn(me, me.currentColumn);
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Announcers")));
- e.isBold = TRUE;
- e.alpha = 0.5;
+ me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Announcers")));
#if 0
// there's just not enough room for this, and it's not important enough to justify...
me.TR(me);
// later I would like quite a few more options in this tab.
me.gotoRC(me, 0, 1); me.setFirstColumn(me, me.currentColumn);
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Items")));
- e.isBold = TRUE;
- e.alpha = 0.5;
+ me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Items")));
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_simple_items", _("Use simple 2D images instead of item models")));
me.TR(me);
me.TR(me);
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Players")));
- e.isBold = TRUE;
- e.alpha = 0.5;
+ me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Players")));
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_forceplayermodels", _("Force player models to mine")));
me.TR(me);
me.TR(me);
me.TDempty(me, 0.25);
- me.TD(me, 1, 2.5, e = makeXonoticTextLabel(0.5, _("Weapon Priority List")));
- e.isBold = TRUE;
- e.alpha = 0.5;
+ me.TD(me, 1, 2.5, e = makeXonoticHeaderLabel(_("Weapon Priority List")));
me.TR(me);
me.TDempty(me, 0.25);
me.TD(me, 10, 2.5, e = me.weaponsList = makeXonoticWeaponsList());
entity kb;
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Key Bindings")));
- e.isBold = TRUE;
- e.alpha = 0.5;
+ me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Key Bindings")));
me.TR(me);
me.TD(me, me.rows - 2.5, 3, kb = makeXonoticKeyBinder());
me.gotoRC(me, me.rows - 1.5, 0);
kb.clearButton = e;
me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Mouse")));
- e.isBold = TRUE;
- e.alpha = 0.5;
+ me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Mouse")));
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Sensitivity:")));
me.TD(me, 1, 2, e = makeXonoticSlider(1, 32, 0.2, "sensitivity"));
me.TR(me);
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Other")));
- e.isBold = TRUE;
- e.alpha = 0.5;
+ me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Other")));
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "con_closeontoggleconsole", _("Pressing \"enter console\" key also closes it")));
me.TR(me);
//entity sk;
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Network")));
- e.isBold = TRUE;
- e.alpha = 0.5;
+ me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Network")));
me.TR(me);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Client UDP port:")));
me.TD(me, 1, 1.5, e = makeXonoticInputBox(0, "cl_port"));
me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 1, "crypto_aeslevel", _("Use encryption (AES) when available"))); // TODO: move up
me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Framerate")));
- e.isBold = TRUE;
- e.alpha = 0.5;
+ me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Framerate")));
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Maximum:")));
me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_maxfps"));
me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "showfps", _("Show frames per second")));
me.TR(me);
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Other")));
- e.isBold = TRUE;
- e.alpha = 0.5;
+ me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Other")));
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Menu tooltips:")));
me.TD(me, 1, 2, e = makeXonoticTextSlider("menu_tooltips"));
me.TR(me);
me.TDempty(me, 0.25);
- me.TD(me, 1, 2.5, e = makeXonoticTextLabel(0.5, _("Menu Skins")));
- e.isBold = TRUE;
- e.alpha = 0.5;
+ me.TD(me, 1, 2.5, e = makeXonoticHeaderLabel(_("Menu Skins")));
me.TR(me);
me.TDempty(me, 0.25);
me.TD(me, me.rows - 2.5, 2.5, sk = makeXonoticSkinList());
e.onClickEntity = sk;*/
me.gotoRC(me, 0, 3.75); me.setFirstColumn(me, me.currentColumn);
- me.TD(me, 1, 1.5, e = makeXonoticTextLabel(0.5, _("Text Language")));
- e.isBold = TRUE;
- e.alpha = 0.5;
+ me.TD(me, 1, 1.5, e = makeXonoticHeaderLabel(_("Text Language")));
me.TR(me);
me.TD(me, 8, 1.5, sk = makeXonoticLanguageList());
me.configureXonoticTextLabel(me, theAlign, theText);
return me;
}
+entity makeXonoticHeaderLabel(string theText)
+{
+ entity me;
+ me = makeXonoticTextLabel(0.5, theText);
+ me.colorL = SKINCOLOR_HEADER;
+ me.alpha = SKINALPHA_HEADER;
+ me.isBold = TRUE;
+ return me;
+}
void XonoticTextLabel_configureXonoticTextLabel(entity me, float theAlign, string theText)
{
me.configureLabel(me, theText, me.fontSize, theAlign);