mirror of
https://github.com/lihop/godot-xterm.git
synced 2024-11-22 09:40:25 +01:00
Add method get_cell_size()
This commit is contained in:
parent
685884965e
commit
6d112ca0f2
2 changed files with 6 additions and 0 deletions
|
@ -69,6 +69,7 @@ void Terminal::_bind_methods()
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("write", "data"), &Terminal::write);
|
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_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_gui_input", "event"), &Terminal::_gui_input);
|
||||||
ClassDB::bind_method(D_METHOD("_on_selection_held"), &Terminal::_on_selection_held);
|
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));
|
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)
|
void Terminal::set_max_scrollback(const int p_max_scrollback)
|
||||||
{
|
{
|
||||||
max_scrollback = std::max(0, p_max_scrollback);
|
max_scrollback = std::max(0, p_max_scrollback);
|
||||||
|
|
|
@ -57,6 +57,7 @@ namespace godot
|
||||||
int get_rows() const;
|
int get_rows() const;
|
||||||
|
|
||||||
Vector2i get_cursor_pos() const;
|
Vector2i get_cursor_pos() const;
|
||||||
|
Vector2 get_cell_size() const;
|
||||||
|
|
||||||
void set_max_scrollback(const int p_max_scrollback);
|
void set_max_scrollback(const int p_max_scrollback);
|
||||||
int get_max_scrollback() const;
|
int get_max_scrollback() const;
|
||||||
|
|
Loading…
Reference in a new issue