From fc94c6b6c9cfc062fa0d40acf6ddfc2cf2689caa Mon Sep 17 00:00:00 2001 From: Just Dzhi Date: Sat, 30 Sep 2023 20:14:10 +0400 Subject: [PATCH] Menu buttons & bg --- src/scenes/menu/Menu.tscn | 43 +++++++++++++++++- src/scenes/menu/background/background.png | Bin 0 -> 3968 bytes .../menu/background/background.png.import | 35 ++++++++++++++ src/scenes/menu/button/button_outline.png | Bin 0 -> 133 bytes .../menu/button/button_outline.png.import | 35 ++++++++++++++ 5 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 src/scenes/menu/background/background.png create mode 100644 src/scenes/menu/background/background.png.import create mode 100644 src/scenes/menu/button/button_outline.png create mode 100644 src/scenes/menu/button/button_outline.png.import diff --git a/src/scenes/menu/Menu.tscn b/src/scenes/menu/Menu.tscn index a8af7f0..c314ecd 100644 --- a/src/scenes/menu/Menu.tscn +++ b/src/scenes/menu/Menu.tscn @@ -1,13 +1,21 @@ -[gd_scene load_steps=3 format=2] +[gd_scene load_steps=5 format=2] [ext_resource path="res://src/scenes/menu/menu.gd" type="Script" id=1] +[ext_resource path="res://src/scenes/menu/background/background.png" type="Texture" id=2] [ext_resource path="res://res/themes/default.tres" type="Theme" id=3] +[ext_resource path="res://src/scenes/menu/button/button_outline.png" type="Texture" id=4] [node name="Menu" type="Node"] script = ExtResource( 1 ) [node name="View" type="Node2D" parent="."] +[node name="Background" type="Sprite" parent="View"] +texture = ExtResource( 2 ) +centered = false +region_enabled = true +region_rect = Rect2( 0, 0, 320, 180 ) + [node name="UI" type="Control" parent="."] margin_right = 160.0 margin_bottom = 90.0 @@ -19,6 +27,17 @@ margin_right = 140.0 margin_bottom = 60.0 theme = ExtResource( 3 ) text = "Play" +flat = true + +[node name="Button_Outline" type="NinePatchRect" parent="UI/PlayButton"] +margin_right = 120.0 +margin_bottom = 40.0 +rect_clip_content = true +texture = ExtResource( 4 ) +patch_margin_left = 2 +patch_margin_top = 2 +patch_margin_right = 2 +patch_margin_bottom = 2 [node name="SettingsButton" type="Button" parent="UI"] margin_left = 20.0 @@ -27,6 +46,17 @@ margin_right = 140.0 margin_bottom = 110.0 theme = ExtResource( 3 ) text = "Settings" +flat = true + +[node name="Button_Outline" type="NinePatchRect" parent="UI/SettingsButton"] +margin_right = 120.0 +margin_bottom = 40.0 +rect_clip_content = true +texture = ExtResource( 4 ) +patch_margin_left = 2 +patch_margin_top = 2 +patch_margin_right = 2 +patch_margin_bottom = 2 [node name="ExitButton" type="Button" parent="UI"] margin_left = 20.0 @@ -35,6 +65,17 @@ margin_right = 140.0 margin_bottom = 160.0 theme = ExtResource( 3 ) text = "Exit" +flat = true + +[node name="Button_Outline" type="NinePatchRect" parent="UI/ExitButton"] +margin_right = 120.0 +margin_bottom = 40.0 +rect_clip_content = true +texture = ExtResource( 4 ) +patch_margin_left = 2 +patch_margin_top = 2 +patch_margin_right = 2 +patch_margin_bottom = 2 [node name="Label" type="Label" parent="UI"] margin_left = 212.0 diff --git a/src/scenes/menu/background/background.png b/src/scenes/menu/background/background.png new file mode 100644 index 0000000000000000000000000000000000000000..33ab88245b377e040d48ac244172eb617e185ec8 GIT binary patch literal 3968 zcmd5<4NwzT9uHzgQF=IbT8cNa4PLF4&2BcyCc6?40w}ft`A|bWs+-*xvL(sJ-30<_ zv8e4icZa>ZcJz=B@1quNwO*%+7F0aFPUox#b3K(SmiDG2qpf(fA{9T%y-h-(Z7A0J zn9FR!d;5Ox_y52D|M&jyv2|I_;+W|8Xq8G8lf5J(U!{sz1lzl&PJ+K*oKT;Jf2Mht z6iF)8^jXR`LRD8E2O9>y&?eigPtvU5)-ar42O6K-3(+c7a;neEu%$po?4X4AnAQJm zJ+4N0&a7T(u;Ny)1vvR7RU#;;$|+>4N?D3ir=}puJ{l6Zfy^L2x632ZKC{}-OT)JE z8dD>Fh+Jw`rzr*zn{^pt5k!C(H3Z7yIF1-8jn+;Y7$cR05I8|#IEiU>sMbj9Nm{E% zf*&4ED@wr!0GE46CT9&{XI&f>?rSDT=~y0wV|%B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 zmo~-XlXY93Uo*-7+!xW^zja0nN zn@>D?CEed#XgjdA&TxSFA<0C?oVb$y{2s$qF*bc99N5;bR9+}nFM z4A|N`bB7Xhp&?6k+hbR9`&P8gjH|M_e;o7H^uFFX>pe%-8md1%Q}{sbENa&aAkmYU z)=2h0*pu~m*QqajG3)mmh^y|o!sDA)oz^t2y_)&=_%73o1z)B#AMrN7*7k$s)t8(< z!m4e*E1tb@keS|h)^MnlhR!h8NdrNKf>UAAemf>E@ z+SZNTGi~hyc_}?TqB?4_ln_3}=NKa&~4;#{Tp*HU9!F C25HRz literal 0 HcmV?d00001 diff --git a/src/scenes/menu/background/background.png.import b/src/scenes/menu/background/background.png.import new file mode 100644 index 0000000..37b5908 --- /dev/null +++ b/src/scenes/menu/background/background.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/background.png-ebca5d93cc16882530af3ae8f4b2c1b7.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://src/scenes/menu/background/background.png" +dest_files=[ "res://.import/background.png-ebca5d93cc16882530af3ae8f4b2c1b7.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=1 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/src/scenes/menu/button/button_outline.png b/src/scenes/menu/button/button_outline.png new file mode 100644 index 0000000000000000000000000000000000000000..3ae24cf8fcfd8836e67d6d83d5dc2c631100d7fd GIT binary patch literal 133 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|>^)r^Lo9mV zPTnZUpuod)F!x6NjGo1=eAO#;oc{k8WocM-i$kr`M5j~#L+`TE&DyPd1$!PSJAPs} e_F;9f|G}`xTXuu2naU!dQ4F50elF{r5}E*P+9^>0 literal 0 HcmV?d00001 diff --git a/src/scenes/menu/button/button_outline.png.import b/src/scenes/menu/button/button_outline.png.import new file mode 100644 index 0000000..b58f8c0 --- /dev/null +++ b/src/scenes/menu/button/button_outline.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/button_outline.png-77c63f9f20743f87408afd074242b2ba.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://src/scenes/menu/button/button_outline.png" +dest_files=[ "res://.import/button_outline.png-77c63f9f20743f87408afd074242b2ba.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0