diff --git a/project.godot b/project.godot index 9bf81b2..02bce5e 100644 --- a/project.godot +++ b/project.godot @@ -17,7 +17,7 @@ _global_script_class_icons={ config/name="New Game Project" run/main_scene="res://scene/GUI/Menu.tscn" -config/icon="res://resource/art/planet.png" +config/icon="res://resource/art/icon.png" [autoload] diff --git a/resource/art/IMG_0151.PNG b/resource/art/IMG_0151.PNG new file mode 100644 index 0000000..d0d16ec Binary files /dev/null and b/resource/art/IMG_0151.PNG differ diff --git a/resource/art/IMG_0151.PNG.import b/resource/art/IMG_0151.PNG.import new file mode 100644 index 0000000..adea69d --- /dev/null +++ b/resource/art/IMG_0151.PNG.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/IMG_0151.PNG-1af21ba3a9722f419ef220a480f45db5.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/art/IMG_0151.PNG" +dest_files=[ "res://.import/IMG_0151.PNG-1af21ba3a9722f419ef220a480f45db5.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=true +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 +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/resource/shader/outline.tres b/resource/shader/outline.tres new file mode 100644 index 0000000..99f9fca --- /dev/null +++ b/resource/shader/outline.tres @@ -0,0 +1,29 @@ +[gd_resource type="ShaderMaterial" load_steps=2 format=2] + +[sub_resource type="Shader" id=1] +code = "shader_type canvas_item; + +uniform float width:hint_range(0.0,30.0); +uniform vec4 outline_color:hint_color; + +void fragment(){ + float size = width * 1.0 / float(textureSize(TEXTURE,0).x); + vec4 sprite_color = texture(TEXTURE,UV); + float alpha = -8.0 * sprite_color.a; + alpha += texture(TEXTURE,UV + vec2(0.0,-size)).a; + alpha += texture(TEXTURE,UV + vec2(size,-size)).a; + alpha += texture(TEXTURE,UV + vec2(size,0)).a; + alpha += texture(TEXTURE,UV + vec2(size,size)).a; + alpha += texture(TEXTURE,UV + vec2(0.0,size)).a; + alpha += texture(TEXTURE,UV + vec2(-size,size)).a; + alpha += texture(TEXTURE,UV + vec2(-size,0.0)).a; + alpha += texture(TEXTURE,UV + vec2(-size,-size)).a; + alpha /= -8.0; + vec4 final_color = mix(sprite_color,outline_color,clamp(alpha,0.0,1.0)); + COLOR = vec4(final_color.rgb,clamp(abs(alpha) + sprite_color.a,0.0,1.0)); +} " + +[resource] +shader = SubResource( 1 ) +shader_param/width = 3.058 +shader_param/outline_color = Color( 0, 0.717647, 0.933333, 1 ) diff --git a/scene/GUI/Menu.tscn b/scene/GUI/Menu.tscn index cfae45b..ae6c845 100644 --- a/scene/GUI/Menu.tscn +++ b/scene/GUI/Menu.tscn @@ -1,12 +1,13 @@ -[gd_scene load_steps=8 format=2] +[gd_scene load_steps=9 format=2] [ext_resource path="res://scene/GUI/Menu.gd" type="Script" id=1] -[ext_resource path="res://resource/art/dark_forest.png" type="Texture" id=2] -[ext_resource path="res://resource/art/start_normal.png" type="Texture" id=3] -[ext_resource path="res://resource/art/start_hover.png" type="Texture" id=4] -[ext_resource path="res://resource/art/settings.png" type="Texture" id=5] -[ext_resource path="res://scene/GUI/HelpButton.gd" type="Script" id=6] -[ext_resource path="res://scene/GUI/SettingMenu.tscn" type="PackedScene" id=7] +[ext_resource path="res://resource/art/IMG_0151.PNG" type="Texture" id=2] +[ext_resource path="res://resource/art/dark_forest.png" type="Texture" id=3] +[ext_resource path="res://resource/art/start_normal.png" type="Texture" id=4] +[ext_resource path="res://resource/art/start_hover.png" type="Texture" id=5] +[ext_resource path="res://resource/art/settings.png" type="Texture" id=6] +[ext_resource path="res://scene/GUI/HelpButton.gd" type="Script" id=7] +[ext_resource path="res://scene/GUI/SettingMenu.tscn" type="PackedScene" id=8] [node name="Menu" type="CanvasLayer"] script = ExtResource( 1 ) @@ -14,32 +15,33 @@ __meta__ = { "_edit_vertical_guides_": [ 961.843 ] } +[node name="Background" type="TextureRect" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +texture = ExtResource( 2 ) + [node name="Title" type="TextureRect" parent="."] anchor_left = 0.5 -anchor_top = 0.5 anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -534.5 -margin_top = -376.084 -margin_right = -534.0 -margin_bottom = -25.084 +margin_left = -471.38 +margin_right = 426.62 +margin_bottom = 351.0 rect_scale = Vector2( 1.16779, 1.10371 ) -texture = ExtResource( 2 ) +texture = ExtResource( 3 ) [node name="StartButton" type="TextureButton" parent="."] -anchor_left = 0.5 +anchor_left = 1.0 anchor_top = 1.0 -anchor_right = 0.5 +anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = -312.892 -margin_top = -334.445 -margin_right = 278.108 -margin_bottom = -186.445 -texture_normal = ExtResource( 3 ) -texture_pressed = ExtResource( 3 ) -texture_hover = ExtResource( 4 ) +margin_left = -623.0 +margin_top = -148.0 +texture_normal = ExtResource( 4 ) +texture_pressed = ExtResource( 4 ) +texture_hover = ExtResource( 5 ) [node name="HelpButton" type="Node2D" parent="."] +editor/display_folded = true position = Vector2( 1762.47, 116.136 ) rotation = 4.29351 __meta__ = { @@ -51,9 +53,9 @@ margin_left = -46.1759 margin_top = -46.2451 margin_right = 45.8241 margin_bottom = 45.7549 -texture_normal = ExtResource( 5 ) -script = ExtResource( 6 ) +texture_normal = ExtResource( 6 ) +script = ExtResource( 7 ) -[node name="SettingMenu" parent="." instance=ExtResource( 7 )] +[node name="SettingMenu" parent="." instance=ExtResource( 8 )] [connection signal="pressed" from="StartButton" to="." method="_on_StartButton_pressed"] [connection signal="help_button_clicked" from="HelpButton/HelpButton" to="." method="_on_HelpButton_help_button_clicked"]