Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Nalleyer committed Dec 1, 2019
2 parents 16ece79 + 09651c1 commit 7ca039a
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 27 deletions.
2 changes: 1 addition & 1 deletion project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
Binary file added resource/art/IMG_0151.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions resource/art/IMG_0151.PNG.import
Original file line number Diff line number Diff line change
@@ -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
29 changes: 29 additions & 0 deletions resource/shader/outline.tres
Original file line number Diff line number Diff line change
@@ -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 )
54 changes: 28 additions & 26 deletions scene/GUI/Menu.tscn
Original file line number Diff line number Diff line change
@@ -1,45 +1,47 @@
[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 )
__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__ = {
Expand All @@ -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"]

0 comments on commit 7ca039a

Please sign in to comment.