mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2025-12-18 22:02:34 +00:00
Added support for UI to have background_images, fixed TextBlock text overdrawing
This commit is contained in:
@@ -18,7 +18,14 @@ module CyberarmEngine
|
||||
end
|
||||
|
||||
def render
|
||||
@text.draw
|
||||
# Gosu.clip_to is too expensive to always use so check if we actually need it.
|
||||
if @text.width > width || @text.height > height
|
||||
Gosu.clip_to(@x, @y, width, height) do
|
||||
@text.draw
|
||||
end
|
||||
else
|
||||
@text.draw
|
||||
end
|
||||
end
|
||||
|
||||
def recalculate
|
||||
|
||||
Reference in New Issue
Block a user