From f29330cd089f7c8939b49ec3be59669189ce3787 Mon Sep 17 00:00:00 2001 From: Cyberarm Date: Tue, 28 Nov 2023 11:54:15 -0600 Subject: [PATCH] Fixed display of events- events that have ended will not be displayed, and the event container now takes the full width --- lib/pages/games.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/pages/games.rb b/lib/pages/games.rb index 287052d..61f135b 100644 --- a/lib/pages/games.rb +++ b/lib/pages/games.rb @@ -484,12 +484,14 @@ class W3DHub return unless @focused_game == game if (events = @game_events[game.id]) + events = events.select { |e| e.end_time > Time.now.utc } + @game_events_container.show unless events.empty? @game_events_container.hide if events.empty? @game_events_container.clear do events.flatten.each do |event| - stack(width: 300, height: 1.0, margin_left: 8, margin_right: 8, border_thickness: 1, border_color: lighten(Gosu::Color.new(game.color))) do + stack(width: 1.0, height: 1.0, margin_left: 8, margin_right: 8, border_thickness: 1, border_color: lighten(Gosu::Color.new(game.color))) do background 0xaa_222222 title event.title, width: 1.0, text_align: :center