mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2026-03-22 12:06:13 +00:00
Added more triggers for repainting
This commit is contained in:
@@ -77,9 +77,13 @@ module CyberarmEngine
|
||||
def value=(decimal)
|
||||
raise "value must be number" unless decimal.is_a?(Numeric)
|
||||
|
||||
old_value = @fraction
|
||||
|
||||
@fraction = decimal.clamp(0.0, 1.0)
|
||||
update_background
|
||||
|
||||
root.gui_state.request_repaint if @fraction != old_value
|
||||
|
||||
publish(:changed, @fraction)
|
||||
@fraction
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user