Remove no longer needed clipboard and ffi gems, use new CyberarmEngine::GuiState#needs_repaint? method to only paint when needed- should avoid wasting CPU/GPU time (gain a bit more battery life?), make TACNET connection error visually change UI and also trigger a TACNET dialog when not on the TACNET page

This commit is contained in:
2023-01-05 08:42:29 -06:00
parent cce1c2c341
commit 451568003a
5 changed files with 44 additions and 16 deletions

View File

@@ -11,6 +11,8 @@ module TAC
if ARGV.join.include?("--game-clock-remote-display")
push_state(PracticeGameClock::View, remote_control_mode: true)
elsif ARGV.join.include?("--intro")
push_state(CyberarmEngine::IntroState, forward: TAC::States::Boot)
else
push_state(TAC::States::Boot)
end
@@ -29,6 +31,14 @@ module TAC
@notification_manager.update
end
def needs_redraw?
if current_state.is_a?(Editor)
current_state.needs_repaint? || @notification_manager.instance_variable_get(:@drivers).size.positive?
else
true
end
end
def toast(title, message = nil)
@notification_manager.create_notification(
priority: GosuNotifications::Notification::PRIORITY_HIGH,