lib/cyberarm_engine/window.rb in cyberarm_engine-0.22.0 vs lib/cyberarm_engine/window.rb in cyberarm_engine-0.23.0

- old
+ new

@@ -39,10 +39,11 @@ @current_frame_time = Gosu.milliseconds self.caption = "CyberarmEngine #{CyberarmEngine::VERSION} #{Gosu.language}" @states = [] @exit_on_opengl_error = false + preload_default_shaders if respond_to?(:preload_default_shaders) setup if defined?(setup) end def draw @@ -139,13 +140,17 @@ @states.last end def pop_state @states.pop + + current_state.request_repaint if current_state&.is_a?(GuiState) end def shift_state @states.shift + + current_state.request_repaint if current_state&.is_a?(GuiState) end def has_focus? @has_focus end