diff --git a/addons/godot_xterm/native/src/terminal.cpp b/addons/godot_xterm/native/src/terminal.cpp index 9f29a2a..8b01291 100644 --- a/addons/godot_xterm/native/src/terminal.cpp +++ b/addons/godot_xterm/native/src/terminal.cpp @@ -69,6 +69,7 @@ void Terminal::_bind_methods() ClassDB::bind_method(D_METHOD("write", "data"), &Terminal::write); ClassDB::bind_method(D_METHOD("get_cursor_pos"), &Terminal::get_cursor_pos); + ClassDB::bind_method(D_METHOD("get_cell_size"), &Terminal::get_cell_size); ClassDB::bind_method(D_METHOD("_on_gui_input", "event"), &Terminal::_gui_input); ClassDB::bind_method(D_METHOD("_on_selection_held"), &Terminal::_on_selection_held); } @@ -137,6 +138,10 @@ Vector2i Terminal::get_cursor_pos() const { return Vector2i(tsm_screen_get_cursor_x(screen), tsm_screen_get_cursor_y(screen)); } +Vector2 Terminal::get_cell_size() const { + return cell_size; +} + void Terminal::set_max_scrollback(const int p_max_scrollback) { max_scrollback = std::max(0, p_max_scrollback); diff --git a/addons/godot_xterm/native/src/terminal.h b/addons/godot_xterm/native/src/terminal.h index 5eede9b..42152f9 100644 --- a/addons/godot_xterm/native/src/terminal.h +++ b/addons/godot_xterm/native/src/terminal.h @@ -57,6 +57,7 @@ namespace godot int get_rows() const; Vector2i get_cursor_pos() const; + Vector2 get_cell_size() const; void set_max_scrollback(const int p_max_scrollback); int get_max_scrollback() const;