first commit
This commit is contained in:
28
addons/zylann.hterrain/tools/about/about_dialog.gd
Executable file
28
addons/zylann.hterrain/tools/about/about_dialog.gd
Executable file
@@ -0,0 +1,28 @@
|
||||
@tool
|
||||
extends AcceptDialog
|
||||
|
||||
const HT_Util = preload("../../util/util.gd")
|
||||
const HT_Logger = preload("../../util/logger.gd")
|
||||
const HT_Errors = preload("../../util/errors.gd")
|
||||
|
||||
const PLUGIN_CFG_PATH = "res://addons/zylann.hterrain/plugin.cfg"
|
||||
|
||||
|
||||
@onready var _about_rich_text_label : RichTextLabel = $VB/HB2/TC/About
|
||||
|
||||
var _logger = HT_Logger.get_for(self)
|
||||
|
||||
|
||||
func _ready():
|
||||
if HT_Util.is_in_edited_scene(self):
|
||||
return
|
||||
|
||||
var plugin_cfg = ConfigFile.new()
|
||||
var err := plugin_cfg.load(PLUGIN_CFG_PATH)
|
||||
if err != OK:
|
||||
_logger.error("Could not load {0}: {1}" \
|
||||
.format([PLUGIN_CFG_PATH, HT_Errors.get_message(err)]))
|
||||
return
|
||||
var version = plugin_cfg.get_value("plugin", "version", "--.--.--")
|
||||
|
||||
_about_rich_text_label.text = _about_rich_text_label.text.format({"version": version})
|
||||
1
addons/zylann.hterrain/tools/about/about_dialog.gd.uid
Normal file
1
addons/zylann.hterrain/tools/about/about_dialog.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dybp2pjggdr0d
|
||||
85
addons/zylann.hterrain/tools/about/about_dialog.tscn
Normal file
85
addons/zylann.hterrain/tools/about/about_dialog.tscn
Normal file
@@ -0,0 +1,85 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://cvuubd08805oa"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dybp2pjggdr0d" path="res://addons/zylann.hterrain/tools/about/about_dialog.gd" id="1"]
|
||||
[ext_resource type="Texture2D" uid="uid://sdaddk8wxjin" path="res://addons/zylann.hterrain/tools/icons/icon_heightmap_node_large.svg" id="2"]
|
||||
[ext_resource type="Script" uid="uid://ict65vmutips" path="res://addons/zylann.hterrain/tools/util/rich_text_label_hyperlinks.gd" id="3"]
|
||||
|
||||
[node name="AboutDialog" type="AcceptDialog"]
|
||||
size = Vector2i(516, 357)
|
||||
script = ExtResource("1")
|
||||
|
||||
[node name="VB" type="VBoxContainer" parent="."]
|
||||
custom_minimum_size = Vector2(500, 300)
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 8.0
|
||||
offset_top = 8.0
|
||||
offset_right = -8.0
|
||||
offset_bottom = -49.0
|
||||
|
||||
[node name="HB2" type="HBoxContainer" parent="VB"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="VB/HB2"]
|
||||
layout_mode = 2
|
||||
texture = ExtResource("2")
|
||||
stretch_mode = 2
|
||||
|
||||
[node name="TC" type="TabContainer" parent="VB/HB2"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="About" type="RichTextLabel" parent="VB/HB2/TC"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
bbcode_enabled = true
|
||||
text = "Version: {version}
|
||||
Author: Marc Gilleron
|
||||
Repository: https://github.com/Zylann/godot_heightmap_plugin
|
||||
Issue tracker: https://github.com/Zylann/godot_heightmap_plugin/issues
|
||||
|
||||
Gold supporters:
|
||||
|
||||
Aaron Franke (aaronfranke)
|
||||
|
||||
Silver supporters:
|
||||
|
||||
TheConceptBoy
|
||||
Chris Bolton (yochrisbolton)
|
||||
Gamerfiend (Snowminx)
|
||||
greenlion (Justin Swanhart)
|
||||
segfault-god (jp.owo.Manda)
|
||||
RonanZe
|
||||
Phyronnaz
|
||||
NoFr1ends (Lynx)
|
||||
|
||||
Bronze supporters:
|
||||
|
||||
rcorre (Ryan Roden-Corrent)
|
||||
duchainer (Raphaël Duchaîne)
|
||||
MadMartian
|
||||
stackdump (stackdump.eth)
|
||||
Treer
|
||||
MrGreaterThan
|
||||
lenis0012
|
||||
"
|
||||
script = ExtResource("3")
|
||||
|
||||
[node name="License" type="RichTextLabel" parent="VB/HB2/TC"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
text = "Copyright (c) 2016-2023 Marc Gilleron
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
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.
|
||||
"
|
||||
|
||||
[node name="HB" type="HBoxContainer" parent="VB"]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
Reference in New Issue
Block a user