mirror of
https://github.com/lihop/godot-xterm.git
synced 2025-07-05 13:15:32 +02:00
Add support for two different inverse modes
- Inverse mode invert (default) will invert the color in shader. - Inverse mode swap will simply swap the foreground and background colors. This is the default behavior of libtsm and GodotXterm v3.
This commit is contained in:
parent
930f3ef352
commit
8c30bec861
3 changed files with 41 additions and 1 deletions
|
@ -34,6 +34,11 @@ namespace godot
|
|||
BLINK = 1 << 1,
|
||||
};
|
||||
|
||||
enum InverseMode {
|
||||
INVERSE_MODE_INVERT,
|
||||
INVERSE_MODE_SWAP,
|
||||
};
|
||||
|
||||
Terminal();
|
||||
~Terminal();
|
||||
|
||||
|
@ -52,6 +57,9 @@ namespace godot
|
|||
void set_blink_off_time(const float p_blink_off_time);
|
||||
float get_blink_off_time() const;
|
||||
|
||||
void set_inverse_mode(const int mode);
|
||||
int get_inverse_mode() const;
|
||||
|
||||
void write(Variant data);
|
||||
|
||||
protected:
|
||||
|
@ -66,6 +74,8 @@ namespace godot
|
|||
float blink_on_time;
|
||||
float blink_off_time;
|
||||
|
||||
InverseMode inverse_mode;
|
||||
|
||||
RenderingServer *rs;
|
||||
|
||||
tsm_screen *screen;
|
||||
|
@ -118,3 +128,5 @@ namespace godot
|
|||
};
|
||||
|
||||
} // namespace godot
|
||||
|
||||
VARIANT_ENUM_CAST(Terminal::InverseMode);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue