mirror of
https://github.com/lihop/godot-xterm.git
synced 2024-11-22 01:30:25 +01:00
Move other constants to constants file
This commit is contained in:
parent
0a1ba5abcd
commit
580760ffad
2 changed files with 13 additions and 11 deletions
|
@ -7,6 +7,16 @@
|
||||||
|
|
||||||
using namespace godot;
|
using namespace godot;
|
||||||
|
|
||||||
|
const char* Terminal::COLOR_NAMES[18] = {
|
||||||
|
"ansi_0_color", "ansi_1_color", "ansi_2_color", "ansi_3_color", "ansi_4_color", "ansi_5_color", "ansi_6_color", "ansi_7_color",
|
||||||
|
"ansi_8_color", "ansi_9_color", "ansi_10_color", "ansi_11_color", "ansi_12_color", "ansi_13_color", "ansi_14_color", "ansi_15_color",
|
||||||
|
"foreground_color", "background_color",
|
||||||
|
};
|
||||||
|
|
||||||
|
const char* Terminal::FONT_TYPES[4] = {
|
||||||
|
"normal_font", "bold_font", "italics_font", "bold_italics_font",
|
||||||
|
};
|
||||||
|
|
||||||
const Terminal::KeyMap Terminal::KEY_MAP = {
|
const Terminal::KeyMap Terminal::KEY_MAP = {
|
||||||
// Godot does not have seperate scancodes for keypad keys when NumLock is
|
// Godot does not have seperate scancodes for keypad keys when NumLock is
|
||||||
// off. We can check the unicode value to determine whether it is off and
|
// off. We can check the unicode value to determine whether it is off and
|
||||||
|
|
|
@ -20,15 +20,7 @@ namespace godot
|
||||||
GDCLASS(Terminal, Control)
|
GDCLASS(Terminal, Control)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static constexpr const char *COLOR_NAMES[] = {
|
typedef std::map<std::pair<Key, char32_t>, uint32_t> KeyMap;
|
||||||
"ansi_0_color", "ansi_1_color", "ansi_2_color", "ansi_3_color", "ansi_4_color", "ansi_5_color", "ansi_6_color", "ansi_7_color",
|
|
||||||
"ansi_8_color", "ansi_9_color", "ansi_10_color", "ansi_11_color", "ansi_12_color", "ansi_13_color", "ansi_14_color", "ansi_15_color",
|
|
||||||
"foreground_color", "background_color",
|
|
||||||
};
|
|
||||||
|
|
||||||
static constexpr const char *FONT_TYPES[] = {
|
|
||||||
"normal_font", "bold_font", "italics_font", "bold_italics_font",
|
|
||||||
};
|
|
||||||
|
|
||||||
enum FontType {
|
enum FontType {
|
||||||
NORMAL,
|
NORMAL,
|
||||||
|
@ -37,8 +29,8 @@ namespace godot
|
||||||
BOLD_ITALICS,
|
BOLD_ITALICS,
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::map<std::pair<Key, char32_t>, uint32_t> KeyMap;
|
static const char *COLOR_NAMES[18];
|
||||||
|
static const char *FONT_TYPES[4];
|
||||||
static const KeyMap KEY_MAP;
|
static const KeyMap KEY_MAP;
|
||||||
public:
|
public:
|
||||||
enum AttrFlag
|
enum AttrFlag
|
||||||
|
|
Loading…
Reference in a new issue