diff options
| author | tpart <tpart120@proton.me> | 2025-12-16 23:11:57 +0100 |
|---|---|---|
| committer | tpart <tpart120@proton.me> | 2025-12-16 23:12:02 +0100 |
| commit | 7810663f3945b00672e7d6011c77d680f9d45a30 (patch) | |
| tree | fbc99cd020809003140db105bfa3e11445655a07 /client/gui | |
| parent | 348e44880c81f1d223f53ab11897bae427073d42 (diff) | |
| download | hurrycurry-7810663f3945b00672e7d6011c77d680f9d45a30.tar hurrycurry-7810663f3945b00672e7d6011c77d680f9d45a30.tar.bz2 hurrycurry-7810663f3945b00672e7d6011c77d680f9d45a30.tar.zst | |
Add screen
Diffstat (limited to 'client/gui')
| -rw-r--r-- | client/gui/menus/screen_info.tscn | 62 | ||||
| -rw-r--r-- | client/gui/resources/shaders/clouds_canvas_item.gdshader | 35 | ||||
| -rw-r--r-- | client/gui/resources/shaders/clouds_canvas_item.gdshader.uid | 1 |
3 files changed, 98 insertions, 0 deletions
diff --git a/client/gui/menus/screen_info.tscn b/client/gui/menus/screen_info.tscn new file mode 100644 index 00000000..5709b43a --- /dev/null +++ b/client/gui/menus/screen_info.tscn @@ -0,0 +1,62 @@ +[gd_scene load_steps=5 format=3 uid="uid://dgtdfctc0x78v"] + +[ext_resource type="Shader" uid="uid://b7p7umdb51hhn" path="res://gui/resources/shaders/clouds_canvas_item.gdshader" id="1_ogbng"] + +[sub_resource type="FastNoiseLite" id="FastNoiseLite_ogbng"] +frequency = 0.004 + +[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_07dxw"] +width = 834 +height = 480 +generate_mipmaps = false +noise = SubResource("FastNoiseLite_ogbng") +seamless = true + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_86n4b"] +shader = ExtResource("1_ogbng") +shader_parameter/noise = SubResource("NoiseTexture2D_07dxw") +shader_parameter/ccloud = Color(0.63119745, 0.6848105, 0.72822344, 1) +shader_parameter/csky = Color(0.2257854, 0.2183806, 0.60477614, 1) + +[node name="ScreenInfo" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="ColorRect" type="ColorRect" parent="."] +material = SubResource("ShaderMaterial_86n4b") +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="MarginContainer" type="MarginContainer" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/margin_left = 64 +theme_override_constants/margin_top = 64 +theme_override_constants/margin_right = 64 +theme_override_constants/margin_bottom = 64 + +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] +layout_mode = 2 + +[node name="RichTextLabel" type="RichTextLabel" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +bbcode_enabled = true +text = "[font_size=48][b]Welcome to example.org![/b] + +This is an example motd. Enjoy![/font_size]" +fit_content = true +horizontal_alignment = 1 +vertical_alignment = 1 diff --git a/client/gui/resources/shaders/clouds_canvas_item.gdshader b/client/gui/resources/shaders/clouds_canvas_item.gdshader new file mode 100644 index 00000000..fd5d0377 --- /dev/null +++ b/client/gui/resources/shaders/clouds_canvas_item.gdshader @@ -0,0 +1,35 @@ +/* + Hurry Curry! - a game about cooking + Copyright (C) 2025 Hurry Curry! Contributors + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, version 3 of the License only. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +*/ +shader_type canvas_item; + +uniform sampler2D noise : source_color; +uniform vec4 ccloud : source_color; +uniform vec4 csky : source_color; + +void fragment() { + vec2 uv = UV * 0.9; + uv += TIME * vec2(0.01,0.02); + + float f = texture(noise, uv).x; + f = 1. - f; + f = pow(f, 1.5); + f = floor(f*5.)/5.; + f = pow(f, 2.); + + COLOR = mix(csky, ccloud, f); +} diff --git a/client/gui/resources/shaders/clouds_canvas_item.gdshader.uid b/client/gui/resources/shaders/clouds_canvas_item.gdshader.uid new file mode 100644 index 00000000..1b5ea7f0 --- /dev/null +++ b/client/gui/resources/shaders/clouds_canvas_item.gdshader.uid @@ -0,0 +1 @@ +uid://b7p7umdb51hhn |