From 45b07a65e05febbc1566d84fa7e6df138d9ac028 Mon Sep 17 00:00:00 2001 From: BuddyFriendGuy Date: Thu, 9 Apr 2015 23:34:04 -0400 Subject: [PATCH] add tooltips for the textbox and the buttons --- qcsrc/menu/xonotic/dialog_multiplayer_create.qc | 5 +++-- qcsrc/menu/xonotic/maplist.qc | 4 ++-- tooltips.db | 7 +++++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_create.qc b/qcsrc/menu/xonotic/dialog_multiplayer_create.qc index 23c10e588..c7961c4f9 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_create.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_create.qc @@ -159,6 +159,7 @@ void XonoticServerCreateTab_fill(entity me) // 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.TD(me, 1, me.columns - me.firstColumn - 0.35, e = me.mapListBox.stringFilterBox); e.onChange = MapList_StringFilterBox_Change; e.keyDown = MapList_StringFilterBox_keyDown; @@ -173,8 +174,8 @@ void XonoticServerCreateTab_fill(entity me) me.TD(me, 1, 1, e = makeXonoticButton(_("Remove shown"), '0 0 0')); e.onClick = MapList_Remove_Shown; e.onClickEntity = me.mapListBox; - me.TD(me, 1, 1, e = makeXonoticButton(_("Clear all"), '0 0 0')); - e.onClick = MapList_Clear_All; + me.TD(me, 1, 1, e = makeXonoticButton(_("Remove all"), '0 0 0')); + e.onClick = MapList_Remove_All; e.onClickEntity = me.mapListBox; // The big button at the bottom diff --git a/qcsrc/menu/xonotic/maplist.qc b/qcsrc/menu/xonotic/maplist.qc index baeaf82e9..e06c3084c 100644 --- a/qcsrc/menu/xonotic/maplist.qc +++ b/qcsrc/menu/xonotic/maplist.qc @@ -51,7 +51,7 @@ void MapList_StringFilterBox_Change(entity box, entity me); float MapList_StringFilterBox_keyDown(entity me, float key, float ascii, float shift); void MapList_Add_Shown(entity btn, entity me); void MapList_Remove_Shown(entity btn, entity me); -void MapList_Clear_All(entity btn, entity me); +void MapList_Remove_All(entity btn, entity me); void MapList_LoadMap(entity btn, entity me); #endif @@ -293,7 +293,7 @@ void MapList_Remove_Shown(entity btn, entity me) me.refilter(me); } -void MapList_Clear_All(entity btn, entity me) +void MapList_Remove_All(entity btn, entity me) { cvar_set("g_maplist", ""); me.refilter(me); diff --git a/tooltips.db b/tooltips.db index a0c06485b..45ef3df6d 100644 --- a/tooltips.db +++ b/tooltips.db @@ -43,8 +43,11 @@ \g_instagib\Players will be given the Minstanex, which is a railgun with infinite damage. If the player runs out of ammo, he will have 10 seconds to find some or if he fails to do so, face death. The secondary fire mode is a laser which does not inflict any damage and is good for doing trickjumps. \g_nix\No items Xonotic - instead of pickup items, everyone plays with the same weapon. After some time, a countdown will start, after which everyone will switch to another weapon. \g_nix_with_laser\Always carry the laser as an additional weapon in Nix -\XonoticMultiplayerDialog/Select all\Select all maps -\XonoticMultiplayerDialog/Select none\Unselect all maps + +\XonoticMultiplayerDialog_StringFilterBox\Click here or Ctrl-F to provide a keyword to narrow down the maplist above. Press Enter when done. +\XonoticMultiplayerDialog/Add shown\Add the maps shown in Maplist above to your selection +\XonoticMultiplayerDialog/Remove shown\Remove the maps shown in Maplist above from your selection +\XonoticMultiplayerDialog/Remove all\Remove all the maps from your selection \XonoticMultiplayerDialog/Timedemo\Benchmark how fast your computer can run the highlighted demo -- 2.39.2