]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/keybinder.qc
Merge branch 'master' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / keybinder.qc
index 02f41efd2c727bbb6c70f564a818372293d57578..a510a757c9cec36bafbff07d26476a12891fc1d8 100644 (file)
@@ -1,13 +1,15 @@
-#ifdef INTERFACE
-CLASS(XonoticKeyBinder) EXTENDS(XonoticListBox)
-       METHOD(XonoticKeyBinder, configureXonoticKeyBinder, void(entity))
+#ifndef KEYBINDER_H
+#define KEYBINDER_H
+#include "listbox.qc"
+CLASS(XonoticKeyBinder, XonoticListBox)
+       METHOD(XonoticKeyBinder, configureXonoticKeyBinder, void(entity));
        ATTRIB(XonoticKeyBinder, rowsPerItem, int, 1)
-       METHOD(XonoticKeyBinder, drawListBoxItem, void(entity, int, vector, bool, bool))
-       METHOD(XonoticKeyBinder, doubleClickListBoxItem, void(entity, float, vector))
-       METHOD(XonoticKeyBinder, resizeNotify, void(entity, vector, vector, vector, vector))
-       METHOD(XonoticKeyBinder, setSelected, void(entity, float))
-       METHOD(XonoticKeyBinder, keyDown, float(entity, float, float, float))
-       METHOD(XonoticKeyBinder, keyGrabbed, void(entity, float, float))
+       METHOD(XonoticKeyBinder, drawListBoxItem, void(entity, int, vector, bool, bool));
+       METHOD(XonoticKeyBinder, doubleClickListBoxItem, void(entity, float, vector));
+       METHOD(XonoticKeyBinder, resizeNotify, void(entity, vector, vector, vector, vector));
+       METHOD(XonoticKeyBinder, setSelected, void(entity, float));
+       METHOD(XonoticKeyBinder, keyDown, float(entity, float, float, float));
+       METHOD(XonoticKeyBinder, keyGrabbed, void(entity, float, float));
 
        ATTRIB(XonoticKeyBinder, realFontSize, vector, '0 0 0')
        ATTRIB(XonoticKeyBinder, realUpperMargin, float, 0)
@@ -22,12 +24,13 @@ CLASS(XonoticKeyBinder) EXTENDS(XonoticListBox)
        ATTRIB(XonoticKeyBinder, keyGrabButton, entity, NULL)
        ATTRIB(XonoticKeyBinder, clearButton, entity, NULL)
        ATTRIB(XonoticKeyBinder, userbindEditDialog, entity, NULL)
-       METHOD(XonoticKeyBinder, editUserbind, void(entity, string, string, string))
+       METHOD(XonoticKeyBinder, editUserbind, void(entity, string, string, string));
 ENDCLASS(XonoticKeyBinder)
 entity makeXonoticKeyBinder();
 void KeyBinder_Bind_Change(entity btn, entity me);
 void KeyBinder_Bind_Clear(entity btn, entity me);
 void KeyBinder_Bind_Edit(entity btn, entity me);
+void KeyBinder_Bind_Reset_All(entity btn, entity me);
 #endif
 
 #ifdef IMPLEMENTATION
@@ -65,7 +68,7 @@ void Xonotic_KeyBinds_Read()
 entity makeXonoticKeyBinder()
 {
        entity me;
-       me = spawnXonoticKeyBinder();
+       me = NEW(XonoticKeyBinder);
        me.configureXonoticKeyBinder(me);
        return me;
 }