Skip to content

Commit

Permalink
Merge pull request #728 from NotArme/fix-splashscreen-position
Browse files Browse the repository at this point in the history
Fix splashscreen position
  • Loading branch information
RodZill4 authored Nov 30, 2024
2 parents 5338bdf + c09fee4 commit dae9238
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion splash_screen/splash_screen.gd
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ func _enter_tree():
screen = randi() % BACKGROUNDS.size()
set_screen(screen)
var window : Window = get_window()
window.position = (DisplayServer.screen_get_size(window.current_screen)-Vector2i(size))/2
var current_screen_index = window.current_screen
window.position = (DisplayServer.screen_get_size(current_screen_index)-Vector2i(size))/2 + DisplayServer.screen_get_position(current_screen_index)
window.size = size

func set_screen(bi : int) -> void:
Expand Down

0 comments on commit dae9238

Please sign in to comment.