Skip to content

Commit

Permalink
0.6.4 (#234)
Browse files Browse the repository at this point in the history
* Bumping plugin version to 0.6.4

* Fixed issue where various setters for _follow_spring_arm didn't get applied at runtime (#224)

* Added support for rotational tweening for PCam2D (#225)

* Fixed stacked viewfinder issue (#226)

* Conditional updater (#232)

* Dev scenes

* Option to disable Updater
- [Added] updater_constants.gd
- [Updated] update_button.gd to conditionally trigger the update prompt based on the project settings
- [Renamed] directory test_scene/ to dev_scenes

* Updated Updater modal
- [Added] Reference note for how to disable the updater
- [Updated] Visuals and improved interaction feedback on the updater
- [Updated] Addon logo

* Added UX friction to updater
- [Updated] Updater panel with a conditional checker to add another toggle the user has to check before being able to update the addon. Appears only if the release is a major or minor one.

* Removed testing changes

* Updated 3D dev scene and script

* Updated 2D and 3D dev scenes

* Updated height for the default updater window

* Reduced update button font size
  • Loading branch information
ramokz committed Mar 19, 2024
1 parent d4fe530 commit f42cafe
Show file tree
Hide file tree
Showing 17 changed files with 1,218 additions and 58 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ export_presets.cfg
/addons/*
!/addons/phantom_camera

/dev_scenes

# Godot 4+ specific ignores
.godot/

# Docs specic ignores
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions addons/phantom_camera/icons/phantom_camera_logo.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://cc0wmici0eic8"
path="res://.godot/imported/phantom_camera_logo.png-8b8d347b5e4800c86cd8095d030a3e5a.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://addons/phantom_camera/icons/phantom_camera_logo.png"
dest_files=["res://.godot/imported/phantom_camera_logo.png-8b8d347b5e4800c86cd8095d030a3e5a.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
9 changes: 5 additions & 4 deletions addons/phantom_camera/panel/updater/UpdateButton.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ 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_fonts/font = ExtResource("1_5e5k4")
theme_override_font_sizes/font_size = 26
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")
Expand All @@ -73,14 +73,14 @@ unique_name_in_owner = true
unique_name_in_owner = true
transparent_bg = true
title = "New Update"
initial_position = 1
size = Vector2i(350, 350)
initial_position = 2
size = Vector2i(450, 480)
transient = false
unresizable = true
borderless = true
transparent = 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"

Expand All @@ -89,6 +89,7 @@ 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
Expand Down
147 changes: 130 additions & 17 deletions addons/phantom_camera/panel/updater/download_update_panel.tscn
Original file line number Diff line number Diff line change
@@ -1,11 +1,45 @@
[gd_scene load_steps=11 format=3 uid="uid://b25fl4usw0nlp"]
[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://cjli3p2b8mfyh" path="res://addons/phantom_camera/icons/PhantomCameraGlowLogo.png" id="2_a6hen"]
[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"]
Expand All @@ -17,7 +51,7 @@
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_g3tf0"]

[node name="DownloadUpdatePanel" type="Control"]
custom_minimum_size = Vector2(300, 250)
custom_minimum_size = Vector2(300, 350)
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
Expand All @@ -40,18 +74,23 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/separation = 10
theme_override_constants/separation = 2

[node name="VBoxContainer2" type="VBoxContainer" parent="VBox"]
layout_mode = 2
theme_override_constants/separation = -20

[node name="Logo" type="TextureRect" parent="VBox/VBoxContainer2"]
[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, 80)
custom_minimum_size = Vector2(300, 160)
layout_mode = 2
texture = ExtResource("2_a6hen")
texture = ExtResource("2_f3yo7")
expand_mode = 3
stretch_mode = 5

[node name="VBoxContainer" type="VBoxContainer" parent="VBox/VBoxContainer2"]
Expand All @@ -71,19 +110,92 @@ 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 = "No"
popup/item_0/id = 0
popup/item_1/text = "Yes"
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")
Expand Down Expand Up @@ -123,18 +235,19 @@ text = "Update"
horizontal_alignment = 1
uppercase = true

[node name="CurrentVersionLabel_4_2UPGRADE" type="Label" parent="VBox/Center/VBoxContainer"]
visible = false
[node name="MarginContainer" type="MarginContainer" parent="VBox"]
layout_mode = 2
theme_override_fonts/font = ExtResource("4_gwh4i")
text = "Current Version is 0.0.0"
horizontal_alignment = 1
theme_override_constants/margin_top = 10

[node name="Center2" type="CenterContainer" parent="VBox"]
[node name="RichTextLabel" type="RichTextLabel" parent="VBox/MarginContainer"]
layout_mode = 2

[node name="NotesButton" type="LinkButton" parent="VBox/Center2"]
layout_mode = 2
text = "Release Notes"
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"]
2 changes: 1 addition & 1 deletion addons/phantom_camera/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
name="Phantom Camera"
description="Control the movement and dynamically tween 2D & 3D cameras positions. Built for Godot 4. Inspired by Cinemachine."
author="Marcus Skov"
version="0.6.3"
version="0.6.4"
script="plugin.gd"
17 changes: 15 additions & 2 deletions addons/phantom_camera/plugin.gd
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ const Pcam3DPlugin = preload("res://addons/phantom_camera/gizmos/phantom_camera_

const EditorPanel = preload("res://addons/phantom_camera/panel/editor.tscn")

const updater_constants := preload("res://addons/phantom_camera/scripts/panel/updater/updater_constants.gd")

#endregion


Expand Down Expand Up @@ -42,7 +44,18 @@ func _enter_tree() -> void:
add_control_to_bottom_panel(editor_panel_instance, "Phantom Camera")
_make_visible(false)

connect("scene_changed", _scene_changed)
scene_changed.connect(_scene_changed)

## Sets Updater Disabling option for non-forked projects
if not FileAccess.file_exists("res://dev_scenes/3d/dev_scene_3d.tscn"):
if not ProjectSettings.has_setting(updater_constants.setting_updater_enabled):
ProjectSettings.set_setting(updater_constants.setting_updater_enabled, true)
ProjectSettings.set_initial_value(updater_constants.setting_updater_enabled, true)

## Adds Release console log disabler
if not ProjectSettings.has_setting(updater_constants.setting_updater_notify_release):
ProjectSettings.set_setting(updater_constants.setting_updater_notify_release, true)
ProjectSettings.set_initial_value(updater_constants.setting_updater_notify_release, true)


func _exit_tree() -> void:
Expand All @@ -55,7 +68,7 @@ func _exit_tree() -> void:
remove_control_from_bottom_panel(editor_panel_instance)
editor_panel_instance.queue_free()
# if framed_viewfinder_panel_instance:
disconnect("scene_changed", _scene_changed)
scene_changed.disconnect(_scene_changed)


#func _has_main_screen():
Expand Down
Loading

0 comments on commit f42cafe

Please sign in to comment.