From dbc87c968583be61ac7667c3474be714bd2249e8 Mon Sep 17 00:00:00 2001 From: Harmony Honey Date: Fri, 24 Sep 2021 18:50:49 -0400 Subject: [PATCH] X or B on xbox controller is lift A or Y is jump Pause menu fix, ESC works again, DevConsole interference. Cursor is now hidden in fullscreen mode! crate icon.png and icon.ico --- media/image/icon.ico | Bin 0 -> 894 bytes media/image/icon.png | Bin 0 -> 153 bytes project.godot | 12 ++++++++---- src/actor/Exit.tscn | 1 - src/actor/Player.tscn | 2 +- src/autoload/DevConsole.gd | 15 ++++++--------- src/menu/OptionsMenu.tscn | 8 ++++++-- 7 files changed, 21 insertions(+), 17 deletions(-) create mode 100644 media/image/icon.ico create mode 100644 media/image/icon.png diff --git a/media/image/icon.ico b/media/image/icon.ico new file mode 100644 index 0000000000000000000000000000000000000000..9b4c2286696454bcff7ab97b19a6d1623c7271f1 GIT binary patch literal 894 zcmZQzU<5(|0R|u`!H~hsz#zuJz@P!dKp_SNAO?wp07woUm<6q-8)8`eA1lJ;0IZ6E zf|%+dDk0*?x{yVXb&;nYSr@X&Lq!~yn{m0Hc=ebnA!cHl3{gp*dSt!SVx#8=QuzR` Cn_fr& literal 0 HcmV?d00001 diff --git a/media/image/icon.png b/media/image/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..c99ecc21cece854b8b6254e02d9ff1bf7ff932cb GIT binary patch literal 153 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|f<0XvLo9le zV`Njl&2MBn;L@4K1_WXyjS~(8SD3De%y&~3KakUQv*DdkNuk92vc!gW;W3HM8@bu; xG4vQHn2D`;#^m;8k3oT^;B?*=hNF5642ehNdjr#U<^qjp@O1TaS?83{1OS_qFJJ%w literal 0 HcmV?d00001 diff --git a/project.godot b/project.godot index e8a86e9..f7ee086 100644 --- a/project.godot +++ b/project.godot @@ -74,9 +74,12 @@ _global_script_class_icons={ [application] -config/name="gdBox" +config/name="Tiny Crate" +config/description="a game by Harmony Honey +HarmonyHunnie.com" run/main_scene="res://src/menu/StartMenu.tscn" -config/icon="res://icon.png" +config/icon="res://media/image/icon.png" +config/windows_native_icon="res://media/image/icon.ico" [autoload] @@ -91,8 +94,6 @@ Music="*res://src/autoload/Music.tscn" window/size/width=228 window/size/height=128 -window/size/test_width=1368 -window/size/test_height=768 window/dpi/allow_hidpi=true window/stretch/mode="viewport" window/stretch/aspect="keep" @@ -163,6 +164,7 @@ jump={ "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":88,"unicode":0,"echo":false,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null) , Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":75,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":3,"pressure":0.0,"pressed":false,"script":null) ] } action={ @@ -170,6 +172,7 @@ action={ "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":67,"unicode":0,"echo":false,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":2,"pressure":0.0,"pressed":false,"script":null) , Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":74,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":1,"pressure":0.0,"pressed":false,"script":null) ] } reset={ @@ -202,6 +205,7 @@ pause={ "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"unicode":0,"echo":false,"script":null) , Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777221,"unicode":0,"echo":false,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":11,"pressure":0.0,"pressed":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":10,"pressure":0.0,"pressed":false,"script":null) ] } screenshot={ diff --git a/src/actor/Exit.tscn b/src/actor/Exit.tscn index 15fa5e1..3b0fd9b 100644 --- a/src/actor/Exit.tscn +++ b/src/actor/Exit.tscn @@ -6,7 +6,6 @@ [ext_resource path="res://media/image/star.png" type="Texture" id=4] [ext_resource path="res://src/actor/ExitStar.gd" type="Script" id=5] - [sub_resource type="Animation" id=1] length = 1.6 loop = true diff --git a/src/actor/Player.tscn b/src/actor/Player.tscn index 1f71f57..39d1d38 100644 --- a/src/actor/Player.tscn +++ b/src/actor/Player.tscn @@ -178,7 +178,7 @@ tracks/1/keys = { "player", "solid", ]] -z_index = 5 +z_index = 15 z_as_relative = false script = ExtResource( 1 ) is_moving = true diff --git a/src/autoload/DevConsole.gd b/src/autoload/DevConsole.gd index 4a0624c..7494b1d 100644 --- a/src/autoload/DevConsole.gd +++ b/src/autoload/DevConsole.gd @@ -16,16 +16,13 @@ func _ready(): out("untitled project by Harmony Honey") out("developer console initialized") -func _process(delta): - if btn.p("dev_console"): - close() if is_open else open() - - if btn.p("ui_cancel"): - close() - func _input(event): - if is_open: - if event is InputEventKey and event.pressed: + if Input.is_action_just_pressed("dev_console"): + close() if is_open else open() + elif is_open: + if Input.is_action_just_pressed("ui_cancel"): + close() + elif event is InputEventKey and event.pressed: if node_input.has_focus(): # press up if event.scancode == KEY_UP: diff --git a/src/menu/OptionsMenu.tscn b/src/menu/OptionsMenu.tscn index 69578ae..c02665a 100644 --- a/src/menu/OptionsMenu.tscn +++ b/src/menu/OptionsMenu.tscn @@ -98,6 +98,10 @@ func act(): OS.window_fullscreen = !OS.window_fullscreen Shared.set_window_scale() fill.visible = OS.window_fullscreen + if OS.window_fullscreen: + Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN) + else: + Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) $AudioStreamPlayer.play() " @@ -220,9 +224,9 @@ __meta__ = { [node name="Header" type="Label" parent="."] margin_left = 14.0 -margin_top = 4.0 +margin_top = 7.0 margin_right = 242.0 -margin_bottom = 17.0 +margin_bottom = 20.0 custom_fonts/font = SubResource( 1 ) custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 ) custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )