]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/keybinder.c
Merge remote branch 'refs/remotes/origin/mirceakitsune/highres_weapon_textures'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / keybinder.c
index c2d124c04113b34fabc35e42754fcfb2f8567a05..2eb51755dca6027427873bc4aabe7719fac22f3c 100644 (file)
@@ -68,7 +68,7 @@ entity makeXonoticKeyBinder()
        me.configureXonoticKeyBinder(me);
        return me;
 }
-void configureXonoticKeyBinderXonoticKeyBinder(entity me)
+void XonoticKeyBinder_configureXonoticKeyBinder(entity me)
 {
        me.configureXonoticListBox(me);
        if(Xonotic_KeyBinds_Count < 0)
@@ -76,7 +76,7 @@ void configureXonoticKeyBinderXonoticKeyBinder(entity me)
        me.nItems = Xonotic_KeyBinds_Count;
        me.setSelected(me, 0);
 }
-void resizeNotifyXonoticKeyBinder(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
+void XonoticKeyBinder_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
 {
        SUPER(XonoticKeyBinder).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
 
@@ -103,7 +103,7 @@ void KeyBinder_Bind_Change(entity btn, entity me)
        me.keyGrabButton.forcePressed = 1;
        keyGrabber = me;
 }
-void keyGrabbedXonoticKeyBinder(entity me, float key, float ascii)
+void XonoticKeyBinder_keyGrabbed(entity me, float key, float ascii)
 {
        float n, j, k, nvalid;
        string func;
@@ -135,7 +135,7 @@ void keyGrabbedXonoticKeyBinder(entity me, float key, float ascii)
        }
        localcmd("\nbind \"", keynumtostring(key), "\" \"", func, "\"\n");
 }
-void editUserbindXonoticKeyBinder(entity me, string theName, string theCommandPress, string theCommandRelease)
+void XonoticKeyBinder_editUserbind(entity me, string theName, string theCommandPress, string theCommandRelease)
 {
        string func, descr;
 
@@ -195,7 +195,7 @@ void KeyBinder_Bind_Clear(entity btn, entity me)
        }
 
 }
-void clickListBoxItemXonoticKeyBinder(entity me, float i, vector where)
+void XonoticKeyBinder_clickListBoxItem(entity me, float i, vector where)
 {
        if(i == me.lastClickedServer)
                if(time < me.lastClickedTime + 0.3)
@@ -206,7 +206,7 @@ void clickListBoxItemXonoticKeyBinder(entity me, float i, vector where)
        me.lastClickedServer = i;
        me.lastClickedTime = time;
 }
-void setSelectedXonoticKeyBinder(entity me, float i)
+void XonoticKeyBinder_setSelected(entity me, float i)
 {
        // handling of "unselectable" items
        i = floor(0.5 + bound(0, i, me.nItems - 1));
@@ -233,7 +233,7 @@ void setSelectedXonoticKeyBinder(entity me, float i)
                me.userbindEditButton.disabled = (substring(Xonotic_KeyBinds_Descriptions[i], 0, 1) != "$");
        SUPER(XonoticKeyBinder).setSelected(me, i);
 }
-float keyDownXonoticKeyBinder(entity me, float key, float ascii, float shift)
+float XonoticKeyBinder_keyDown(entity me, float key, float ascii, float shift)
 {
        float r;
        r = 1;
@@ -253,7 +253,7 @@ float keyDownXonoticKeyBinder(entity me, float key, float ascii, float shift)
        }
        return r;
 }
-void drawListBoxItemXonoticKeyBinder(entity me, float i, vector absSize, float isSelected)
+void XonoticKeyBinder_drawListBoxItem(entity me, float i, vector absSize, float isSelected)
 {
        string s;
        float j, k, n;
@@ -297,7 +297,8 @@ void drawListBoxItemXonoticKeyBinder(entity me, float i, vector absSize, float i
                                theAlpha *= SKINALPHA_DISABLED;
        }
 
-       draw_Text(me.realUpperMargin * eY + extraMargin * eX, descr, me.realFontSize, theColor, theAlpha, 0);
+       s = draw_TextShortenToWidth(descr, me.columnFunctionSize, 0, me.realFontSize);
+       draw_Text(me.realUpperMargin * eY + extraMargin * eX, s, me.realFontSize, theColor, theAlpha, 0);
        if(func != "")
        {
                n = tokenize(findkeysforcommand(func)); // uses '...' strings