From: terencehill Date: Sun, 30 Aug 2015 18:17:56 +0000 (+0200) Subject: Add clearTooltip function X-Git-Tag: xonotic-v0.8.2~1808^2~18 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9334cb6ab64a35612dcfc372f704756da1564805;p=xonotic%2Fxonotic-data.pk3dir.git Add clearTooltip function --- diff --git a/qcsrc/menu/xonotic/serverlist.qc b/qcsrc/menu/xonotic/serverlist.qc index 41e11e383..f49ea947e 100644 --- a/qcsrc/menu/xonotic/serverlist.qc +++ b/qcsrc/menu/xonotic/serverlist.qc @@ -437,7 +437,7 @@ void ServerList_Update_favoriteButton(entity btn, entity me) if(IsFavorite(me.ipAddressBox.text)) { e.setText(e, _("Remove")); - setZonedTooltip(e, string_null, string_null); + clearTooltip(e); } else { diff --git a/qcsrc/menu/xonotic/util.qc b/qcsrc/menu/xonotic/util.qc index 2554759f3..56c816dab 100644 --- a/qcsrc/menu/xonotic/util.qc +++ b/qcsrc/menu/xonotic/util.qc @@ -38,6 +38,11 @@ void setZonedTooltip(entity e, string theTooltip, string theCvar) e.tooltip = (theTooltip != "") ? strzone(theTooltip) : string_null; } +void clearTooltip(entity e) +{ + setZonedTooltip(e, string_null, string_null); +} + .entity parent, firstChild, nextSibling; void forAllDescendants(entity root, void(entity, entity) funcPre, void(entity, entity) funcPost, entity pass) { diff --git a/qcsrc/menu/xonotic/util.qh b/qcsrc/menu/xonotic/util.qh index 2ee8a4d03..9e989a466 100644 --- a/qcsrc/menu/xonotic/util.qh +++ b/qcsrc/menu/xonotic/util.qh @@ -20,6 +20,7 @@ void setDependentStringNotEqual(entity e, string theCvarName, string theCvarValu void setDependentWeird(entity e, float(entity) func); void setZonedTooltip(entity e, string theTooltip, string theCvar); +void clearTooltip(entity e); string resolvemod(string m);