Added more triggers for repainting

This commit is contained in:
2023-01-04 20:17:49 -06:00
parent f82c0953b2
commit 186ad220cc
4 changed files with 13 additions and 1 deletions

View File

@@ -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