Fix/refactor menu and stretch mode
This commit is contained in:
parent
af1aa840ca
commit
3a23030e2c
3 changed files with 11 additions and 5 deletions
|
@ -23,7 +23,7 @@ Global="*res://src/global.gd"
|
|||
|
||||
window/size/viewport_width=640
|
||||
window/size/viewport_height=960
|
||||
window/stretch/mode="2d"
|
||||
window/stretch/mode="canvas_items"
|
||||
window/handheld/orientation="portrait"
|
||||
|
||||
[gui]
|
||||
|
|
12
src/menu.gd
12
src/menu.gd
|
@ -1,9 +1,13 @@
|
|||
extends Control
|
||||
|
||||
|
||||
@onready var quit_button: Button = %QuitButton
|
||||
@onready var credits: ColorRect = %Credits
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
if OS.get_name() == "HTML5":
|
||||
$C/V/V2/QuitButton.hide()
|
||||
if OS.has_feature("web"):
|
||||
quit_button.hide()
|
||||
|
||||
|
||||
func _on_DailyButton_pressed() -> void:
|
||||
|
@ -19,7 +23,7 @@ func _on_RandomButton_pressed() -> void:
|
|||
|
||||
|
||||
func _on_CreditsButton_pressed() -> void:
|
||||
$Credits.show()
|
||||
credits.show()
|
||||
|
||||
|
||||
func _on_QuitButton_pressed() -> void:
|
||||
|
@ -27,4 +31,4 @@ func _on_QuitButton_pressed() -> void:
|
|||
|
||||
|
||||
func _on_CreditsBackButton_pressed() -> void:
|
||||
$Credits.hide()
|
||||
credits.hide()
|
||||
|
|
|
@ -123,10 +123,12 @@ layout_mode = 2
|
|||
text = "Licenses"
|
||||
|
||||
[node name="QuitButton" type="Button" parent="C/V/V2"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Quit"
|
||||
|
||||
[node name="Credits" type="ColorRect" parent="."]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
anchor_right = 1.0
|
||||
|
|
Loading…
Reference in a new issue