Skip to content

Commit

Permalink
Hide newsfeed if window becomes too narrow
Browse files Browse the repository at this point in the history
  • Loading branch information
noidexe committed Jun 8, 2022
1 parent 0b9b7fa commit 98566e7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scenes/NewsFeed.gd
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ onready var feed_vbox = $"Feed"
onready var loading_text = $"Feed/Loading"

func _ready():
get_tree().connect("screen_resized", self, "_on_screen_resized")
_refresh_news()


Expand Down Expand Up @@ -133,3 +134,7 @@ func _parse_news_item(buffer, begin_ofs, end_ofs):

# Return the dictionary with the news entry once we are done
return parsed_item

func _on_screen_resized():
visible = get_viewport_rect().size.x > 1046

0 comments on commit 98566e7

Please sign in to comment.