resize taquin to 2/3rd of the window
This commit is contained in:
parent
dc520e33f6
commit
45fd683168
|
@ -4,6 +4,7 @@ onready var container = $GridContainer
|
||||||
onready var taquin = $GridContainer/Taquin
|
onready var taquin = $GridContainer/Taquin
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
|
taquin.rect_min_size = get_viewport().get_visible_rect().size * (2.0 / 3.0)
|
||||||
layout_reflow()
|
layout_reflow()
|
||||||
load_game()
|
load_game()
|
||||||
print("Starting state: ", taquin.current_state_name())
|
print("Starting state: ", taquin.current_state_name())
|
||||||
|
@ -27,6 +28,7 @@ func layout_reflow():
|
||||||
else:
|
else:
|
||||||
# landscape
|
# landscape
|
||||||
container.columns = 2
|
container.columns = 2
|
||||||
|
update()
|
||||||
|
|
||||||
# https://docs.godotengine.org/en/3.2/tutorials/io/saving_games.html
|
# https://docs.godotengine.org/en/3.2/tutorials/io/saving_games.html
|
||||||
func save_game():
|
func save_game():
|
||||||
|
|
|
@ -32,6 +32,8 @@ margin_right = -20.0
|
||||||
margin_bottom = -20.0
|
margin_bottom = -20.0
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
|
custom_constants/vseparation = 10
|
||||||
|
custom_constants/hseparation = 10
|
||||||
columns = 2
|
columns = 2
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
|
@ -46,7 +48,7 @@ margin_right = 540.0
|
||||||
margin_bottom = 560.0
|
margin_bottom = 560.0
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="GridContainer"]
|
[node name="VBoxContainer" type="VBoxContainer" parent="GridContainer"]
|
||||||
margin_left = 548.0
|
margin_left = 550.0
|
||||||
margin_right = 984.0
|
margin_right = 984.0
|
||||||
margin_bottom = 560.0
|
margin_bottom = 560.0
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
|
@ -57,7 +59,7 @@ alignment = 1
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_top = 206.0
|
margin_top = 206.0
|
||||||
margin_right = 436.0
|
margin_right = 434.0
|
||||||
margin_bottom = 276.0
|
margin_bottom = 276.0
|
||||||
rect_min_size = Vector2( 0, 70 )
|
rect_min_size = Vector2( 0, 70 )
|
||||||
text = "New Game"
|
text = "New Game"
|
||||||
|
@ -66,7 +68,7 @@ text = "New Game"
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_top = 284.0
|
margin_top = 284.0
|
||||||
margin_right = 436.0
|
margin_right = 434.0
|
||||||
margin_bottom = 354.0
|
margin_bottom = 354.0
|
||||||
rect_min_size = Vector2( 0, 70 )
|
rect_min_size = Vector2( 0, 70 )
|
||||||
text = "Hints"
|
text = "Hints"
|
||||||
|
|
Loading…
Reference in a new issue