]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/keybinder.qc
menu: #undef IMPLEMENTATION
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / keybinder.qc
index fe7b95ef722c499afe5163c84ea9561a8ede2a24..3cb20d3018dfaa69b20c0ac3867dd62f98d01992 100644 (file)
@@ -1,43 +1,10 @@
 #include "keybinder.qh"
-#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, showNotify, void(entity));
-       METHOD(XonoticKeyBinder, setSelected, void(entity, float));
-       METHOD(XonoticKeyBinder, keyDown, float(entity, float, float, float));
-       METHOD(XonoticKeyBinder, keyGrabbed, void(entity, float, float));
-       METHOD(XonoticKeyBinder, destroy, void(entity));
-
-       ATTRIB(XonoticKeyBinder, realFontSize, vector, '0 0 0')
-       ATTRIB(XonoticKeyBinder, realUpperMargin, float, 0)
-       ATTRIB(XonoticKeyBinder, columnFunctionOrigin, float, 0)
-       ATTRIB(XonoticKeyBinder, columnFunctionSize, float, 0)
-       ATTRIB(XonoticKeyBinder, columnKeysOrigin, float, 0)
-       ATTRIB(XonoticKeyBinder, columnKeysSize, float, 0)
-
-       METHOD(XonoticKeyBinder, loadKeyBinds, void(entity));
-       ATTRIB(XonoticKeyBinder, previouslySelected, int, -1)
-       ATTRIB(XonoticKeyBinder, inMouseHandler, float, 0)
-       ATTRIB(XonoticKeyBinder, userbindEditButton, entity, NULL)
-       ATTRIB(XonoticKeyBinder, keyGrabButton, entity, NULL)
-       ATTRIB(XonoticKeyBinder, clearButton, entity, NULL)
-       ATTRIB(XonoticKeyBinder, userbindEditDialog, entity, NULL)
-       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
+
+#include <common/weapons/all.qh>
+.int flags;
+
+#include "button.qh"
+#include "dialog_settings_input_userbind.qh"
 
 const string KEY_NOT_BOUND_CMD = "// not bound";
 
@@ -478,4 +445,3 @@ void XonoticKeyBinder_drawListBoxItem(entity me, int i, vector absSize, bool isS
                draw_CenterText(me.realUpperMargin * eY + (me.columnKeysOrigin + 0.5 * me.columnKeysSize) * eX, s, me.realFontSize, theColor, theAlpha, 0);
        }
 }
-#endif