mirror of
https://github.com/lihop/godot-xterm.git
synced 2025-07-05 13:15:32 +02:00
Get KeyList constants from GDNative API
Previously KeyList constants came from the GlobalConstants.hpp header, but this did not work when compiling for HTML5. Therefore, we now get the globals constants from the GDNative API. Throws the error: `LNK2019: unresolved external symbol godot_get_global_constants referenced in function "private: static void __cdecl godot::Terminal::_populate_key_list(void)" (?_populate_key_list@Terminal@godot@@CAXXZ)` in GitHub Windows action. So use the old technique on Windows for now. This is a prerequisite for HTML5 support.
This commit is contained in:
parent
6e455738b8
commit
fbb23661d3
2 changed files with 200 additions and 160 deletions
|
@ -34,7 +34,10 @@ protected:
|
|||
|
||||
private:
|
||||
static const uint8_t default_color_palette[TSM_COLOR_NUM][3];
|
||||
static const std::map<std::pair<int64_t, int64_t>, uint32_t> keymap;
|
||||
|
||||
static std::map<std::pair<int64_t, int64_t>, int> _key_list;
|
||||
static void _populate_key_list();
|
||||
static uint32_t mapkey(std::pair<int64_t, int64_t> key);
|
||||
|
||||
Vector2 cell_size;
|
||||
std::map<int, Color> palette = {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue