]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/charmap.qc
Merge branch 'Mario/gametypes' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / charmap.qc
index 747d1f03b4568a4a820bdc35cedb170b67570a19..28f67d9f5b5bd1f163f10589a754b773c1720e81 100644 (file)
@@ -1,26 +1,6 @@
-#ifndef CHARMAP_H
-#define CHARMAP_H
-#include "picker.qc"
-CLASS(XonoticCharmap, XonoticPicker)
-       METHOD(XonoticCharmap, configureXonoticCharmap, void(entity, entity))
-       METHOD(XonoticCharmap, focusLeave, void(entity))
-       METHOD(XonoticCharmap, resizeNotify, void(entity, vector, vector, vector, vector))
-       METHOD(XonoticCharmap, keyDown, float(entity, float, float, float))
-       ATTRIB(XonoticCharmap, inputBox, entity, NULL)
-       ATTRIB(XonoticCharmap, realFontSize, vector, '0 0 0')
-
-       ATTRIB(XonoticCharmap, rows, float, 10)
-       ATTRIB(XonoticCharmap, columns, float, 14)
-
-       METHOD(XonoticCharmap, cellSelect, void(entity, vector))
-       METHOD(XonoticCharmap, cellIsValid, bool(entity, vector))
-       METHOD(XonoticCharmap, cellDraw, void(entity, vector, vector))
-       METHOD(XonoticCharmap, charOffset, vector)
-ENDCLASS(XonoticCharmap)
-entity makeXonoticCharmap(entity controlledInputBox);
-#endif
-
-#ifdef IMPLEMENTATION
+#include "charmap.qh"
+
+#include "inputbox.qh"
 
 string CHARMAP =
        "★◆■▮▰▬◣◤◥◢◀▲▶▼"
@@ -98,7 +78,11 @@ void XonoticCharmap_cellSelect(entity me, vector cell)
 {
        string character = charmap_cellToChar(me, cell);
        if(character != "")
+       {
                me.inputBox.enterText(me.inputBox, character);
+               if(me.inputBox.applyButton)
+                       me.inputBox.applyButton.disabled = false;
+       }
 }
 
 bool XonoticCharmap_cellIsValid(entity me, vector cell)
@@ -117,4 +101,3 @@ void XonoticCharmap_focusLeave(entity me)
 {
        me.inputBox.saveCvars(me.inputBox);
 }
-#endif