]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/dialog_multiplayer_create.qc
Hardcode tooltips
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_multiplayer_create.qc
index 5b7b5ef7ac9d890ecec867fc97bfe0aa718d7e4c..a4974eceebf804e9ae77a6c6a2299206dd8811e2 100644 (file)
@@ -25,13 +25,13 @@ void GameType_ConfigureSliders(entity e, entity l, string pLabel, float pMin, fl
 {
        if(pCvar == "")
        {
-               e.configureXonoticTextSlider(e, string_null);
+               e.configureXonoticTextSlider(e, string_null, string_null);
                l.setText(l, pLabel);
                e.disabled = l.disabled = true;
        }
        else
        {
-               e.configureXonoticTextSlider(e, pCvar);
+               e.configureXonoticTextSlider(e, pCvar, "-");
 
                // clear old values
                int i;
@@ -75,7 +75,8 @@ void XonoticServerCreateTab_fill(entity me)
 
        me.gotoRC(me, 12.5, 0);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Time limit:")));
-               me.TD(me, 1, 2, e = makeXonoticTextSlider("timelimit_override"));
+               me.TD(me, 1, 2, e = makeXonoticTextSlider_T("timelimit_override",
+                       _("Timelimit in minutes that when hit, will end the match")));
                        e.addValue(e, ZCTX(_("TIMLIM^Default")), "-1");
                        e.addValue(e, ZCTX(_("TIMLIM^1 minute")), "1");
                        e.addValue(e, ZCTX(_("TIMLIM^2 minutes")), "2");
@@ -98,12 +99,15 @@ void XonoticServerCreateTab_fill(entity me)
                        e.configureXonoticTextSliderValues(e);
        me.TR(me);
                me.TD(me, 1, 1, me.labelFraglimit = makeXonoticTextLabel(0, _("Frag limit:")));
-               me.TD(me, 1, 2, me.sliderFraglimit = makeXonoticTextSlider("fraglimit_override"));
+               me.TD(me, 1, 2, e = me.sliderFraglimit = makeXonoticTextSlider("fraglimit_override"));
+               // TODO add logic to update tooltip. fraglimit_override tooltip:
+               // _("The amount of frags needed before the match will end")
                        GameType_ConfigureSliders(me.sliderFraglimit, me.labelFraglimit, _("Frag limit:"), 5, 100, 5, "fraglimit_override");
 
        me.gotoRC(me, 15, 0);
                me.TD(me, 1, 1, me.labelTeams = makeXonoticTextLabel(0, _("Teams:")));
                me.TD(me, 1, 2, e = me.sliderTeams = makeXonoticTextSlider(string_null));
+                       // TODO add logic to change the default tooltip: _("The amount of frags needed before the match will end")
                        e.addValue(e, _("Default"), "0");
                        e.addValue(e, _("2 teams"), "2");
                        e.addValue(e, _("3 teams"), "3");
@@ -111,14 +115,17 @@ void XonoticServerCreateTab_fill(entity me)
                        e.configureXonoticTextSliderValues(e);
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Player slots:")));
-               me.TD(me, 1, 2, makeXonoticSlider(1, 32, 1, "menu_maxplayers"));
+               me.TD(me, 1, 2, e = makeXonoticSlider_T(1, 32, 1, "menu_maxplayers",
+                       _("The maximum amount of players or bots that can be connected to your server at once")));
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Number of bots:")));
-               me.TD(me, 1, 2, makeXonoticSlider(0, 9, 1, "bot_number"));
+               me.TD(me, 1, 2, e = makeXonoticSlider_T(0, 9, 1, "bot_number",
+                       _("Amount of bots on your server")));
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Bot skill:")));
                        setDependent(e, "bot_number", 0, -1);
-               me.TD(me, 1, 2, e = makeXonoticTextSlider("skill"));
+               me.TD(me, 1, 2, e = makeXonoticTextSlider_T("skill",
+                       _("Specify how experienced the bots will be")));
                        e.addValue(e, _("Botlike"), "0");
                        e.addValue(e, _("Beginner"), "1");
                        e.addValue(e, _("You will win"), "2");
@@ -145,7 +152,8 @@ void XonoticServerCreateTab_fill(entity me)
        // this decision was made in this poll: http://forums.xonotic.org/showthread.php?tid=5445
        me.gotoRC(me, me.rows - 2.5, 0);
                me.TDempty(me, 0.5);
-               me.TD(me, 1, 2, e = makeXonoticButton(_("Mutators..."), '0 0 0'));
+               me.TD(me, 1, 2, e = makeXonoticButton_T(_("Mutators..."), '0 0 0',
+                       _("Mutators and weapon arenas")));
                        e.onClick = DialogOpenButton_Click;
                        e.onClickEntity = main.mutatorsDialog;
                        main.mutatorsDialog.refilterEntity = me.mapListBox;
@@ -163,8 +171,8 @@ void XonoticServerCreateTab_fill(entity me)
        me.gotoRC(me, me.rows - 4.5, me.firstColumn);
                // string filter label and box
                me.TD(me, 1, 0.35, e = makeXonoticTextLabel(1, _("Filter:")));
-               me.mapListBox.stringFilterBox = makeXonoticMapListStringFilterBox(me, 0, string_null);
-               me.mapListBox.stringFilterBox.tooltip = getZonedTooltipForIdentifier("XonoticMultiplayerDialog_StringFilterBox");
+               me.mapListBox.stringFilterBox = makeXonoticInputBox_T(0, string_null,
+                       _("Click here or Ctrl-F to provide a keyword to narrow down the maplist above. Ctrl-Delete to clear; Enter when done."));
                me.TD(me, 1, me.columns - me.firstColumn - 0.35, e = me.mapListBox.stringFilterBox);
                        e.onChange = MapList_StringFilterBox_Change;
                        e.keyDown = MapList_StringFilterBox_keyDown;
@@ -174,18 +182,22 @@ void XonoticServerCreateTab_fill(entity me)
        me.gotoRC(me, me.rows - 3.5, me.firstColumn);
                // the selection buttons
                me.TDempty(me, 0.2);
-               me.TD(me, 1, 1.3, e = makeXonoticButton(_("Add shown"), '0 0 0'));
+               me.TD(me, 1, 1.3, e = makeXonoticButton_T(_("Add shown"), '0 0 0',
+                       _("Add the maps shown in Maplist above to your selection")));
                        e.onClick = MapList_Add_Shown;
                        e.onClickEntity = me.mapListBox;
-               me.TD(me, 1, 1.3, e = makeXonoticButton(_("Remove shown"), '0 0 0'));
+               me.TD(me, 1, 1.3, e = makeXonoticButton_T(_("Remove shown"), '0 0 0',
+                       _("Remove the maps shown in Maplist above from your selection")));
                        e.onClick = MapList_Remove_Shown;
                        e.onClickEntity = me.mapListBox;
        me.gotoRC(me, me.rows - 2.5, me.firstColumn);
                me.TDempty(me, 0.2);
-               me.TD(me, 1, 1.3, e = makeXonoticButton(_("Add all"), '0 0 0'));
+               me.TD(me, 1, 1.3, e = makeXonoticButton_T(_("Add all"), '0 0 0',
+                       _("Add every available map to your selection")));
                        e.onClick = MapList_Add_All;
                        e.onClickEntity = me.mapListBox;
-               me.TD(me, 1, 1.3, e = makeXonoticButton(_("Remove all"), '0 0 0'));
+               me.TD(me, 1, 1.3, e = makeXonoticButton_T(_("Remove all"), '0 0 0',
+                       _("Remove all the maps from your selection")));
                        e.onClick = MapList_Remove_All;
                        e.onClickEntity = me.mapListBox;
 
@@ -234,8 +246,9 @@ void XonoticServerCreateTab_gameTypeChangeNotify(entity me)
                case MAPINFO_TYPE_FREEZETAG:        x = "g_freezetag_teams_override";   break;
                case MAPINFO_TYPE_KEYHUNT:          x = "g_keyhunt_teams_override";     break;
                case MAPINFO_TYPE_TEAM_DEATHMATCH:  x = "g_tdm_teams_override";         break;
+               // TODO add logic to update tooltip
        }
-       e.configureXonoticTextSlider(e, x);
+       e.configureXonoticTextSlider(e, x, string_null);
        e.configureXonoticTextSliderValues(e);
        if(!x)
                e.value = 0;