]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/keybinder.qc
Merge remote-tracking branch 'origin/master' into terencehill/listbox_item_highlight
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / keybinder.qc
index 02f41efd2c727bbb6c70f564a818372293d57578..8953b1db9b3f716e11dd0d49eb83a2566c8cf859 100644 (file)
@@ -1,5 +1,7 @@
-#ifdef INTERFACE
-CLASS(XonoticKeyBinder) EXTENDS(XonoticListBox)
+#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))
@@ -28,6 +30,7 @@ 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;
 }