mirror of
https://github.com/lihop/godot-xterm.git
synced 2024-11-13 22:10:25 +01:00
Position background rect at 0,0
This is important when terminal is a child of a Container node and we set the margin properties, otherwise the background rect is drawn with an offset.
This commit is contained in:
parent
fd39635fc5
commit
e68d2f55c9
2 changed files with 3 additions and 2 deletions
|
@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
### Changed
|
### Changed
|
||||||
- Updated build script (`addons/godot_xterm/native/build.sh`). Git submodules will now be initialized if they haven't already. Moved nix-shell related stuff to a seperate shell.nix file so the same build command can be used on all Linux based OSes.
|
- Updated build script (`addons/godot_xterm/native/build.sh`). Git submodules will now be initialized if they haven't already. Moved nix-shell related stuff to a seperate shell.nix file so the same build command can be used on all Linux based OSes.
|
||||||
|
- Positioned background rect at 0,0 so it is no longer offset if a margin is added when Terminal is a child of a Container node.
|
||||||
|
|
||||||
## [1.0.0] - 2020-10-05
|
## [1.0.0] - 2020-10-05
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -371,7 +371,7 @@ void Terminal::_draw()
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Draw the full terminal rect background */
|
/* Draw the full terminal rect background */
|
||||||
draw_rect(get_rect(), get_color("Background", "Terminal"));
|
draw_rect(Rect2(Vector2(0, 0), get_rect().size), get_color("Background", "Terminal"));
|
||||||
|
|
||||||
for (int row = 0; row < rows; row++)
|
for (int row = 0; row < rows; row++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue