#include "./modules/char.mod.hsp" #ifndef __KEYBOARD__ #define __KEYBOARD__ #module \ Keyboard #deffunc local \ Show showing = True text = "" Return #deffunc local \ Hide showing = False Return #deffunc local \ GetChar if showing = False { Return } MTList getChar_id If stat = 0 { touching = False Return } If touching { Return } MTInfo getChar_touchInfo, getChar_id.0 touching = True If Length (getChar_touchInfo) < 4 { Return } If getChar_touchInfo.2 < 1920 - 480 { Return } getChar_charId = (1080 - getChar_touchInfo.1) / 96 * 5 + (getChar_touchInfo.2 - (1920 - 480)) / 96 getChar_textLength = StrLen (text) Repeat 3 Poke text, getChar_textLength + cnt, Peek (charDict@Char, getChar_charId * 3 + cnt) Loop Return #deffunc local \ Draw If showing = False { Return } Color COLOUR_BLACK BoxF 0, 1920 - 480, 1080, 1920 Repeat 50 Pos 1080 - 96 * (cnt / 5 + 1), 1920 - 480 + 96 * (cnt \ 5) CelPut BUFFER_CHAR, cnt, 3, 3 Loop Return #global #endif ; not __KEYBOARD__