Add phantom camera
This commit is contained in:
253
addons/phantom_camera/panel/updater/download_update_panel.tscn
Normal file
253
addons/phantom_camera/panel/updater/download_update_panel.tscn
Normal file
@@ -0,0 +1,253 @@
|
||||
[gd_scene load_steps=15 format=3 uid="uid://b25fl4usw0nlp"]
|
||||
|
||||
[ext_resource type="Script" path="res://addons/phantom_camera/scripts/panel/updater/download_update_panel.gd" id="1_sx5xq"]
|
||||
[ext_resource type="Texture2D" uid="uid://cc0wmici0eic8" path="res://addons/phantom_camera/icons/phantom_camera_logo.png" id="2_f3yo7"]
|
||||
[ext_resource type="FontFile" uid="uid://c4mm3of2mc8o5" path="res://addons/phantom_camera/fonts/Nunito-Black.ttf" id="3_h8uk3"]
|
||||
[ext_resource type="FontFile" uid="uid://dve7mgsjik4dg" path="res://addons/phantom_camera/fonts/Nunito-Regular.ttf" id="4_gwh4i"]
|
||||
[ext_resource type="Texture2D" uid="uid://censw3w53gldn" path="res://addons/phantom_camera/assets/PhantomCameraBtnPrimaryDefault.png" id="5_bonti"]
|
||||
|
||||
[sub_resource type="ImageTexture" id="ImageTexture_sjwi2"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_insma"]
|
||||
bg_color = Color(0.0190018, 0.21903, 0.16997, 1)
|
||||
border_width_left = 2
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 2
|
||||
border_color = Color(0.0980392, 0.572549, 0.458824, 1)
|
||||
border_blend = true
|
||||
corner_radius_bottom_right = 12
|
||||
corner_radius_bottom_left = 12
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_8m63d"]
|
||||
bg_color = Color(0.0784314, 0.109804, 0.129412, 1)
|
||||
border_width_left = 2
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 2
|
||||
border_color = Color(0.105882, 0.619608, 0.498039, 1)
|
||||
corner_radius_bottom_right = 12
|
||||
corner_radius_bottom_left = 12
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_yn22d"]
|
||||
bg_color = Color(0.0117647, 0.164706, 0.12549, 1)
|
||||
border_width_left = 2
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 2
|
||||
border_color = Color(0.0980392, 0.572549, 0.458824, 1)
|
||||
border_blend = true
|
||||
corner_radius_bottom_right = 12
|
||||
corner_radius_bottom_left = 12
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_djsbc"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_xtrn6"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_o12j0"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_buptb"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_g3tf0"]
|
||||
|
||||
[node name="DownloadUpdatePanel" type="Control"]
|
||||
custom_minimum_size = Vector2(300, 350)
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_bottom = -61.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_sx5xq")
|
||||
|
||||
[node name="DownloadHTTPRequest" type="HTTPRequest" parent="."]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="Timer" type="Timer" parent="DownloadHTTPRequest"]
|
||||
one_shot = true
|
||||
|
||||
[node name="VBox" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/separation = 2
|
||||
|
||||
[node name="VBoxContainer2" type="VBoxContainer" parent="VBox"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = -20
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="VBox/VBoxContainer2"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_top = 12
|
||||
|
||||
[node name="Logo" type="TextureRect" parent="VBox/VBoxContainer2/MarginContainer"]
|
||||
unique_name_in_owner = true
|
||||
clip_contents = true
|
||||
custom_minimum_size = Vector2(300, 160)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("2_f3yo7")
|
||||
expand_mode = 3
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="VBox/VBoxContainer2"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = -5
|
||||
|
||||
[node name="NameLabel" type="Label" parent="VBox/VBoxContainer2/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.960784, 0.960784, 0.960784, 1)
|
||||
theme_override_fonts/font = ExtResource("3_h8uk3")
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "Phantom Camera"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="DownloadVersionLabel" type="Label" parent="VBox/VBoxContainer2/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.960784, 0.960784, 0.960784, 1)
|
||||
theme_override_fonts/font = ExtResource("4_gwh4i")
|
||||
theme_override_font_sizes/font_size = 18
|
||||
text = "v1.2.3 is available for download."
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="CurrentVersionLabel" type="Label" parent="VBox"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
theme_override_fonts/font = ExtResource("4_gwh4i")
|
||||
text = "Current version: 0.0.0"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Center2" type="CenterContainer" parent="VBox"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="NotesButton" type="LinkButton" parent="VBox/Center2"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.917647, 0.631373, 0.368627, 1)
|
||||
theme_override_colors/font_hover_color = Color(0.721569, 0.454902, 0.192157, 1)
|
||||
theme_override_fonts/font = ExtResource("3_h8uk3")
|
||||
theme_override_font_sizes/font_size = 18
|
||||
text = "Release Notes"
|
||||
|
||||
[node name="Center" type="CenterContainer" parent="VBox"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="VBox/Center"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="BreakingLabel" type="Label" parent="VBox/Center/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.72549, 0.227451, 0.34902, 1)
|
||||
theme_override_fonts/font = ExtResource("3_h8uk3")
|
||||
theme_override_font_sizes/font_size = 18
|
||||
text = "Potential Breaking Changes
|
||||
in new release"
|
||||
horizontal_alignment = 1
|
||||
uppercase = true
|
||||
|
||||
[node name="BreakingMarginContainer" type="MarginContainer" parent="VBox/Center/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="VBox/Center/VBoxContainer/BreakingMarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="RichTextLabel2" type="RichTextLabel" parent="VBox/Center/VBoxContainer/BreakingMarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_fonts/normal_font = ExtResource("4_gwh4i")
|
||||
theme_override_fonts/bold_font = ExtResource("3_h8uk3")
|
||||
theme_override_fonts/mono_font = ExtResource("3_h8uk3")
|
||||
theme_override_font_sizes/normal_font_size = 18
|
||||
theme_override_font_sizes/bold_font_size = 14
|
||||
theme_override_font_sizes/mono_font_size = 12
|
||||
bbcode_enabled = true
|
||||
text = "[center][b]I am prepared for any breaking
|
||||
changes that may occur from this update[/b][/center]"
|
||||
fit_content = true
|
||||
|
||||
[node name="BreakingOptionButton" type="OptionButton" parent="VBox/Center/VBoxContainer/BreakingMarginContainer/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
mouse_default_cursor_shape = 2
|
||||
theme_override_fonts/font = ExtResource("3_h8uk3")
|
||||
theme_override_font_sizes/font_size = 18
|
||||
theme_override_icons/arrow = SubResource("ImageTexture_sjwi2")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_insma")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_8m63d")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_yn22d")
|
||||
alignment = 1
|
||||
item_count = 2
|
||||
selected = 0
|
||||
popup/item_0/text = "Confirm choice"
|
||||
popup/item_0/id = 0
|
||||
popup/item_1/text = "Yes, I am prepared"
|
||||
popup/item_1/id = 1
|
||||
|
||||
[node name="DownloadButton" type="Button" parent="VBox/Center/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(240, 90)
|
||||
layout_mode = 2
|
||||
mouse_default_cursor_shape = 2
|
||||
theme_override_styles/normal = SubResource("StyleBoxEmpty_djsbc")
|
||||
theme_override_styles/hover = SubResource("StyleBoxEmpty_xtrn6")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxEmpty_o12j0")
|
||||
theme_override_styles/disabled = SubResource("StyleBoxEmpty_buptb")
|
||||
theme_override_styles/focus = SubResource("StyleBoxEmpty_g3tf0")
|
||||
|
||||
[node name="DownloadButtonBG" type="NinePatchRect" parent="VBox/Center/VBoxContainer/DownloadButton"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("5_bonti")
|
||||
patch_margin_left = 38
|
||||
patch_margin_top = 37
|
||||
patch_margin_right = 38
|
||||
patch_margin_bottom = 39
|
||||
|
||||
[node name="UpdateLabel" type="Label" parent="VBox/Center/VBoxContainer/DownloadButton"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 1
|
||||
anchors_preset = 14
|
||||
anchor_top = 0.5
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 0.5
|
||||
offset_top = -14.5
|
||||
offset_bottom = 14.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_colors/font_color = Color(0.960784, 0.960784, 0.960784, 1)
|
||||
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
|
||||
theme_override_fonts/font = ExtResource("3_h8uk3")
|
||||
theme_override_font_sizes/font_size = 20
|
||||
text = "Update"
|
||||
horizontal_alignment = 1
|
||||
uppercase = true
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="VBox"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_top = 10
|
||||
|
||||
[node name="RichTextLabel" type="RichTextLabel" parent="VBox/MarginContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_fonts/normal_font = ExtResource("4_gwh4i")
|
||||
theme_override_fonts/mono_font = ExtResource("3_h8uk3")
|
||||
theme_override_font_sizes/normal_font_size = 12
|
||||
theme_override_font_sizes/mono_font_size = 12
|
||||
bbcode_enabled = true
|
||||
text = "[center]The updater can be disabled within:
|
||||
[code]Project Settings / Phantom Camera / Updater / Enable Updater[/code][/center]"
|
||||
fit_content = true
|
||||
|
||||
[connection signal="pressed" from="VBox/Center2/NotesButton" to="." method="_on_notes_button_pressed"]
|
101
addons/phantom_camera/panel/updater/update_button.tscn
Normal file
101
addons/phantom_camera/panel/updater/update_button.tscn
Normal file
@@ -0,0 +1,101 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://cuqkqsp3ikv5u"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://c4mm3of2mc8o5" path="res://addons/phantom_camera/fonts/Nunito-Black.ttf" id="1_5e5k4"]
|
||||
[ext_resource type="Script" path="res://addons/phantom_camera/scripts/panel/updater/update_button.gd" id="1_xtaw5"]
|
||||
[ext_resource type="Texture2D" uid="uid://d4j4hrb7yusyq" path="res://addons/phantom_camera/icons/phantom_camera_updater_panel_icon.svg" id="2_c4d83"]
|
||||
[ext_resource type="PackedScene" uid="uid://b25fl4usw0nlp" path="res://addons/phantom_camera/panel/updater/download_update_panel.tscn" id="2_vtgcx"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_c7fd1"]
|
||||
content_margin_left = 10.0
|
||||
content_margin_top = 4.0
|
||||
content_margin_right = 10.0
|
||||
content_margin_bottom = 4.0
|
||||
bg_color = Color(0.0980392, 0.415686, 0.341176, 1)
|
||||
border_width_left = 2
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 2
|
||||
border_color = Color(0.227451, 0.72549, 0.603922, 1)
|
||||
corner_radius_top_left = 20
|
||||
corner_radius_top_right = 20
|
||||
corner_radius_bottom_right = 20
|
||||
corner_radius_bottom_left = 20
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_y83dj"]
|
||||
content_margin_left = 10.0
|
||||
content_margin_top = 4.0
|
||||
content_margin_right = 10.0
|
||||
content_margin_bottom = 4.0
|
||||
bg_color = Color(0.0784314, 0.109804, 0.129412, 1)
|
||||
border_width_left = 2
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 2
|
||||
border_color = Color(0.960784, 0.960784, 0.960784, 1)
|
||||
corner_radius_top_left = 20
|
||||
corner_radius_top_right = 20
|
||||
corner_radius_bottom_right = 20
|
||||
corner_radius_bottom_left = 20
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_slf6e"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_lekqh"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_dr4n4"]
|
||||
content_margin_bottom = 20.0
|
||||
bg_color = Color(0.0784314, 0.109804, 0.129412, 1)
|
||||
border_width_left = 2
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 2
|
||||
border_color = Color(0.227451, 0.72549, 0.603922, 1)
|
||||
|
||||
[node name="UpdateButton" type="Button"]
|
||||
visible = false
|
||||
offset_left = 1.0
|
||||
offset_right = 149.0
|
||||
offset_bottom = 28.0
|
||||
size_flags_vertical = 3
|
||||
theme_override_colors/font_color = Color(0.960784, 0.960784, 0.960784, 1)
|
||||
theme_override_colors/font_hover_color = Color(0.939288, 0.917743, 0.892615, 1)
|
||||
theme_override_colors/icon_normal_color = Color(0.960784, 0.960784, 0.960784, 1)
|
||||
theme_override_fonts/font = ExtResource("1_5e5k4")
|
||||
theme_override_font_sizes/font_size = 14
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_c7fd1")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_y83dj")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxEmpty_slf6e")
|
||||
theme_override_styles/focus = SubResource("StyleBoxEmpty_lekqh")
|
||||
text = "Update available"
|
||||
icon = ExtResource("2_c4d83")
|
||||
script = ExtResource("1_xtaw5")
|
||||
|
||||
[node name="HTTPRequest" type="HTTPRequest" parent="."]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="DownloadDialog" type="AcceptDialog" parent="."]
|
||||
unique_name_in_owner = true
|
||||
transparent_bg = true
|
||||
title = "New Update"
|
||||
initial_position = 2
|
||||
size = Vector2i(450, 480)
|
||||
transient = false
|
||||
unresizable = true
|
||||
borderless = true
|
||||
keep_title_visible = false
|
||||
content_scale_mode = 1
|
||||
theme_override_constants/buttons_separation = 30
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_dr4n4")
|
||||
ok_button_text = "Close"
|
||||
|
||||
[node name="DownloadUpdatePanel" parent="DownloadDialog" instance=ExtResource("2_vtgcx")]
|
||||
unique_name_in_owner = true
|
||||
offset_left = 2.0
|
||||
offset_top = 2.0
|
||||
offset_right = -2.0
|
||||
offset_bottom = -80.0
|
||||
|
||||
[node name="NeedsReloadDialog" type="ConfirmationDialog" parent="."]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="UpdateFailedDialog" type="AcceptDialog" parent="."]
|
||||
unique_name_in_owner = true
|
Reference in New Issue
Block a user