mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-26 17:30:54 +00:00
Merge branch 'main' into custom-level-loading-rewrite
This commit is contained in:
@@ -19,4 +19,11 @@ func handle_inputs() -> void:
|
||||
if Input.is_action_just_pressed("ui_accept"):
|
||||
button_pressed.emit()
|
||||
if press_sfx != "":
|
||||
AudioManager.play_global_sfx(press_sfx)
|
||||
play_sfx()
|
||||
|
||||
func play_sfx(sfx := press_sfx) -> void:
|
||||
await get_tree().process_frame
|
||||
AudioManager.play_global_sfx(sfx)
|
||||
|
||||
func set_title(text := "") -> void:
|
||||
title = text
|
||||
|
||||
@@ -103,6 +103,7 @@ func value_changed(property, new_value) -> void:
|
||||
func close() -> void:
|
||||
hide()
|
||||
active = false
|
||||
if get_tree() == null: return
|
||||
await get_tree().create_timer(0.1).timeout
|
||||
closed.emit()
|
||||
for i in %Container.get_children():
|
||||
|
||||
@@ -56,11 +56,15 @@ func frame_limit_changed(new_value := 0) -> void:
|
||||
3: new_framerate = 144
|
||||
4: new_framerate = 240
|
||||
|
||||
Engine.max_fps = new_framerate
|
||||
Engine.set_max_fps(new_framerate)
|
||||
Settings.file.video.frame_limit = new_value
|
||||
|
||||
func set_window_size(value := []) -> void:
|
||||
get_window().size = Vector2(value[0], value[1])
|
||||
pass
|
||||
# nabbup: Recenter resized window on launch
|
||||
#var newpos = get_window().position - Vector2i((value[0]-get_window().size.x), (value[1]-get_window().size.y))/2
|
||||
#get_window().size = Vector2(value[0], value[1])
|
||||
#get_window().position = newpos
|
||||
|
||||
func set_value(value_name := "", value = null) -> void:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user