X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fcharmap.qc;h=28f67d9f5b5bd1f163f10589a754b773c1720e81;hb=c9347b663acd739a4b44c420910f371fa1d0ed5c;hp=1b0881dc5663f0379adafaa1eb99173106f23d8a;hpb=c67e77ba36fb8dd44b39722e41943b6671b549ff;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/xonotic/charmap.qc b/qcsrc/menu/xonotic/charmap.qc index 1b0881dc5..28f67d9f5 100644 --- a/qcsrc/menu/xonotic/charmap.qc +++ b/qcsrc/menu/xonotic/charmap.qc @@ -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)); - ATTRIB(XonoticCharmap, charOffset, vector, '0 0 0') -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