]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Move tooltip functions around
authorterencehill <piuntn@gmail.com>
Sun, 30 Aug 2015 19:15:56 +0000 (21:15 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 30 Aug 2015 19:15:56 +0000 (21:15 +0200)
qcsrc/menu/xonotic/util.qc

index 56c816dab93842338cdf4ca1be0ee6967e305d0e..1b216a14bcb61499fb901d837c5bc920d1b593bc 100644 (file)
@@ -17,32 +17,6 @@ float GL_Have_TextureCompression()
        return (GL_CheckExtension("GL_EXT_texture_compression_s3tc") && GL_CheckExtension("GL_ARB_texture_compression"));
 }
 
-void setZonedTooltip(entity e, string theTooltip, string theCvar)
-{
-       if(theTooltip == "") // no tooltip, use cvar description then
-       {
-               if(theCvar != "" && prvm_language == "en")
-               {
-                       string t = cvar_description(theCvar);
-                       if(t != "" && t != "custom cvar")
-                               theTooltip = t;
-               }
-       }
-       else if(theTooltip == "-") // no cvar description as tooltip
-       {
-               theTooltip = string_null;
-       }
-
-       if(e.tooltip)
-               strunzone(e.tooltip);
-       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)
 {
@@ -267,6 +241,32 @@ void setDependentWeird(entity e, float(entity) func)
        setDependent_Check(e);
 }
 
+void setZonedTooltip(entity e, string theTooltip, string theCvar)
+{
+       if(theTooltip == "") // no tooltip, use cvar description then
+       {
+               if(theCvar != "" && prvm_language == "en")
+               {
+                       string t = cvar_description(theCvar);
+                       if(t != "" && t != "custom cvar")
+                               theTooltip = t;
+               }
+       }
+       else if(theTooltip == "-") // no cvar description as tooltip
+       {
+               theTooltip = string_null;
+       }
+
+       if(e.tooltip)
+               strunzone(e.tooltip);
+       e.tooltip = (theTooltip != "") ? strzone(theTooltip) : string_null;
+}
+
+void clearTooltip(entity e)
+{
+       setZonedTooltip(e, string_null, string_null);
+}
+
 // URI SYSTEM ////////////////////////////////////////////////////////
 
 float _Nex_ExtResponseSystem_Queried;