Skip to content

Commit

Permalink
Engine bug workaround
Browse files Browse the repository at this point in the history
removed preloads from games autoloads.

Workaround for bug godotengine/godot#81462
  • Loading branch information
GradyTheDev committed Sep 14, 2023
1 parent 4862add commit d1d8435
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 14 deletions.
33 changes: 23 additions & 10 deletions addons/simplelicense/GUI/LicenseGUI.tscn
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
[gd_scene load_steps=3 format=3 uid="uid://bap5x6kis6j2a"]
[gd_scene load_steps=6 format=3 uid="uid://bap5x6kis6j2a"]

[ext_resource type="Script" path="res://addons/simplelicense/GUI/LicenseGUI.gd" id="1_ue7vy"]
[ext_resource type="Script" path="res://addons/simplelicense/api/LicenseManager.gd" id="2_cpb2k"]

[sub_resource type="SystemFont" id="SystemFont_xeo7q"]
font_names = PackedStringArray("Monospace")
multichannel_signed_distance_field = true

[sub_resource type="FontVariation" id="FontVariation_qrdl2"]
base_font = SubResource("SystemFont_xeo7q")

[sub_resource type="Theme" id="Theme_0fijk"]
default_font = SubResource("FontVariation_qrdl2")
default_font_size = 8

[node name="LicenseGUI" type="Control"]
custom_minimum_size = Vector2(256, 128)
layout_mode = 3
Expand All @@ -11,6 +22,7 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = SubResource("Theme_0fijk")
script = ExtResource("1_ue7vy")
load_locations = Array[String](["res://licenses", "res://addons/simplelicense/mod_example/licenses/"])
export_locations = Array[String](["user://licenses/game/", "user://licenses/mods/mod_1/"])
Expand All @@ -31,11 +43,13 @@ grow_vertical = 2
[node name="Label" type="Label" parent="."]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.381076
anchor_right = 0.461806
anchor_bottom = 0.0401235
anchor_left = 0.347917
anchor_top = 0.0037037
anchor_right = 0.51875
anchor_bottom = 0.0888889
offset_left = 3.05176e-05
grow_horizontal = 2
theme_override_font_sizes/font_size = 14
text = "License Info"
metadata/_edit_use_anchors_ = true

Expand Down Expand Up @@ -63,8 +77,10 @@ grow_horizontal = 0
grow_vertical = 2
size_flags_horizontal = 3
editable = false
wrap_mode = 1
scroll_smooth = true
minimap_draw = true
minimap_width = 20
metadata/_edit_use_anchors_ = true

[node name="btn_open_data_dir" type="Button" parent="."]
Expand All @@ -75,7 +91,6 @@ anchor_top = 0.00308642
anchor_right = 0.996875
anchor_bottom = 0.095679
grow_horizontal = 2
theme_override_font_sizes/font_size = 12
text = "Open Data Directory"
metadata/_edit_use_anchors_ = true

Expand All @@ -87,18 +102,16 @@ anchor_top = 0.00308642
anchor_right = 0.719705
anchor_bottom = 0.095679
grow_horizontal = 2
theme_override_font_sizes/font_size = 12
text = "Save Licenses"
metadata/_edit_use_anchors_ = true

[node name="op_locations" type="OptionButton" parent="."]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.00625
anchor_top = 0.0037037
anchor_right = 0.29375
anchor_bottom = 0.0962963
theme_override_font_sizes/font_size = 12
anchor_top = 0.892593
anchor_right = 0.985417
anchor_bottom = 0.985185
clip_text = true
item_count = 2
popup/item_0/text = "a"
Expand Down
6 changes: 3 additions & 3 deletions code/globals/singletones/global_popup_space.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ extends CanvasLayer

const POP_UP = GlobalEnums.POP_UP

const SETTINGS_TSCN: PackedScene = preload("res://code/menus/settings/settings.tscn")
const CREDITS_TSCN: PackedScene = preload("res://code/menus/credits/credits.tscn")
const PAUSE_TSCN: PackedScene = preload("res://code/menus/pause/pause_menu.tscn")
var SETTINGS_TSCN: PackedScene = load("res://code/menus/settings/settings.tscn")
var CREDITS_TSCN: PackedScene = load("res://code/menus/credits/credits.tscn")
var PAUSE_TSCN: PackedScene = load("res://code/menus/pause/pause_menu.tscn")

var scenes_dict = {
POP_UP.SETTINGS: SETTINGS_TSCN.instantiate(),
Expand Down
3 changes: 2 additions & 1 deletion code/menus/credits/credits.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ selection_enabled = true
[node name="LicenseGUI" parent="TabContainer" instance=ExtResource("3_hosfm")]
visible = false
layout_mode = 2
load_locations = Array[String](["res://resources/licenses", "res://addons/simplelicense/mod_example/licenses/"])
load_locations = Array[String](["res://resources/licenses"])
export_locations = Array[String](["user://licenses/game/"])

[node name="Back" parent="." instance=ExtResource("3_2q331")]
layout_mode = 2
Expand Down

0 comments on commit d1d8435

Please sign in to comment.