Added support for Label text alignement, improved EditBox to correctly position caret and support mouse caret positioning, added debugging Container boundry (WIP)

This commit is contained in:
2020-09-09 09:51:18 -05:00
parent b06ceaabce
commit 695c77b183
4 changed files with 81 additions and 23 deletions

View File

@@ -48,6 +48,31 @@ module CyberarmEngine
Gosu.clip_to(@x, @y, width, height) do
@children.each(&:draw)
end
if false#DEBUG
Gosu.flush
Gosu.draw_line(
self.x, self.y, Gosu::Color::RED,
self.x + outer_width, self.y, Gosu::Color::RED,
Float::INFINITY
)
Gosu.draw_line(
self.x + outer_width, self.y, Gosu::Color::RED,
self.x + outer_width, self.y + outer_height, Gosu::Color::RED,
Float::INFINITY
)
Gosu.draw_line(
self.x + outer_width, self.y + outer_height, Gosu::Color::RED,
self.x, self.y + outer_height, Gosu::Color::RED,
Float::INFINITY
)
Gosu.draw_line(
self.x, outer_height, Gosu::Color::RED,
self.x, self.y, Gosu::Color::RED,
Float::INFINITY
)
end
end
def update