mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 07:28:14 +00:00
New frame limit
This commit is contained in:
@@ -257,7 +257,7 @@ size_flags_vertical = 3
|
||||
theme_override_constants/separation = -4
|
||||
script = ExtResource("4_avtty")
|
||||
category_name = "SETTINGS_VIDEO"
|
||||
options = [NodePath("Language"), NodePath("WindowMode"), NodePath("Size"), NodePath("Visuals"), NodePath("Scaling"), NodePath("VSync"), NodePath("DropShadows"), NodePath("HudStyle")]
|
||||
options = [NodePath("Language"), NodePath("WindowMode"), NodePath("Size"), NodePath("Visuals"), NodePath("Scaling"), NodePath("VSync"), NodePath("DropShadows"), NodePath("HudStyle"), NodePath("FrameLimit")]
|
||||
|
||||
[node name="Control" type="Control" parent="PanelContainer/MarginContainer/VBoxContainer/Video"]
|
||||
custom_minimum_size = Vector2(0, 4)
|
||||
@@ -321,6 +321,13 @@ option_key = "hud_scaling"
|
||||
title = "VIDEO_HUD_SCALING"
|
||||
values = ["VIDEO_HUD_STRETCHED", "VIDEO_HUD_CENTER"]
|
||||
|
||||
[node name="FrameLimit" parent="PanelContainer/MarginContainer/VBoxContainer/Video" instance=ExtResource("3_dl6kk")]
|
||||
layout_mode = 2
|
||||
option_key = "frame_limit"
|
||||
title = "Frame_Limit"
|
||||
value_descs = Array[String](["Unlimited", "60fps", "120fps", "144fps", "240fps"])
|
||||
values = [0, 60, 120, 144, 240]
|
||||
|
||||
[node name="WindowChanger" type="Node" parent="PanelContainer/MarginContainer/VBoxContainer/Video"]
|
||||
script = ExtResource("5_hnwhb")
|
||||
|
||||
|
@@ -8,7 +8,8 @@ var file := {
|
||||
"drop_shadows": 1,
|
||||
"scaling": 0,
|
||||
"visuals": 0,
|
||||
"hud_size": 0
|
||||
"hud_size": 0,
|
||||
"frame_limit" : 0,
|
||||
},
|
||||
"audio": {
|
||||
"master": 10.0,
|
||||
|
@@ -44,6 +44,10 @@ func language_changed(new_value := 0) -> void:
|
||||
Settings.file.game.lang = Global.lang_codes[new_value]
|
||||
%Flag.region_rect.position.x = new_value * 16
|
||||
|
||||
func frame_limit_changed(new_value := 0) -> void:
|
||||
Engine.max_fps = new_value
|
||||
Settings.file.video.frame_limit = new_value
|
||||
|
||||
func set_value(value_name := "", value := 0) -> void:
|
||||
{
|
||||
"mode": window_mode_changed,
|
||||
@@ -54,5 +58,6 @@ func set_value(value_name := "", value := 0) -> void:
|
||||
"visuals": visuals_changed,
|
||||
"palette": null_function,
|
||||
"hud_size": hud_style_changed,
|
||||
"hud_style": hud_style_changed
|
||||
"hud_style": hud_style_changed,
|
||||
"frame_limit": frame_limit_changed,
|
||||
}[value_name].call(value)
|
||||
|
Reference in New Issue
Block a user