mirror of
https://github.com/HarmonyHoney/tiny_crate.git
synced 2026-01-23 02:34:53 +00:00
ease username on StartMenu, center username on UI
remove " " space from username Creator, replace with "!" exclamation mark keep pause menu open when starting a wipe close pause on wipe.finish signal
This commit is contained in:
parent
027ab41d68
commit
5b8c306b52
6 changed files with 34 additions and 19 deletions
|
|
@ -10,6 +10,13 @@ signal unpause
|
|||
onready var ghost_label := $Center/Control/Center/VBox/List/Label5
|
||||
var ghost_cursor := 0
|
||||
|
||||
func _ready():
|
||||
Wipe.connect("finish", self, "wipe_finish")
|
||||
|
||||
func wipe_finish():
|
||||
if is_paused:
|
||||
toggle_pause()
|
||||
|
||||
func _input(event):
|
||||
if !is_sub and clock == 0 and Shared.is_in_game and !Wipe.is_wipe:
|
||||
if event.is_action_pressed("ui_pause"):
|
||||
|
|
@ -50,7 +57,6 @@ func btn_yes():
|
|||
toggle_pause()
|
||||
1:
|
||||
Shared.wipe_scene()
|
||||
toggle_pause()
|
||||
Audio.play("menu_reset", 0.9, 1.1)
|
||||
2:
|
||||
scroll_ghost(1)
|
||||
|
|
@ -58,7 +64,6 @@ func btn_yes():
|
|||
open_sub(OptionsMenu)
|
||||
4:
|
||||
Shared.wipe_scene(Shared.level_select_path)
|
||||
toggle_pause()
|
||||
Audio.play("menu_exit", 0.9, 1.1)
|
||||
|
||||
func btn_x(arg := 0):
|
||||
|
|
|
|||
|
|
@ -483,7 +483,7 @@ func load_replays(_slot := save_slot):
|
|||
func generate_username():
|
||||
var u = ""
|
||||
var prefix = "crate box block square rect pack cube stack throw jump jumpin climb thinky brain spike skull pixel puzzle pico"
|
||||
var middle = [" ", "_", "-", "."]
|
||||
var middle = ["!", "_", "-", "."]
|
||||
var suffix = "kid dude dood pal friend bud buddy guy gal boy girl homie person human robot cyborg man woman cousin cuz head face butt fart arms legs body hands feet mind"
|
||||
var pf : Array = prefix.split(" ", false)
|
||||
var sf : Array = suffix.split(" ", false)
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ custom_fonts/font = SubResource( 3 )
|
|||
text = "unbind"
|
||||
|
||||
[node name="Top" type="HBoxContainer" parent="Center/Control"]
|
||||
margin_left = 5.0
|
||||
margin_left = 51.0
|
||||
margin_top = 5.0
|
||||
margin_right = 223.0
|
||||
margin_bottom = 17.0
|
||||
|
|
@ -226,17 +226,17 @@ custom_constants/separation = 2
|
|||
alignment = 2
|
||||
|
||||
[node name="Username" type="Label" parent="Center/Control/Top"]
|
||||
margin_left = 62.0
|
||||
margin_top = 3.0
|
||||
margin_right = 158.0
|
||||
margin_right = 112.0
|
||||
margin_bottom = 8.0
|
||||
size_flags_horizontal = 3
|
||||
custom_fonts/font = SubResource( 13 )
|
||||
text = "long_name1234567"
|
||||
align = 2
|
||||
align = 1
|
||||
|
||||
[node name="P" type="HBoxContainer" parent="Center/Control/Top"]
|
||||
margin_left = 160.0
|
||||
margin_right = 218.0
|
||||
margin_left = 114.0
|
||||
margin_right = 172.0
|
||||
margin_bottom = 12.0
|
||||
custom_constants/separation = 3
|
||||
|
||||
|
|
|
|||
|
|
@ -1291,7 +1291,7 @@ anchor_bottom = 1.0
|
|||
margin_left = 1.0
|
||||
margin_right = 1.0
|
||||
custom_fonts/font = SubResource( 14 )
|
||||
text = " "
|
||||
text = "!"
|
||||
align = 1
|
||||
valign = 1
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ var erase_items := ["really erase", "no erase"]
|
|||
|
||||
var menu_name := "main"
|
||||
var menu_last := menu_name
|
||||
var name_offset := 0
|
||||
|
||||
export var is_credits := false
|
||||
|
||||
|
|
@ -34,13 +35,22 @@ func _ready():
|
|||
|
||||
setup_slots()
|
||||
|
||||
user_label.text = Shared.username
|
||||
switch_menu(Shared.last_menu, true)
|
||||
self.cursor = Shared.last_cursor
|
||||
credits_node.visible = false
|
||||
user_label.text = Shared.username
|
||||
|
||||
open(true)
|
||||
|
||||
func menu_process(delta):
|
||||
.menu_process(delta)
|
||||
|
||||
if menu_name == "slot":
|
||||
user_label.rect_global_position = cursor_node.rect_global_position + cursor_node.rect_size + Vector2(2, -8)
|
||||
|
||||
if menu_name == "open":
|
||||
user_label.rect_global_position = user_label.rect_global_position.linear_interpolate(list[0].rect_global_position + Vector2((name_offset * 3) - 12, -8), 0.15)
|
||||
|
||||
func on_cursor():
|
||||
if menu_name == "slot":
|
||||
var s = ""
|
||||
|
|
@ -200,6 +210,7 @@ func switch_menu(arg, silent := false, _cursor := 0):
|
|||
Player.set_palette(demo_player_mat, Shared.player_colors)
|
||||
if menu_last == "erase":
|
||||
_cursor = 2
|
||||
name_offset = abs(min(user_label.text.length() - 10 , 0))
|
||||
"main":
|
||||
Shared.last_slot = -1
|
||||
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ font_data = ExtResource( 24 )
|
|||
1/shapes = [ ]
|
||||
1/z_index = 0
|
||||
|
||||
[sub_resource type="TileSet" id=24]
|
||||
[sub_resource type="TileSet" id=29]
|
||||
4/name = "bricks.png 4"
|
||||
4/texture = ExtResource( 18 )
|
||||
4/tex_offset = Vector2( 0, 0 )
|
||||
|
|
@ -486,6 +486,7 @@ valign = 1
|
|||
uppercase = true
|
||||
|
||||
[node name="Slot" type="VBoxContainer" parent="Control"]
|
||||
visible = false
|
||||
margin_left = 4.0
|
||||
margin_top = 29.0
|
||||
margin_right = 172.0
|
||||
|
|
@ -891,7 +892,6 @@ text = "96"
|
|||
uppercase = true
|
||||
|
||||
[node name="Open" type="VBoxContainer" parent="Control"]
|
||||
visible = false
|
||||
margin_left = 4.0
|
||||
margin_top = 32.0
|
||||
margin_right = 68.0
|
||||
|
|
@ -1082,7 +1082,7 @@ tile_data = PoolIntArray( 393222, 0, 0, 393223, 0, 1, 393224, 0, 0, 393225, 0, 1
|
|||
|
||||
[node name="DetailTileMap" parent="Stage" instance=ExtResource( 8 )]
|
||||
z_index = -11
|
||||
tile_set = SubResource( 24 )
|
||||
tile_set = SubResource( 29 )
|
||||
tile_data = PoolIntArray( 131093, 536870916, 3, 131094, 4, 1, 131095, 4, 0, 131096, 4, 3, 196624, 5, 2, 196625, 5, 0, 196626, -1610612731, 2, 196630, 536870916, 0, 196631, 4, 1, 196632, 4, 0, 262154, 536870916, 3, 262155, 536870916, 0, 262156, 4, 3, 262159, 5, 2, 262160, 5, 0, 262161, 5, 0, 262162, 5, 0, 262163, -1610612731, 2, 262166, 4, 1, 262167, 4, 0, 262168, 4, 1, 327685, 5, 2, 327686, 5, 0, 327687, 5, 0, 327688, 5, 0, 327689, 536870917, 2, 327690, 536870916, 0, 327691, 4, 1, 327692, 4, 0, 327695, -1610612731, 0, 327696, 5, 0, 327697, 5, 0, 327698, 5, 0, 327699, -1073741819, 0, 327701, 536870916, 3, 327702, 4, 0, 327703, 4, 1, 327704, 536870916, 2, 393221, -1073741819, 0, 393227, 4, 1, 393228, 4, 0, 393229, 4, 3, 393231, -1073741819, 2, 393232, 5, 0, 393233, 5, 0, 393234, 5, 0, 393235, -536870907, 2, 393237, 536870916, 0, 393238, 4, 1, 393239, 536870916, 0, 458757, -1073741819, 2, 458759, -1610612731, 2, 458762, 4, 1, 458763, 536870916, 0, 458764, 4, 1, 458765, 4, 0, 458768, -1073741819, 2, 458769, 5, 0, 458770, 1610612741, 2, 458773, 4, 2, 458774, 4, 0, 458775, 4, 1, 458776, 4, 3, 524295, -1610612731, 0, 524298, 4, 2, 524299, 4, 1, 524300, 536870916, 0, 524301, 4, 1, 524302, 4, 3, 524305, 6, 0, 524310, 4, 2, 524311, 536870916, 0, 524312, 536870916, 2, 589831, -1610612730, 0, 589832, -1610612731, 0, 589836, 4, 2, 589837, 4, 1, 589838, 4, 0, 589839, 4, 3, 589841, 6, 0, 589842, -536870907, 2, 655367, -1610612731, 0, 655373, 536870916, 3, 655374, 4, 1, 655375, 536870916, 0, 655377, 6, 0, 720901, -2147483643, 2, 720903, -536870907, 2, 720905, 5, 2, 720906, 5, 0, 720907, 5, 0, 720908, 536870917, 2, 720909, 536870916, 3, 720910, 536870916, 0, 720911, 536870916, 2, 720912, 5, 2, 720913, 6, 0, 720914, 5, 0, 720915, 536870917, 2, 720917, 5, 2, 720918, 5, 0, 720919, 536870917, 2, 786437, -2147483643, 0, 786441, -1073741819, 0, 786455, -1610612731, 0, 851973, -1073741819, 2, 851974, 1610612741, 2, 851977, 1073741829, 2, 851978, 5, 0, 851979, 1610612741, 2, 851982, 4, 1, 851983, 4, 0, 851987, 1073741829, 2, 851988, 5, 0, 851989, 6, 0, 851990, 5, 0, 851991, -536870907, 2, 917517, 536870916, 0, 917518, 4, 1, 917519, 536870916, 2, 917525, 1610612741, 2, 983053, 4, 2, 983054, 4, 0, 983055, 536870916, 2 )
|
||||
|
||||
[node name="GameCamera" parent="Stage" instance=ExtResource( 13 )]
|
||||
|
|
@ -1176,12 +1176,11 @@ align = 2
|
|||
z_index = 500
|
||||
|
||||
[node name="Label" type="Label" parent="Username"]
|
||||
margin_left = 44.0
|
||||
margin_top = 40.0
|
||||
margin_right = 190.0
|
||||
margin_bottom = 45.0
|
||||
margin_left = -20.0
|
||||
margin_top = 49.0
|
||||
margin_right = 126.0
|
||||
margin_bottom = 54.0
|
||||
custom_fonts/font = SubResource( 28 )
|
||||
text = "long_name1234567"
|
||||
align = 2
|
||||
|
||||
[editable path="Stage/GameCamera"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue