Events and goodies stuff, tiny fixes, and the like
This commit is contained in:
parent
cc5e8eb66c
commit
8ac9e679e5
23 changed files with 452 additions and 8 deletions
4
assets/config/bg2.tres
Normal file
4
assets/config/bg2.tres
Normal file
|
@ -0,0 +1,4 @@
|
|||
[gd_resource type="StyleBoxFlat" format=3 uid="uid://bkwb4tqap7x7i"]
|
||||
|
||||
[resource]
|
||||
bg_color = Color(0.188235, 0.188235, 0.188235, 1)
|
8
assets/config/tiny.tres
Normal file
8
assets/config/tiny.tres
Normal file
|
@ -0,0 +1,8 @@
|
|||
[gd_resource type="LabelSettings" load_steps=2 format=3 uid="uid://xh3q8p65gbti"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://ce5fs0ro7kp8r" path="res://assets/fonts/Lexend.ttf" id="1_r577y"]
|
||||
|
||||
[resource]
|
||||
font = ExtResource("1_r577y")
|
||||
font_size = 14
|
||||
font_color = Color(1, 1, 1, 0.501961)
|
13
events/latest_events.xml
Normal file
13
events/latest_events.xml
Normal file
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<events>
|
||||
<event id="week_3" date="2024-12-08">
|
||||
<tagline>FunkPanion Update Week 3</tagline>
|
||||
<title>Matkap Sprites</title>
|
||||
<thumb>mk_preview.png</thumb>
|
||||
<desc>I made these cool-ass sprites of my sona Matkap.
|
||||
I thought it'd be nice to have him in here, but I didn't want to make him the default because that'd be pretty jarring.
|
||||
Imagine opening an FNF thingy and then not immediately seeing an FNF character.
|
||||
So instead I made this panel. Check back here for more goodies, in case I make any.
|
||||
WARNING: Applying will override some of your config and save.</desc>
|
||||
</event>
|
||||
</events>
|
BIN
events/week_3/matkap.png
Normal file
BIN
events/week_3/matkap.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 341 KiB |
3
events/week_3/matkap.png.import
Normal file
3
events/week_3/matkap.png.import
Normal file
|
@ -0,0 +1,3 @@
|
|||
[remap]
|
||||
|
||||
importer="keep"
|
33
events/week_3/matkap.xml
Normal file
33
events/week_3/matkap.xml
Normal file
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextureAtlas imagePath="C:/Users/Theo Range/Downloads/fnfanims/matkap.png">
|
||||
<SubTexture name="MAT_IDLE0000" x="0" y="0" width="462" height="575" frameX="-9" frameY="0" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_IDLE0001" x="462" y="0" width="462" height="574" frameX="-9" frameY="-1" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_IDLE0002" x="924" y="0" width="466" height="573" frameX="-9" frameY="-2" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_IDLE0003" x="1390" y="0" width="463" height="574" frameX="-9" frameY="-1" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_IDLE0004" x="1390" y="0" width="463" height="574" frameX="-9" frameY="-1" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_IDLE0005" x="1390" y="0" width="463" height="574" frameX="-9" frameY="-1" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_LEFT0000" x="0" y="575" width="411" height="538" frameX="-54" frameY="-35" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_LEFT0001" x="411" y="574" width="413" height="541" frameX="-57" frameY="-32" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_LEFT0002" x="824" y="575" width="413" height="540" frameX="-59" frameY="-33" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_LEFT0003" x="1237" y="575" width="413" height="540" frameX="-59" frameY="-33" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_LEFT0004" x="1237" y="575" width="413" height="540" frameX="-59" frameY="-33" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_LEFT0005" x="1237" y="575" width="413" height="540" frameX="-59" frameY="-33" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_DOWN0000" x="0" y="1115" width="380" height="481" frameX="-43" frameY="-94" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_DOWN0001" x="380" y="1115" width="380" height="489" frameX="-43" frameY="-86" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_DOWN0002" x="760" y="1115" width="380" height="487" frameX="-43" frameY="-88" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_DOWN0003" x="1140" y="1115" width="380" height="487" frameX="-43" frameY="-88" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_DOWN0004" x="1140" y="1115" width="380" height="487" frameX="-43" frameY="-88" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_DOWN0005" x="1140" y="1115" width="380" height="487" frameX="-43" frameY="-88" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_UP0000" x="0" y="1604" width="425" height="574" frameX="0" frameY="-2" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_UP0001" x="425" y="1604" width="422" height="569" frameX="0" frameY="-10" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_UP0002" x="847" y="1604" width="422" height="574" frameX="0" frameY="-8" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_UP0003" x="1269" y="1604" width="422" height="574" frameX="0" frameY="-8" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_UP0004" x="1269" y="1604" width="422" height="574" frameX="0" frameY="-8" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_UP0005" x="1269" y="1604" width="422" height="574" frameX="0" frameY="-8" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_RIGHT0000" x="0" y="2178" width="384" height="515" frameX="-150" frameY="-60" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_RIGHT0001" x="384" y="2178" width="384" height="516" frameX="-148" frameY="-59" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_RIGHT0002" x="768" y="2178" width="383" height="518" frameX="-146" frameY="-57" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_RIGHT0003" x="1151" y="2178" width="383" height="518" frameX="-146" frameY="-57" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_RIGHT0004" x="1151" y="2178" width="383" height="518" frameX="-146" frameY="-57" frameWidth="534" frameHeight="582" />
|
||||
<SubTexture name="MAT_RIGHT0005" x="1151" y="2178" width="383" height="518" frameX="-146" frameY="-57" frameWidth="534" frameHeight="582" />
|
||||
</TextureAtlas>
|
BIN
events/week_3/mk_preview.png
Normal file
BIN
events/week_3/mk_preview.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
34
events/week_3/mk_preview.png.import
Normal file
34
events/week_3/mk_preview.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bsk0t7any1rqg"
|
||||
path="res://.godot/imported/mk_preview.png-b7001c2795528e49e48dd4a8d33d4284.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://events/week_3/mk_preview.png"
|
||||
dest_files=["res://.godot/imported/mk_preview.png-b7001c2795528e49e48dd4a8d33d4284.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
35
events/week_3/redeem.gd
Normal file
35
events/week_3/redeem.gd
Normal file
|
@ -0,0 +1,35 @@
|
|||
# extends AmongUs
|
||||
|
||||
var config_change = {
|
||||
spritesheet_data = "user://uploads/matkap.xml",
|
||||
spritesheet_image = "user://uploads/matkap.png",
|
||||
spritesheet_anims = {
|
||||
"MAT_IDLE" = {
|
||||
alias = null,
|
||||
type = Config.SpritesheetAnimType.IDLE
|
||||
},
|
||||
"MAT_LEFT" = {
|
||||
alias = "left",
|
||||
type = Config.SpritesheetAnimType.DEFAULT
|
||||
},
|
||||
"MAT_DOWN" = {
|
||||
alias = "down",
|
||||
type = Config.SpritesheetAnimType.DEFAULT
|
||||
},
|
||||
"MAT_UP" = {
|
||||
alias = "up",
|
||||
type = Config.SpritesheetAnimType.DEFAULT
|
||||
},
|
||||
"MAT_RIGHT" = {
|
||||
alias = "right",
|
||||
type = Config.SpritesheetAnimType.DEFAULT
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func _init() -> void:
|
||||
if not DirAccess.dir_exists_absolute("user://uploads/"):
|
||||
DirAccess.make_dir_absolute("user://uploads/")
|
||||
|
||||
GlobalEvents.copy_fa("res://events/week_3/matkap.png", "user://uploads/matkap.png")
|
||||
GlobalEvents.copy_fa("res://events/week_3/matkap.xml", "user://uploads/matkap.xml")
|
|
@ -7,7 +7,7 @@ advanced_options=false
|
|||
dedicated_server=false
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
include_filter="*.xml, *.png"
|
||||
include_filter="*.xml, *.png, events/*"
|
||||
exclude_filter=""
|
||||
export_path="../export/FunkPanion/FunkPanion-win.zip"
|
||||
encryption_include_filters=""
|
||||
|
|
|
@ -30,6 +30,7 @@ boot_splash/minimum_display_time=2000
|
|||
|
||||
GlobalInput="*res://plugins/GlobalInput/GlobalInputGDScript.tscn"
|
||||
GlobalConfig="*res://scenes/global_config.tscn"
|
||||
GlobalEvents="*res://scenes/global_events.tscn"
|
||||
|
||||
[display]
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=14 format=3 uid="uid://b0m4v3w4sqrfs"]
|
||||
[gd_scene load_steps=15 format=3 uid="uid://b0m4v3w4sqrfs"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/config/config_window.gd" id="1_3y2tp"]
|
||||
[ext_resource type="StyleBox" uid="uid://bdkv45xc5lotp" path="res://assets/config/bg.tres" id="1_kscu5"]
|
||||
|
@ -8,6 +8,7 @@
|
|||
[ext_resource type="FontFile" uid="uid://4e3o2ds5xy7p" path="res://assets/fonts/MatSymOut.ttf" id="2_pm82g"]
|
||||
[ext_resource type="LabelSettings" uid="uid://c2s3eclr25ots" path="res://assets/config/body.tres" id="3_gn7vd"]
|
||||
[ext_resource type="FontFile" uid="uid://c6ck52v6qotm" path="res://assets/fonts/B_Lexend.ttf" id="3_qguou"]
|
||||
[ext_resource type="Script" path="res://scripts/config/config_events.gd" id="6_kxysx"]
|
||||
[ext_resource type="Script" path="res://scripts/config/config_presets.gd" id="6_th0jy"]
|
||||
[ext_resource type="FontVariation" uid="uid://d1apfvux6r82v" path="res://assets/config/button_icon.tres" id="8_qusr6"]
|
||||
[ext_resource type="Script" path="res://scripts/config/open_file_dialog.gd" id="9_1o6y4"]
|
||||
|
@ -31,7 +32,6 @@ size_flags_horizontal = 3
|
|||
size_flags_vertical = 3
|
||||
theme_override_styles/panel = ExtResource("1_kscu5")
|
||||
follow_focus = true
|
||||
scroll_vertical = 400
|
||||
horizontal_scroll_mode = 0
|
||||
script = ExtResource("1_3y2tp")
|
||||
|
||||
|
@ -71,6 +71,15 @@ size_flags_horizontal = 3
|
|||
text = "Config"
|
||||
label_settings = SubResource("LabelSettings_gk6wd")
|
||||
|
||||
[node name="Encounters" type="Button" parent="MarginContainer/Form/Header"]
|
||||
custom_minimum_size = Vector2(40, 40)
|
||||
layout_mode = 2
|
||||
tooltip_text = "Open the Events & Goodies menu."
|
||||
theme_override_fonts/font = ExtResource("2_pm82g")
|
||||
theme_override_font_sizes/font_size = 24
|
||||
text = "featured_seasonal_and_gifts"
|
||||
script = ExtResource("6_kxysx")
|
||||
|
||||
[node name="Button" type="Button" parent="MarginContainer/Form/Header"]
|
||||
custom_minimum_size = Vector2(40, 40)
|
||||
layout_mode = 2
|
||||
|
@ -619,3 +628,4 @@ select_mode = 1
|
|||
|
||||
[connection signal="pressed" from="MarginContainer/Form/Header/BackButton" to="." method="_on_back_button_pressed"]
|
||||
[connection signal="pressed" from="MarginContainer/Form/Header/BackButton" to="MarginContainer/Form" method="_on_back_button_pressed"]
|
||||
[connection signal="change_config" from="MarginContainer/Form/Header/Encounters" to="MarginContainer/Form" method="_on_encounters_change_config"]
|
||||
|
|
61
scenes/config_events.tscn
Normal file
61
scenes/config_events.tscn
Normal file
|
@ -0,0 +1,61 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://dnr0jdrxiiifr"]
|
||||
|
||||
[ext_resource type="StyleBox" uid="uid://bdkv45xc5lotp" path="res://assets/config/bg.tres" id="1_4psbb"]
|
||||
[ext_resource type="Script" path="res://scripts/config/config_window_events.gd" id="2_jnwha"]
|
||||
[ext_resource type="FontFile" uid="uid://4e3o2ds5xy7p" path="res://assets/fonts/MatSymOut.ttf" id="3_qmpng"]
|
||||
[ext_resource type="LabelSettings" uid="uid://2iu8q0tylumo" path="res://assets/config/header_bold.tres" id="4_k4g4o"]
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
theme_override_styles/panel = ExtResource("1_4psbb")
|
||||
horizontal_scroll_mode = 0
|
||||
vertical_scroll_mode = 0
|
||||
script = ExtResource("2_jnwha")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
theme_override_constants/margin_left = 8
|
||||
theme_override_constants/margin_top = 8
|
||||
theme_override_constants/margin_right = 8
|
||||
theme_override_constants/margin_bottom = 8
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Header" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="CloseButton" type="Button" parent="MarginContainer/VBoxContainer/Header"]
|
||||
custom_minimum_size = Vector2(40, 40)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
theme_override_fonts/font = ExtResource("3_qmpng")
|
||||
theme_override_font_sizes/font_size = 24
|
||||
text = "close"
|
||||
flat = true
|
||||
|
||||
[node name="Header" type="Label" parent="MarginContainer/VBoxContainer/Header"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "Events & Goodies"
|
||||
label_settings = ExtResource("4_k4g4o")
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/ScrollContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[connection signal="pressed" from="MarginContainer/VBoxContainer/Header/CloseButton" to="." method="_on_close_button_pressed"]
|
6
scenes/global_events.tscn
Normal file
6
scenes/global_events.tscn
Normal file
|
@ -0,0 +1,6 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://dxdsmwmjqrrl8"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/GlobalEvents.gd" id="1_toif7"]
|
||||
|
||||
[node name="Events" type="Node"]
|
||||
script = ExtResource("1_toif7")
|
28
scenes/thingy_event.gd
Normal file
28
scenes/thingy_event.gd
Normal file
|
@ -0,0 +1,28 @@
|
|||
extends PanelContainer
|
||||
|
||||
signal change_config(config:Dictionary)
|
||||
|
||||
@onready var title = $"MarginContainer/VBoxContainer/Header/Title"
|
||||
@onready var date = $"MarginContainer/VBoxContainer/Header/VBoxContainer/Date"
|
||||
@onready var tagline = $"MarginContainer/VBoxContainer/Header/VBoxContainer/Tagline"
|
||||
@onready var thumb = $"MarginContainer/VBoxContainer/HBoxContainer/TextureRect"
|
||||
@onready var desc = $"MarginContainer/VBoxContainer/HBoxContainer/Label"
|
||||
|
||||
@onready var yes = $"MarginContainer/VBoxContainer/HBoxContainer2/Yes"
|
||||
|
||||
var event:Dictionary
|
||||
|
||||
func do_things():
|
||||
set_event()
|
||||
yes.pressed.connect(func():
|
||||
var script = load("res://events/" + event.id + "/redeem.gd").new()
|
||||
if script.config_change != null:
|
||||
change_config.emit(script.config_change)
|
||||
)
|
||||
|
||||
func set_event():
|
||||
title.text = event.title
|
||||
date.text = event.date
|
||||
tagline.text = event.tagline
|
||||
thumb.texture = load("res://events/" + event.id + "/" + event.thumb)
|
||||
desc.text = event.desc
|
100
scenes/thingy_event.tscn
Normal file
100
scenes/thingy_event.tscn
Normal file
|
@ -0,0 +1,100 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://qnji76gh8bjy"]
|
||||
|
||||
[ext_resource type="StyleBox" uid="uid://bkwb4tqap7x7i" path="res://assets/config/bg2.tres" id="1_uaet0"]
|
||||
[ext_resource type="Script" path="res://scenes/thingy_event.gd" id="2_x0j35"]
|
||||
[ext_resource type="LabelSettings" uid="uid://2iu8q0tylumo" path="res://assets/config/header_bold.tres" id="2_xndpd"]
|
||||
[ext_resource type="LabelSettings" uid="uid://c2s3eclr25ots" path="res://assets/config/body.tres" id="3_40siy"]
|
||||
[ext_resource type="LabelSettings" uid="uid://xh3q8p65gbti" path="res://assets/config/tiny.tres" id="4_e5d37"]
|
||||
[ext_resource type="Texture2D" uid="uid://bsk0t7any1rqg" path="res://events/week_3/mk_preview.png" id="5_b74tb"]
|
||||
|
||||
[node name="ThingyEvent" type="PanelContainer"]
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -211.5
|
||||
offset_top = -37.0
|
||||
offset_right = 211.5
|
||||
offset_bottom = 37.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 4
|
||||
theme_override_styles/panel = ExtResource("1_uaet0")
|
||||
script = ExtResource("2_x0j35")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 16
|
||||
theme_override_constants/margin_top = 16
|
||||
theme_override_constants/margin_right = 16
|
||||
theme_override_constants/margin_bottom = 16
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 16
|
||||
|
||||
[node name="Header" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 16
|
||||
|
||||
[node name="Title" type="Label" parent="MarginContainer/VBoxContainer/Header"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 1
|
||||
text = "Loading"
|
||||
label_settings = ExtResource("2_xndpd")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/Header"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 0
|
||||
theme_override_constants/separation = 0
|
||||
alignment = 2
|
||||
|
||||
[node name="Date" type="Label" parent="MarginContainer/VBoxContainer/Header/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 1
|
||||
text = "Soon..."
|
||||
label_settings = ExtResource("3_40siy")
|
||||
horizontal_alignment = 2
|
||||
|
||||
[node name="Tagline" type="Label" parent="MarginContainer/VBoxContainer/Header/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 1
|
||||
text = "I can hardly wait!"
|
||||
label_settings = ExtResource("4_e5d37")
|
||||
horizontal_alignment = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_constants/separation = 16
|
||||
|
||||
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer"]
|
||||
custom_minimum_size = Vector2(300, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 0
|
||||
text = "Loading..."
|
||||
label_settings = ExtResource("3_40siy")
|
||||
autowrap_mode = 3
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="MarginContainer/VBoxContainer/HBoxContainer"]
|
||||
custom_minimum_size = Vector2(128, 128)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 0
|
||||
texture = ExtResource("5_b74tb")
|
||||
expand_mode = 1
|
||||
stretch_mode = 4
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 8
|
||||
alignment = 2
|
||||
|
||||
[node name="Yes" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer2"]
|
||||
layout_mode = 2
|
||||
text = "Apply"
|
15
scripts/GlobalEvents.gd
Normal file
15
scripts/GlobalEvents.gd
Normal file
|
@ -0,0 +1,15 @@
|
|||
extends Node
|
||||
|
||||
func copy_fa(from: String, to: String) -> void:
|
||||
var file_from = FileAccess.get_file_as_bytes(from)
|
||||
var file_to = FileAccess.open(to, FileAccess.WRITE)
|
||||
file_to.store_buffer(file_from)
|
||||
file_to.close()
|
||||
|
||||
func _enter_tree() -> void:
|
||||
print("Hello!")
|
||||
|
||||
func _notification(what):
|
||||
if what == NOTIFICATION_WM_CLOSE_REQUEST:
|
||||
print("Goodbye!")
|
||||
get_tree().quit()
|
27
scripts/config/config_events.gd
Normal file
27
scripts/config/config_events.gd
Normal file
|
@ -0,0 +1,27 @@
|
|||
extends Button
|
||||
|
||||
signal change_config(config:Dictionary)
|
||||
|
||||
var config_events = preload("res://scenes/config_events.tscn")
|
||||
|
||||
@onready var root = get_tree().root
|
||||
@onready var form = $"../.."
|
||||
|
||||
func _pressed() -> void:
|
||||
var preset_window = Popup.new()
|
||||
var cfev = config_events.instantiate()
|
||||
preset_window.add_child(cfev)
|
||||
root.add_child(preset_window)
|
||||
preset_window.popup_centered_ratio()
|
||||
|
||||
var close = func():
|
||||
preset_window.hide()
|
||||
root.remove_child(preset_window)
|
||||
preset_window.queue_free()
|
||||
cfev.queue_free()
|
||||
|
||||
cfev.close.connect(close)
|
||||
cfev.change_config.connect(func(config):
|
||||
close.call()
|
||||
change_config.emit(config)
|
||||
)
|
58
scripts/config/config_window_events.gd
Normal file
58
scripts/config/config_window_events.gd
Normal file
|
@ -0,0 +1,58 @@
|
|||
extends ScrollContainer
|
||||
|
||||
signal change_config(config:Dictionary)
|
||||
signal close
|
||||
|
||||
var thingy_event = preload("res://scenes/thingy_event.tscn")
|
||||
|
||||
var events_parser:XMLParser = XMLParser.new()
|
||||
var events = []
|
||||
|
||||
@onready var vbc = $"MarginContainer/VBoxContainer/ScrollContainer/VBoxContainer"
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
parse()
|
||||
mount()
|
||||
|
||||
func parse():
|
||||
var last_node_name = ""
|
||||
events = []
|
||||
events_parser.open("res://events/latest_events.xml")
|
||||
|
||||
while events_parser.read() != ERR_FILE_EOF:
|
||||
var current = events.back()
|
||||
var nt = events_parser.get_node_type()
|
||||
if nt == XMLParser.NODE_TEXT:
|
||||
if last_node_name == "": continue
|
||||
current[last_node_name] = events_parser.get_node_data()
|
||||
elif nt == XMLParser.NODE_ELEMENT:
|
||||
var node_name = events_parser.get_node_name()
|
||||
if node_name == "events":
|
||||
continue
|
||||
elif node_name == "event":
|
||||
events.append({
|
||||
id = events_parser.get_named_attribute_value_safe("id"),
|
||||
date = events_parser.get_named_attribute_value_safe("date"),
|
||||
tagline = "",
|
||||
title = "",
|
||||
thumb = "",
|
||||
desc = ""
|
||||
})
|
||||
else:
|
||||
last_node_name = node_name
|
||||
else:
|
||||
last_node_name = ""
|
||||
|
||||
func mount():
|
||||
print(events)
|
||||
for event in events:
|
||||
var te = thingy_event.instantiate()
|
||||
vbc.add_child(te)
|
||||
te.event = event
|
||||
te.do_things()
|
||||
te.change_config.connect(change_config.emit)
|
||||
vbc.move_child(te, 0)
|
||||
|
||||
func _on_close_button_pressed() -> void:
|
||||
close.emit()
|
|
@ -1,5 +1,7 @@
|
|||
extends VBoxContainer
|
||||
|
||||
@onready var encounters = $"Header/Encounters"
|
||||
|
||||
@onready var osd_dwell_time = $"OSD and UI/Controls/VBoxContainer/osd_dwell_time"
|
||||
@onready var osd_fade_time = $"OSD and UI/Controls/VBoxContainer/osd_fade_time"
|
||||
@onready var osd_opacity = $"OSD and UI/Controls/VBoxContainer/osd_opacity"
|
||||
|
@ -55,9 +57,14 @@ func _ready() -> void:
|
|||
fuckwith_anims()
|
||||
fuckwith_spritesheet_anims()
|
||||
|
||||
func _on_encounters_change_config(config: Dictionary) -> void:
|
||||
for key in config:
|
||||
GlobalConfig[key] = config[key]
|
||||
GlobalConfig.save_to_file()
|
||||
get_tree().reload_current_scene()
|
||||
|
||||
func _on_back_button_pressed() -> void:
|
||||
GlobalConfig.clone_config(temp_config)
|
||||
|
||||
GlobalConfig.save_to_file()
|
||||
|
||||
var unlock_func = null
|
||||
|
|
|
@ -37,7 +37,8 @@ func _ready() -> void:
|
|||
if not DirAccess.dir_exists_absolute("user://uploads/"):
|
||||
DirAccess.make_dir_absolute("user://uploads/")
|
||||
var new_path = "user://uploads/".path_join(path.text.get_file())
|
||||
DirAccess.copy_absolute(path.text, new_path)
|
||||
var dir = DirAccess.open(path.text.get_base_dir())
|
||||
dir.copy(path.text.get_file(), new_path)
|
||||
path.text = new_path
|
||||
file_changed.emit(new_path)
|
||||
)
|
||||
|
|
|
@ -8,7 +8,7 @@ func _index_pressed(idx: int):
|
|||
elif idx == 1:
|
||||
get_tree().change_scene_to_file("res://scenes/xml_editor.tscn")
|
||||
elif idx == 2:
|
||||
get_tree().quit()
|
||||
get_tree().root.propagate_notification(NOTIFICATION_WM_CLOSE_REQUEST)
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
|
|
|
@ -456,7 +456,7 @@ func set_region_view() -> void:
|
|||
rg_oskin_prev_char.texture.region = Rect2(0,0,1,1)
|
||||
else:
|
||||
var prev_frame = cur_anim.frames[selected_frame - 1]
|
||||
rg_oskin_prev_char.position = prev_frame.frame_pos
|
||||
rg_oskin_prev_char.position = prev_frame.frame_pos + Vector2i.ONE
|
||||
rg_oskin_prev_char.texture.region = Rect2(prev_frame.pos, prev_frame.size)
|
||||
|
||||
if selected_frame + 1 >= cur_anim.frames.size() or cur_anim.frames[selected_frame + 1] == null:
|
||||
|
@ -464,7 +464,7 @@ func set_region_view() -> void:
|
|||
rg_oskin_next_char.texture.region = Rect2(0,0,1,1)
|
||||
else:
|
||||
var next_frame = cur_anim.frames[selected_frame + 1]
|
||||
rg_oskin_next_char.position = next_frame.frame_pos
|
||||
rg_oskin_next_char.position = next_frame.frame_pos + Vector2i.ONE
|
||||
rg_oskin_next_char.texture.region = Rect2(next_frame.pos, next_frame.size)
|
||||
|
||||
character.position = Vector2i(cur_frame.frame_pos) + Vector2i.ONE
|
||||
|
|
Loading…
Reference in a new issue