resize taquin to 2/3rd of the window

master
Fabien Freling 2020-06-04 16:29:32 +02:00
parent dc520e33f6
commit 45fd683168
2 changed files with 7 additions and 3 deletions

View File

@ -4,6 +4,7 @@ onready var container = $GridContainer
onready var taquin = $GridContainer/Taquin
func _ready():
taquin.rect_min_size = get_viewport().get_visible_rect().size * (2.0 / 3.0)
layout_reflow()
load_game()
print("Starting state: ", taquin.current_state_name())
@ -27,6 +28,7 @@ func layout_reflow():
else:
# landscape
container.columns = 2
update()
# https://docs.godotengine.org/en/3.2/tutorials/io/saving_games.html
func save_game():

View File

@ -32,6 +32,8 @@ margin_right = -20.0
margin_bottom = -20.0
size_flags_horizontal = 3
size_flags_vertical = 3
custom_constants/vseparation = 10
custom_constants/hseparation = 10
columns = 2
__meta__ = {
"_edit_use_anchors_": false
@ -46,7 +48,7 @@ margin_right = 540.0
margin_bottom = 560.0
[node name="VBoxContainer" type="VBoxContainer" parent="GridContainer"]
margin_left = 548.0
margin_left = 550.0
margin_right = 984.0
margin_bottom = 560.0
size_flags_horizontal = 3
@ -57,7 +59,7 @@ alignment = 1
anchor_right = 0.0
anchor_bottom = 0.0
margin_top = 206.0
margin_right = 436.0
margin_right = 434.0
margin_bottom = 276.0
rect_min_size = Vector2( 0, 70 )
text = "New Game"
@ -66,7 +68,7 @@ text = "New Game"
anchor_right = 0.0
anchor_bottom = 0.0
margin_top = 284.0
margin_right = 436.0
margin_right = 434.0
margin_bottom = 354.0
rect_min_size = Vector2( 0, 70 )
text = "Hints"