Skip to content

Commit

Permalink
Small About dialog update
Browse files Browse the repository at this point in the history
  • Loading branch information
RodZill4 committed Dec 10, 2024
1 parent 7606db9 commit ea852b1
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 28 deletions.
30 changes: 26 additions & 4 deletions material_maker/windows/about/about.gd
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ extends Window
@onready var patrons_list = $HBoxContainer/VBoxContainer/VBoxContainer/Donors/VBoxContainer/Patrons

const CONTRIBUTORS = [
{ icon="res://material_maker/icons/godot_logo.svg", contribution="99% of Material Maker's code is the awesome Godot Engine GODOT_VERSION" },
{ name="Rodolphe Suescun", contribution="Lead developer" },
{ name="Kasper Arnklit Frandsen", contribution="Several nodes (including Auto Tones, Mask to SDF, Normal Blend and many Bricks nodes) and node updates, and very nice video tutorials" },
{ name="Hugo Locurcio", contribution="Lots of contributions, mostly related to rendering and user interface" },
Expand Down Expand Up @@ -47,13 +48,34 @@ func _ready() -> void:
application_name_label.text = "Material Maker"
else:
application_name_label.text = ProjectSettings.get_setting("application/config/name")+" v"+ProjectSettings.get_setting("application/config/actual_release")

# Contributors list
for c in CONTRIBUTORS:
var name_control : Control
if c.has("name"):
var label : Label = Label.new()
label.text = c.name
name_control = label
elif c.has("icon"):
var icon : TextureRect = TextureRect.new()
icon.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT
icon.texture = load(c.icon)
name_control = icon
name_control.size_flags_vertical = Control.SIZE_SHRINK_BEGIN
authors_grid.add_child(name_control)

var label : Label = Label.new()
label.text = c.name
authors_grid.add_child(label)
label = Label.new()
label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
label.text = c.contribution
var contribution : String = c.contribution
var godot_version : Dictionary = Engine.get_version_info()
var godot_version_str : String = "v%d.%d" % [ godot_version.major, godot_version.minor ]
if godot_version.has("patch") and godot_version.patch > 0:
godot_version_str += ".%d" % godot_version.patch
if godot_version.has("status"):
godot_version_str += godot_version.status
contribution = contribution.replace("GODOT_VERSION", godot_version_str)
label.text = contribution
label.size_flags_horizontal = Control.SIZE_EXPAND_FILL
authors_grid.add_child(label)
for p in PATRONS:
patrons_list.add_item(p)
Expand Down
33 changes: 9 additions & 24 deletions material_maker/windows/about/about.tscn
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
[gd_scene load_steps=13 format=3 uid="uid://btww87u0o4x7t"]
[gd_scene load_steps=12 format=3 uid="uid://btww87u0o4x7t"]

[ext_resource type="Script" path="res://material_maker/windows/about/about.gd" id="1"]
[ext_resource type="Script" uid="uid://c80e0om4076tc" path="res://material_maker/windows/about/about.gd" id="1"]
[ext_resource type="Texture2D" uid="uid://uwqukrk00ios" path="res://material_maker/windows/about/github.png" id="2"]
[ext_resource type="Texture2D" uid="uid://n121jfbm7ydw" path="res://material_maker/windows/about/twitter.png" id="3"]
[ext_resource type="Texture2D" uid="uid://bt7vgpv1dduvh" path="res://material_maker/windows/about/icon.png" id="4"]
[ext_resource type="Texture2D" uid="uid://d0417sp8jvp7a" path="res://material_maker/windows/about/itchio.png" id="5"]
[ext_resource type="Texture2D" uid="uid://dntvnke4pcqqf" path="res://icon.png" id="6"]
[ext_resource type="Texture2D" uid="uid://bxfuae46y2fdc" path="res://material_maker/windows/about/youtube.png" id="7"]
Expand All @@ -15,6 +14,7 @@

[node name="About" type="Window"]
title = "About Material Maker"
position = Vector2i(0, 36)
size = Vector2i(600, 500)
script = ExtResource("1")

Expand Down Expand Up @@ -63,45 +63,30 @@ layout_mode = 2
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 6
text = "© 2018-2023 Rodolphe Suescun and contributors"
text = "© 2018-2024 Rodolphe Suescun and contributors"

[node name="VBoxContainer" type="TabContainer" parent="HBoxContainer/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
tab_alignment = 1
current_tab = 0

[node name="Authors" type="ScrollContainer" parent="HBoxContainer/VBoxContainer/VBoxContainer"]
layout_mode = 2
metadata/_tab_index = 0

[node name="List" type="GridContainer" parent="HBoxContainer/VBoxContainer/VBoxContainer/Authors"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
theme_override_constants/h_separation = 16
columns = 2

[node name="Godot" type="HBoxContainer" parent="HBoxContainer/VBoxContainer/VBoxContainer/Authors/List"]
layout_mode = 2

[node name="Godot" type="TextureButton" parent="HBoxContainer/VBoxContainer/VBoxContainer/Authors/List/Godot"]
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
mouse_default_cursor_shape = 2
texture_normal = ExtResource("4")
stretch_mode = 4

[node name="Label" type="Label" parent="HBoxContainer/VBoxContainer/VBoxContainer/Authors/List/Godot"]
layout_mode = 2
text = " Godot Engine"

[node name="Label" type="Label" parent="HBoxContainer/VBoxContainer/VBoxContainer/Authors/List"]
layout_mode = 2
size_flags_horizontal = 3
text = "99% of Material Maker's code is the awesome Godot Engine"

[node name="Donors" type="ScrollContainer" parent="HBoxContainer/VBoxContainer/VBoxContainer"]
visible = false
layout_mode = 2
metadata/_tab_index = 1

[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer/VBoxContainer/VBoxContainer/Donors"]
layout_mode = 2
Expand Down Expand Up @@ -152,6 +137,7 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
wrap_mode = 1
metadata/_tab_index = 2

[node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer/VBoxContainer"]
layout_mode = 2
Expand Down Expand Up @@ -248,7 +234,6 @@ texture_normal = ExtResource("9")
stretch_mode = 4

[connection signal="close_requested" from="." to="." method="queue_free"]
[connection signal="pressed" from="HBoxContainer/VBoxContainer/VBoxContainer/Authors/List/Godot/Godot" to="." method="open_url" binds= ["https://godotengine.org/"]]
[connection signal="pressed" from="HBoxContainer/SocialNetworks/Patreon" to="." method="open_url" binds= ["https://www.patreon.com/rodzlabs"]]
[connection signal="pressed" from="HBoxContainer/SocialNetworks/ItchIo" to="." method="open_url" binds= ["https://rodzilla.itch.io/material-maker"]]
[connection signal="pressed" from="HBoxContainer/SocialNetworks/Github" to="." method="open_url" binds= ["https://github.com/RodZill4/godot-procedural-textures"]]
Expand Down

0 comments on commit ea852b1

Please sign in to comment.