Compare commits
17
Commits
v1.2
..
f6e384e221
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6e384e221 | ||
|
|
c4ee699d49 | ||
|
|
dfe34fb698 | ||
|
|
74056af39a | ||
|
|
cf1c3ceba4 | ||
|
|
5484be0028 | ||
|
|
5a06cbaf65 | ||
|
|
34f60a1bbe | ||
|
|
feec70d2ab | ||
|
|
141c62952c | ||
|
|
9c15ba991b | ||
|
|
ad07784366 | ||
|
|
4957c7ab47 | ||
|
|
dbc3e0738f | ||
|
|
c60a03228a | ||
|
|
4f303f7bf0 | ||
|
|
adea063e99 |
No files matched your search
@@ -1,7 +0,0 @@
|
|||||||
# Normalize EOL for all files that Git considers text files.
|
|
||||||
* text=auto eol=lf
|
|
||||||
|
|
||||||
# Only include the addons folder when downloading from the Asset Library.
|
|
||||||
/** export-ignore
|
|
||||||
/addons !export-ignore
|
|
||||||
/addons/** !export-ignore
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
name: Create Release
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- 'v*.*' # Triggers on version tags like v1.0
|
|
||||||
jobs:
|
|
||||||
release:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Get version from tag
|
|
||||||
id: get_version
|
|
||||||
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Get version without dots
|
|
||||||
id: version_no_dots
|
|
||||||
run: echo "VERSION_NO_DOTS=$(echo '${{ steps.get_version.outputs.VERSION }}' | tr -d '.')" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Get tag message
|
|
||||||
id: tag_message
|
|
||||||
run: |
|
|
||||||
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
|
|
||||||
echo "MESSAGE<<EOF" >> $GITHUB_OUTPUT
|
|
||||||
git tag -l --format='%(contents)' ${GITHUB_REF#refs/tags/} >> $GITHUB_OUTPUT
|
|
||||||
echo "EOF" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Create release directory
|
|
||||||
run: mkdir -p release_temp/godot-screenshots-${{ steps.version_no_dots.outputs.VERSION_NO_DOTS }}/addons/screenshots
|
|
||||||
|
|
||||||
- name: Copy plugin files
|
|
||||||
run: |
|
|
||||||
cp -r addons/screenshots/* release_temp/godot-screenshots-${{ steps.version_no_dots.outputs.VERSION_NO_DOTS }}/addons/screenshots/
|
|
||||||
cp LICENSE.md release_temp/godot-screenshots-${{ steps.version_no_dots.outputs.VERSION_NO_DOTS }}/addons/screenshots/
|
|
||||||
|
|
||||||
- name: Create ZIP archive
|
|
||||||
run: |
|
|
||||||
cd release_temp
|
|
||||||
zip -r ../godot-screenshots-${{ steps.get_version.outputs.VERSION }}.zip godot-screenshots-${{ steps.version_no_dots.outputs.VERSION_NO_DOTS }}
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
- name: Create Release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
files: godot-screenshots-${{ steps.get_version.outputs.VERSION }}.zip
|
|
||||||
body: ${{ steps.tag_message.outputs.MESSAGE }}
|
|
||||||
draft: false
|
|
||||||
prerelease: false
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
-12
@@ -1,12 +0,0 @@
|
|||||||
.godot/
|
|
||||||
.import/
|
|
||||||
|
|
||||||
|
|
||||||
# System/tool-specific ignores
|
|
||||||
.directory
|
|
||||||
.DS_Store
|
|
||||||
*~
|
|
||||||
|
|
||||||
/addons/kenyoni/plugin_reloader
|
|
||||||
/addons/explore-editor-theme
|
|
||||||
addons/screenshots/settings.cfg
|
|
||||||
-21
@@ -1,21 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2025 Davide Di Staso
|
|
||||||
|
|
||||||
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.
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
<p align="center">
|
|
||||||
<img src="store_assets/icon.svg" width=150>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
# Screenshots
|
|
||||||
Godot addon that lets you rapidly take screenshots. Supports taking bursts in multiple resolutions, locales, and formats.
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<img src="store_assets/taking_a_burst.gif">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
- Download the latest release and paste it into your Godot project
|
|
||||||
- Enable the addon in the Project Settings
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
1. Play a scene
|
|
||||||
2. (Optional) Adjust settings in the Debugger panel
|
|
||||||
3. Press the shutter button
|
|
||||||
4. View your screenshots in the Camera Roll or click on the link in the Output panel
|
|
||||||
|
|
||||||
## Configuration
|
|
||||||
Configure the addon from its Debugger panel. Settings are stored at `settings.cfg`.
|
|
||||||
### Shutter
|
|
||||||
|
|
||||||
- **Pauses game**: Pause execution while taking screenshots. Useful for ensuring consistency across burst captures.
|
|
||||||
- **Show shutter**: Toggle shutter visibility
|
|
||||||
- **Shutter sounds**: Whether to play shutter sound effect
|
|
||||||
- **Input Action**: Configure keyboard shortcut
|
|
||||||
|
|
||||||
### Resolution
|
|
||||||
- Specify one or more target sizes. The addon calls `DisplayServer.window_set_size()` for each size before capturing.
|
|
||||||
|
|
||||||
### Locales
|
|
||||||
- Select locales to load before taking screenshots.
|
|
||||||
|
|
||||||
### Save
|
|
||||||
- **Path**: Screenshot save location (default: `user://screenshots`)
|
|
||||||
- **Formats**: PNG, JPG, WEBP
|
|
||||||
- **Use subfolders**: Organize bursts into folders with this structure `$PROJECTNAME_$TIMESTAMP/$LOCALE/$RESOLUTION`
|
|
||||||
|
|
||||||
## API
|
|
||||||
Accessible through the `Screenshots` singleton.
|
|
||||||
### Methods
|
|
||||||
|
|
||||||
```gdscript
|
|
||||||
take_burst()
|
|
||||||
```
|
|
||||||
Takes one or more screenshots (a burst) using settings specified in the Debugger panel.
|
|
||||||
|
|
||||||
### Signals
|
|
||||||
```gdscript
|
|
||||||
burst_starting
|
|
||||||
```
|
|
||||||
Fires before capture. Use this to hide debug UI elements.
|
|
||||||
|
|
||||||
```gdscript
|
|
||||||
image_captured(image: Image)
|
|
||||||
```
|
|
||||||
Fires after each individual capture.
|
|
||||||
|
|
||||||
```gdscript
|
|
||||||
burst_ended
|
|
||||||
```
|
|
||||||
Fires after the burst is completed. Use it to unhide debug UI elements.
|
|
||||||
|
|
||||||
## Version Compatibility
|
|
||||||
Tested on Godot 4.5 (Linux and macOS)
|
|
||||||
|
|
||||||
## Support
|
|
||||||
For bugs and feature requests, please open an issue. Additional questions? Email [hello@pumpkintree.games](mailto:hello@pumpkintree.games)
|
|
||||||
|
|
||||||
## Credits
|
|
||||||
- Developed by [Davide Di Staso](http://www.pumpkintree.games)
|
|
||||||
- Screenshots addon icon based on modified Godot Editor icons
|
|
||||||
- Shutter icon by [Bootstrap](https://github.com/twbs/icons)
|
|
||||||
- Shutter sound effect by [ALEXIS_GAMING_CAM](https://pixabay.com/users/alexis_gaming_cam-50011695/) from [Pixabay](https://pixabay.com/)
|
|
||||||
- [Editor Theme Explorer](https://github.com/YuriSizov/godot-editor-theme-explorer) by Yuri Sizov and [Godot Plugin Reloader](https://github.com/kenyoni-software/godot-addons) by Iceflower have been used during development
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
@tool
|
|
||||||
extends EditorDebuggerPlugin
|
|
||||||
|
|
||||||
var session_id_to_editor_panel : Dictionary = {}
|
|
||||||
|
|
||||||
func _setup_session(p_session_id : int) -> void:
|
|
||||||
var editor_panel : Control = preload("res://addons/screenshots/debugger/bottom_panel/bottom_panel.tscn").instantiate()
|
|
||||||
var editor_debugger_session : EditorDebuggerSession = get_session(p_session_id)
|
|
||||||
|
|
||||||
var _success : int = editor_debugger_session.started.connect(editor_panel.on_session_started)
|
|
||||||
editor_debugger_session.add_session_tab(editor_panel)
|
|
||||||
session_id_to_editor_panel[p_session_id] = editor_panel
|
|
||||||
|
|
||||||
func _has_capture(p_prefix : String) -> bool:
|
|
||||||
return p_prefix == "screenshot"
|
|
||||||
|
|
||||||
func _capture(p_message : String, p_data : Array, p_session_id : int) -> bool:
|
|
||||||
var editor_panel : Control = session_id_to_editor_panel[p_session_id]
|
|
||||||
return editor_panel.on_editor_debugger_plugin_capture(p_message, p_data)
|
|
||||||
File renamed without changes.
|
Before Width: | Height: | Size: 460 B After Width: | Height: | Size: 460 B |
File renamed without changes.
File renamed without changes.
File renamed without changes.
+64
-39
@@ -1,5 +1,4 @@
|
|||||||
extends Window
|
extends Window
|
||||||
|
|
||||||
## Godot addon that lets you rapidly take screenshots. Supports taking bursts in multiple resolutions, locales, and formats.
|
## Godot addon that lets you rapidly take screenshots. Supports taking bursts in multiple resolutions, locales, and formats.
|
||||||
|
|
||||||
@export var _local_data: Node
|
@export var _local_data: Node
|
||||||
@@ -15,6 +14,7 @@ signal burst_ended
|
|||||||
|
|
||||||
var _input_action: String
|
var _input_action: String
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
var saved_position = _local_data.settings.load_value("misc", "ShutterWindowPosition")
|
var saved_position = _local_data.settings.load_value("misc", "ShutterWindowPosition")
|
||||||
if saved_position:
|
if saved_position:
|
||||||
@@ -22,21 +22,23 @@ func _ready() -> void:
|
|||||||
old_position = position
|
old_position = position
|
||||||
var only_run_in_editor = _local_data.settings.load_value("misc", "OnlyRunInEditorCheckBox", true)
|
var only_run_in_editor = _local_data.settings.load_value("misc", "OnlyRunInEditorCheckBox", true)
|
||||||
visible = _local_data.settings.load_value("misc", "ShowShutterCheckBox", true)
|
visible = _local_data.settings.load_value("misc", "ShowShutterCheckBox", true)
|
||||||
|
|
||||||
if only_run_in_editor and not OS.has_feature("editor"):
|
if only_run_in_editor and not OS.has_feature("editor"):
|
||||||
set_process_input(false)
|
set_process_input(false)
|
||||||
hide()
|
hide()
|
||||||
return
|
return
|
||||||
|
|
||||||
_input_action = _local_data.settings.load_value("misc", "InputActionLineEdit", "")
|
_input_action = _local_data.settings.load_value("misc", "InputActionLineEdit", "")
|
||||||
%ShutterButton.pressed.connect(take_burst)
|
%ShutterButton.pressed.connect(take_burst)
|
||||||
close_requested.connect(_on_close_requested)
|
close_requested.connect(_on_close_requested)
|
||||||
|
|
||||||
|
|
||||||
func _on_close_requested() -> void:
|
func _on_close_requested() -> void:
|
||||||
hide()
|
hide()
|
||||||
|
|
||||||
var old_position : Vector2i
|
|
||||||
|
var old_position: Vector2i
|
||||||
|
|
||||||
|
|
||||||
func _input(event: InputEvent) -> void:
|
func _input(event: InputEvent) -> void:
|
||||||
if old_position != position:
|
if old_position != position:
|
||||||
@@ -53,39 +55,47 @@ func take_burst() -> void:
|
|||||||
var old_position = position
|
var old_position = position
|
||||||
_local_data.settings.load_config()
|
_local_data.settings.load_config()
|
||||||
burst_starting.emit()
|
burst_starting.emit()
|
||||||
|
|
||||||
|
var stretch_mode = get_tree().root.content_scale_mode
|
||||||
|
var is_embedded = Engine.is_embedded_in_editor()
|
||||||
|
|
||||||
var pause_game = _local_data.settings.load_value("misc", "PausesGameCheckBox", true)
|
var pause_game = _local_data.settings.load_value("misc", "PausesGameCheckBox", true)
|
||||||
var shutter_was_visible = visible
|
var shutter_was_visible = visible
|
||||||
var sizes = _local_data.settings.load_value("misc", "Sizes", [])
|
|
||||||
|
var def_width = ProjectSettings.get_setting("display/window/size/viewport_width")
|
||||||
|
var def_height = ProjectSettings.get_setting("display/window/size/viewport_height")
|
||||||
|
|
||||||
|
var sizes = _local_data.settings.load_value("misc", "Sizes", [Vector2i(def_width, def_height)])
|
||||||
var locales = _local_data.settings.load_value("misc", "Locales", ["none"])
|
var locales = _local_data.settings.load_value("misc", "Locales", ["none"])
|
||||||
var previous_locale = TranslationServer.get_locale()
|
var previous_locale = TranslationServer.get_locale()
|
||||||
hide()
|
hide()
|
||||||
|
|
||||||
var tree = get_tree()
|
var tree = get_tree()
|
||||||
var game_was_paused = tree.paused
|
var game_was_paused = tree.paused
|
||||||
if pause_game:
|
if pause_game:
|
||||||
tree.paused = true
|
tree.paused = true
|
||||||
var prev_size = DisplayServer.window_get_size()
|
var prev_size = DisplayServer.window_get_size()
|
||||||
|
|
||||||
|
if stretch_mode == CONTENT_SCALE_MODE_VIEWPORT:
|
||||||
|
prev_size = get_tree().root.get_viewport().content_scale_size
|
||||||
|
|
||||||
# Take screenshots for each configured size
|
# Take screenshots for each configured size
|
||||||
for s in sizes:
|
for s in sizes:
|
||||||
DisplayServer.window_set_size(s)
|
set_resolution(s, stretch_mode)
|
||||||
await get_tree().create_timer(0.01).timeout
|
await RenderingServer.frame_post_draw
|
||||||
|
|
||||||
for locale in locales:
|
for locale in locales:
|
||||||
var locale_to_set = locale
|
var locale_to_set = locale
|
||||||
|
|
||||||
if locale == "none":
|
if locale == "none":
|
||||||
locale_to_set = previous_locale
|
locale_to_set = previous_locale
|
||||||
|
|
||||||
TranslationServer.set_locale(locale_to_set)
|
TranslationServer.set_locale(locale_to_set)
|
||||||
await get_tree().process_frame
|
await RenderingServer.frame_post_draw
|
||||||
save_image()
|
save_image()
|
||||||
|
|
||||||
TranslationServer.set_locale(previous_locale)
|
TranslationServer.set_locale(previous_locale)
|
||||||
DisplayServer.window_set_size(prev_size)
|
set_resolution(prev_size, stretch_mode)
|
||||||
|
|
||||||
|
|
||||||
tree.paused = game_was_paused
|
tree.paused = game_was_paused
|
||||||
visible = shutter_was_visible
|
visible = shutter_was_visible
|
||||||
@@ -93,20 +103,35 @@ func take_burst() -> void:
|
|||||||
print_rich("[color=green][Screenshots] Done![/color]")
|
print_rich("[color=green][Screenshots] Done![/color]")
|
||||||
position = old_position
|
position = old_position
|
||||||
|
|
||||||
|
func set_resolution(resolution: Vector2i, stretch_mode: ContentScaleMode) -> void:
|
||||||
|
var screen_resolution = DisplayServer.screen_get_size()
|
||||||
|
match stretch_mode:
|
||||||
|
CONTENT_SCALE_MODE_VIEWPORT:
|
||||||
|
get_tree().root.get_viewport().content_scale_size = resolution
|
||||||
|
_:
|
||||||
|
if resolution > screen_resolution:
|
||||||
|
print_rich("[color=yellow][Screenshots] Warning! You are trying to take a screenshot at %dx%d, but your screen size is %dx%d" % [resolution.x, resolution.y, screen_resolution.x, screen_resolution.y])
|
||||||
|
print("[color=yellow][Screenshots] To take a screenshot larger than your screen size, use the 'viewport' stretch mode (Project Settings > Stretch > Mode)")
|
||||||
|
DisplayServer.window_set_size(resolution)
|
||||||
|
|
||||||
func save_image() -> void:
|
func save_image() -> void:
|
||||||
var locale = TranslationServer.get_locale()
|
var locale = TranslationServer.get_locale()
|
||||||
var timestamp = Time.get_time_string_from_system()
|
var timestamp = Time.get_time_string_from_system()
|
||||||
var play_shutter_sounds = _local_data.settings.load_value("misc", "ShutterSoundsCheckBox", true)
|
var play_shutter_sounds = _local_data.settings.load_value("misc", "ShutterSoundsCheckBox", true)
|
||||||
# Save the screenshot
|
# Save the screenshot
|
||||||
var image = get_parent().get_viewport().get_texture().get_image()
|
var image = get_tree().root.get_viewport().get_texture().get_image()
|
||||||
|
if get_tree().root.get_viewport().use_hdr_2d:
|
||||||
|
if image.get_format() != Image.FORMAT_RGB8:
|
||||||
|
image.convert(Image.FORMAT_RGB8)
|
||||||
|
image.linear_to_srgb()
|
||||||
image_captured.emit(image)
|
image_captured.emit(image)
|
||||||
|
|
||||||
if play_shutter_sounds:
|
if play_shutter_sounds:
|
||||||
%AudioStreamPlayer.play()
|
%AudioStreamPlayer.play()
|
||||||
var save_folder: String = _local_data.settings.load_value("misc", "PathLineEdit", "user://screenshots")
|
var save_folder: String = _local_data.settings.load_value("misc", "PathLineEdit", "user://screenshots")
|
||||||
var project_title = ProjectSettings.get_setting("application/config/name")
|
var project_title = ProjectSettings.get_setting("application/config/name")
|
||||||
var screenshot_size = image.get_size()
|
var screenshot_size = image.get_size()
|
||||||
|
|
||||||
# Build the save path with optional subfolders
|
# Build the save path with optional subfolders
|
||||||
var target_folder = save_folder
|
var target_folder = save_folder
|
||||||
if _local_data.settings.load_value("misc", "UseSubFoldersCheckBox", false):
|
if _local_data.settings.load_value("misc", "UseSubFoldersCheckBox", false):
|
||||||
@@ -114,55 +139,55 @@ func save_image() -> void:
|
|||||||
var timestamp_folder = "%s_%s" % [project_title, timestamp.replace(":", "-")]
|
var timestamp_folder = "%s_%s" % [project_title, timestamp.replace(":", "-")]
|
||||||
var locale_folder = locale
|
var locale_folder = locale
|
||||||
var resolution_folder = "%dx%d" % [screenshot_size.x, screenshot_size.y]
|
var resolution_folder = "%dx%d" % [screenshot_size.x, screenshot_size.y]
|
||||||
|
|
||||||
target_folder = save_folder.path_join(timestamp_folder).path_join(locale_folder).path_join(resolution_folder)
|
target_folder = save_folder.path_join(timestamp_folder).path_join(locale_folder).path_join(resolution_folder)
|
||||||
|
|
||||||
# Ensure target folder exists
|
# Ensure target folder exists
|
||||||
if not DirAccess.dir_exists_absolute(target_folder):
|
if not DirAccess.dir_exists_absolute(target_folder):
|
||||||
DirAccess.make_dir_recursive_absolute(target_folder)
|
DirAccess.make_dir_recursive_absolute(target_folder)
|
||||||
|
|
||||||
var formats = {
|
var formats = {
|
||||||
"PNGCheckBox": ["png", image.save_png, true],
|
"PNGCheckBox": ["png", image.save_png, true],
|
||||||
"JPGCheckBox": ["jpg", image.save_jpg, false],
|
"JPGCheckBox": ["jpg", image.save_jpg, false],
|
||||||
"WEBPCheckBox": ["webp", image.save_webp, false]
|
"WEBPCheckBox": ["webp", image.save_webp, false],
|
||||||
}
|
}
|
||||||
|
|
||||||
for setting_key in formats:
|
for setting_key in formats:
|
||||||
var default = formats[setting_key][2]
|
var default = formats[setting_key][2]
|
||||||
if _local_data.settings.load_value("misc", setting_key, default):
|
if _local_data.settings.load_value("misc", setting_key, default):
|
||||||
var extension = formats[setting_key][0]
|
var extension = formats[setting_key][0]
|
||||||
var save_method = formats[setting_key][1]
|
var save_method = formats[setting_key][1]
|
||||||
|
|
||||||
var filename: String
|
var filename: String
|
||||||
if _local_data.settings.load_value("misc", "UseSubFoldersCheckBox", false):
|
if _local_data.settings.load_value("misc", "UseSubFoldersCheckBox", false):
|
||||||
filename = "%s_%s" % [project_title, timestamp.replace(":", "-")]
|
filename = "%s_%s" % [project_title, timestamp.replace(":", "-")]
|
||||||
else:
|
else:
|
||||||
filename = "%s_%s_%s_%dx%d" % [project_title, timestamp.replace(":", "-"), locale, screenshot_size.x, screenshot_size.y]
|
filename = "%s_%s_%s_%dx%d" % [project_title, timestamp.replace(":", "-"), locale, screenshot_size.x, screenshot_size.y]
|
||||||
|
|
||||||
var file_path = target_folder.path_join("%s.%s" % [filename, extension])
|
var file_path = target_folder.path_join("%s.%s" % [filename, extension])
|
||||||
|
|
||||||
# Get unique filepath to avoid overwriting
|
# Get unique filepath to avoid overwriting
|
||||||
file_path = get_unique_filepath(file_path)
|
file_path = get_unique_filepath(file_path)
|
||||||
|
|
||||||
save_method.call(file_path)
|
save_method.call(file_path)
|
||||||
EngineDebugger.send_message("screenshot:taken", [file_path, timestamp, locale])
|
EngineDebugger.send_message("screenshot:taken", [file_path, timestamp, locale])
|
||||||
|
|
||||||
print_rich("[Screenshots] Saved at: [url=%s]%s[/url]" % [ProjectSettings.globalize_path(file_path.get_base_dir()), file_path])
|
print_rich("[Screenshots] Saved at: [url=%s]%s[/url]" % [ProjectSettings.globalize_path(file_path.get_base_dir()), file_path])
|
||||||
|
|
||||||
|
|
||||||
func get_unique_filepath(base_path: String) -> String:
|
func get_unique_filepath(base_path: String) -> String:
|
||||||
if not FileAccess.file_exists(base_path):
|
if not FileAccess.file_exists(base_path):
|
||||||
return base_path
|
return base_path
|
||||||
|
|
||||||
var dir = base_path.get_base_dir()
|
var dir = base_path.get_base_dir()
|
||||||
var filename = base_path.get_file().get_basename()
|
var filename = base_path.get_file().get_basename()
|
||||||
var extension = base_path.get_extension()
|
var extension = base_path.get_extension()
|
||||||
|
|
||||||
var counter = 1
|
var counter = 1
|
||||||
var new_path = "%s/%s_%d.%s" % [dir, filename, counter, extension]
|
var new_path = "%s/%s_%d.%s" % [dir, filename, counter, extension]
|
||||||
|
|
||||||
while FileAccess.file_exists(new_path):
|
while FileAccess.file_exists(new_path):
|
||||||
counter += 1
|
counter += 1
|
||||||
new_path = "%s/%s_%d.%s" % [dir, filename, counter, extension]
|
new_path = "%s/%s_%d.%s" % [dir, filename, counter, extension]
|
||||||
|
|
||||||
return new_path
|
return new_path
|
||||||
|
|
||||||
File renamed without changes.
File renamed without changes.
+10
-4
@@ -3,43 +3,49 @@ extends Control
|
|||||||
|
|
||||||
@export var nodes_to_save: Array[Node]
|
@export var nodes_to_save: Array[Node]
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
load_nodes_from_config(nodes_to_save)
|
load_nodes_from_config(nodes_to_save)
|
||||||
setup_auto_save(nodes_to_save)
|
setup_auto_save(nodes_to_save)
|
||||||
|
|
||||||
|
|
||||||
func save_nodes_to_config(p_nodes_to_save: Array[Node]) -> void:
|
func save_nodes_to_config(p_nodes_to_save: Array[Node]) -> void:
|
||||||
for node in p_nodes_to_save:
|
for node in p_nodes_to_save:
|
||||||
var key = node.name
|
var key = node.name
|
||||||
var value = null
|
var value = null
|
||||||
|
|
||||||
if node is CheckBox:
|
if node is CheckBox:
|
||||||
value = node.button_pressed
|
value = node.button_pressed
|
||||||
%LocalData.settings.save("misc", key, value)
|
%LocalData.settings.save("misc", key, value)
|
||||||
|
|
||||||
if node is LineEdit:
|
if node is LineEdit:
|
||||||
value = node.text
|
value = node.text
|
||||||
%LocalData.settings.save("misc", key, value)
|
%LocalData.settings.save("misc", key, value)
|
||||||
|
|
||||||
|
|
||||||
func load_nodes_from_config(p_nodes_to_load: Array[Node]) -> void:
|
func load_nodes_from_config(p_nodes_to_load: Array[Node]) -> void:
|
||||||
for node in p_nodes_to_load:
|
for node in p_nodes_to_load:
|
||||||
var value = %LocalData.settings.load_value("misc", node.name)
|
var value = %LocalData.settings.load_value("misc", node.name)
|
||||||
if value != null:
|
if value != null:
|
||||||
if node is CheckBox:
|
if node is CheckBox:
|
||||||
node.button_pressed = value
|
node.button_pressed = value
|
||||||
|
|
||||||
if node is LineEdit:
|
if node is LineEdit:
|
||||||
node.text = value
|
node.text = value
|
||||||
|
|
||||||
|
|
||||||
func setup_auto_save(nodes: Array[Node]) -> void:
|
func setup_auto_save(nodes: Array[Node]) -> void:
|
||||||
for node in nodes:
|
for node in nodes:
|
||||||
if node is CheckBox:
|
if node is CheckBox:
|
||||||
node.toggled.connect(func(_toggled): save_nodes_to_config([node]))
|
node.toggled.connect(func(_toggled): save_nodes_to_config([node]))
|
||||||
if node is LineEdit:
|
if node is LineEdit:
|
||||||
node.text_changed.connect(func(_new_text): save_nodes_to_config([node]))
|
node.text_changed.connect(func(_new_text): save_nodes_to_config([node]))
|
||||||
|
|
||||||
|
|
||||||
func on_session_started() -> void:
|
func on_session_started() -> void:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
func on_editor_debugger_plugin_capture(p_message, p_data) -> bool:
|
func on_editor_debugger_plugin_capture(p_message, p_data) -> bool:
|
||||||
if p_message == "screenshot:taken":
|
if p_message == "screenshot:taken":
|
||||||
%CameraRoll.add_preview(p_data[0], p_data[1], p_data[2])
|
%CameraRoll.add_preview(p_data[0], p_data[1], p_data[2])
|
||||||
File renamed without changes.
File renamed without changes.
+12
-7
@@ -6,7 +6,9 @@ extends VBoxContainer
|
|||||||
|
|
||||||
const SCREENSHOT_PREVIEW = preload("res://addons/screenshots/debugger/bottom_panel/screenshot_preview/screenshot_preview.tscn")
|
const SCREENSHOT_PREVIEW = preload("res://addons/screenshots/debugger/bottom_panel/screenshot_preview/screenshot_preview.tscn")
|
||||||
|
|
||||||
var roll_directory : String
|
var roll_directory: String
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
%RollPanelContainer.add_theme_stylebox_override("panel", get_theme_stylebox("panel", "ItemListSecondary"))
|
%RollPanelContainer.add_theme_stylebox_override("panel", get_theme_stylebox("panel", "ItemListSecondary"))
|
||||||
%CameraRollIcon.texture = get_theme_icon("CameraTexture", "EditorIcons")
|
%CameraRollIcon.texture = get_theme_icon("CameraTexture", "EditorIcons")
|
||||||
@@ -15,33 +17,36 @@ func _ready() -> void:
|
|||||||
local_data.settings.value_changed.connect(_on_local_data_changed)
|
local_data.settings.value_changed.connect(_on_local_data_changed)
|
||||||
%DirectoryWatcher.files_deleted.connect(_on_files_deleted)
|
%DirectoryWatcher.files_deleted.connect(_on_files_deleted)
|
||||||
|
|
||||||
|
|
||||||
func _on_files_deleted(files: PackedStringArray) -> void:
|
func _on_files_deleted(files: PackedStringArray) -> void:
|
||||||
for file in files:
|
for file in files:
|
||||||
for preview in previews_container.get_children():
|
for preview in previews_container.get_children():
|
||||||
if ProjectSettings.globalize_path(preview.path) == ProjectSettings.localize_path(file):
|
if ProjectSettings.globalize_path(preview.path) == ProjectSettings.localize_path(file):
|
||||||
preview.queue_free()
|
preview.queue_free()
|
||||||
|
|
||||||
|
|
||||||
func _on_local_data_changed(section: String, key: String, new_value) -> void:
|
func _on_local_data_changed(section: String, key: String, new_value) -> void:
|
||||||
if not key == "PathLineEdit":
|
if not key == "PathLineEdit":
|
||||||
return
|
return
|
||||||
|
|
||||||
%DirectoryWatcher.remove_scan_directory(roll_directory)
|
%DirectoryWatcher.remove_scan_directory(roll_directory)
|
||||||
roll_directory = new_value
|
roll_directory = new_value
|
||||||
%DirectoryWatcher.add_scan_directory(roll_directory)
|
%DirectoryWatcher.add_scan_directory(roll_directory)
|
||||||
|
|
||||||
|
|
||||||
func add_preview(file_path: String, timestamp: String, locale: String) -> void:
|
func add_preview(file_path: String, timestamp: String, locale: String) -> void:
|
||||||
var s = SCREENSHOT_PREVIEW.instantiate()
|
var s = SCREENSHOT_PREVIEW.instantiate()
|
||||||
var image = Image.load_from_file(file_path)
|
var image = Image.load_from_file(file_path)
|
||||||
var texture = ImageTexture.create_from_image(image)
|
var texture = ImageTexture.create_from_image(image)
|
||||||
s.texture = texture
|
s.texture = texture
|
||||||
|
|
||||||
s.path = file_path
|
s.path = file_path
|
||||||
s.locale = locale
|
s.locale = locale
|
||||||
previews_container.add_child(s)
|
previews_container.add_child(s)
|
||||||
|
|
||||||
|
|
||||||
func get_all_previews_paths() -> Array[String]:
|
func get_all_previews_paths() -> Array[String]:
|
||||||
var arr : Array[String] = []
|
var arr: Array[String] = []
|
||||||
for preview in previews_container.get_children():
|
for preview in previews_container.get_children():
|
||||||
arr.append(preview.path)
|
arr.append(preview.path)
|
||||||
return arr
|
return arr
|
||||||
File renamed without changes.
+4
-2
@@ -7,10 +7,12 @@ func _ready() -> void:
|
|||||||
%DeleteAllButton.pressed.connect(_on_delete_all_button_pressed)
|
%DeleteAllButton.pressed.connect(_on_delete_all_button_pressed)
|
||||||
%OpenFolderButton.icon = get_theme_icon("Filesystem", "EditorIcons")
|
%OpenFolderButton.icon = get_theme_icon("Filesystem", "EditorIcons")
|
||||||
%OpenFolderButton.pressed.connect(_on_open_folder_button_pressed)
|
%OpenFolderButton.pressed.connect(_on_open_folder_button_pressed)
|
||||||
|
|
||||||
|
|
||||||
func _on_open_folder_button_pressed() -> void:
|
func _on_open_folder_button_pressed() -> void:
|
||||||
OS.shell_open(ProjectSettings.globalize_path(%PathLineEdit.text))
|
OS.shell_open(ProjectSettings.globalize_path(%PathLineEdit.text))
|
||||||
|
|
||||||
|
|
||||||
func _on_delete_all_button_pressed() -> void:
|
func _on_delete_all_button_pressed() -> void:
|
||||||
for c in %RollHFlowContainer.get_children():
|
for c in %RollHFlowContainer.get_children():
|
||||||
var path = c.path
|
var path = c.path
|
||||||
File renamed without changes.
+23
-19
@@ -29,19 +29,19 @@
|
|||||||
|
|
||||||
@tool
|
@tool
|
||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
## Scans the provided directory (or directories) and informs about file changes. The scan is done periodically with configurable speed.
|
## Scans the provided directory (or directories) and informs about file changes. The scan is done periodically with configurable speed.
|
||||||
|
|
||||||
class WatchedDirectory:
|
class WatchedDirectory:
|
||||||
var first_scan := true
|
var first_scan := true
|
||||||
var new: PackedStringArray
|
var new: PackedStringArray
|
||||||
var modified: PackedStringArray
|
var modified: PackedStringArray
|
||||||
var current: Dictionary#[String, int]
|
var current: Dictionary #[String, int]
|
||||||
var previous: Dictionary#[String, int]
|
var previous: Dictionary #[String, int]
|
||||||
|
|
||||||
|
|
||||||
var _directory := DirAccess.open(".")
|
var _directory := DirAccess.open(".")
|
||||||
|
|
||||||
var _directory_list: Dictionary#[String, WatchedDirectory]
|
var _directory_list: Dictionary #[String, WatchedDirectory]
|
||||||
var _directory_cache: Array[String]
|
var _directory_cache: Array[String]
|
||||||
var _to_delete: Array
|
var _to_delete: Array
|
||||||
|
|
||||||
@@ -62,44 +62,48 @@ signal files_modified(files: PackedStringArray)
|
|||||||
## Emitted when files are deleted in the scanned directories.
|
## Emitted when files are deleted in the scanned directories.
|
||||||
signal files_deleted(files: PackedStringArray)
|
signal files_deleted(files: PackedStringArray)
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
_current_delay = scan_delay
|
_current_delay = scan_delay
|
||||||
_remaining_steps = scan_step
|
_remaining_steps = scan_step
|
||||||
_directory.include_hidden = true
|
_directory.include_hidden = true
|
||||||
|
|
||||||
|
|
||||||
## Adds a directory that will be scanned. You can add more than 1. Only supports absolute paths and res://, user://.
|
## Adds a directory that will be scanned. You can add more than 1. Only supports absolute paths and res://, user://.
|
||||||
func add_scan_directory(directory: String):
|
func add_scan_directory(directory: String):
|
||||||
directory = ProjectSettings.globalize_path(directory)
|
directory = ProjectSettings.globalize_path(directory)
|
||||||
_directory_list[directory] = WatchedDirectory.new()
|
_directory_list[directory] = WatchedDirectory.new()
|
||||||
_directory_cache.assign(_directory_list.keys())
|
_directory_cache.assign(_directory_list.keys())
|
||||||
|
|
||||||
|
|
||||||
## Removes a scanned directory. Does nothing if the directory wasn't added.
|
## Removes a scanned directory. Does nothing if the directory wasn't added.
|
||||||
func remove_scan_directory(directory: String):
|
func remove_scan_directory(directory: String):
|
||||||
directory = ProjectSettings.globalize_path(directory)
|
directory = ProjectSettings.globalize_path(directory)
|
||||||
_to_delete.append(directory)
|
_to_delete.append(directory)
|
||||||
|
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
if _directory_list.is_empty():
|
if _directory_list.is_empty():
|
||||||
push_error("No directory to watch. Please kill me ;_;")
|
push_error("No directory to watch. Please kill me ;_;")
|
||||||
return
|
return
|
||||||
|
|
||||||
if _current_delay > 0:
|
if _current_delay > 0:
|
||||||
_current_delay -= delta
|
_current_delay -= delta
|
||||||
return
|
return
|
||||||
|
|
||||||
while _remaining_steps > 0:
|
while _remaining_steps > 0:
|
||||||
if _current_directory_name.is_empty():
|
if _current_directory_name.is_empty():
|
||||||
_current_directory_name = _directory_cache[_current_directory_index]
|
_current_directory_name = _directory_cache[_current_directory_index]
|
||||||
_directory.change_dir(_current_directory_name)
|
_directory.change_dir(_current_directory_name)
|
||||||
_directory.list_dir_begin()
|
_directory.list_dir_begin()
|
||||||
|
|
||||||
var directory: WatchedDirectory = _directory_list[_current_directory_name]
|
var directory: WatchedDirectory = _directory_list[_current_directory_name]
|
||||||
|
|
||||||
var file := _directory.get_next()
|
var file := _directory.get_next()
|
||||||
if file.is_empty():
|
if file.is_empty():
|
||||||
_current_directory_index += 1
|
_current_directory_index += 1
|
||||||
_current_directory_name = ""
|
_current_directory_name = ""
|
||||||
|
|
||||||
if directory.first_scan:
|
if directory.first_scan:
|
||||||
directory.new.clear()
|
directory.new.clear()
|
||||||
directory.modified.clear()
|
directory.modified.clear()
|
||||||
@@ -108,41 +112,41 @@ func _process(delta: float) -> void:
|
|||||||
if not directory.new.is_empty():
|
if not directory.new.is_empty():
|
||||||
files_created.emit(directory.new)
|
files_created.emit(directory.new)
|
||||||
directory.new.clear()
|
directory.new.clear()
|
||||||
|
|
||||||
if not directory.modified.is_empty():
|
if not directory.modified.is_empty():
|
||||||
files_modified.emit(directory.modified)
|
files_modified.emit(directory.modified)
|
||||||
directory.modified.clear()
|
directory.modified.clear()
|
||||||
|
|
||||||
var deleted: PackedStringArray
|
var deleted: PackedStringArray
|
||||||
for path in directory.previous:
|
for path in directory.previous:
|
||||||
if not path in directory.current:
|
if not path in directory.current:
|
||||||
deleted.append(_directory.get_current_dir().path_join(path))
|
deleted.append(_directory.get_current_dir().path_join(path))
|
||||||
|
|
||||||
if not deleted.is_empty():
|
if not deleted.is_empty():
|
||||||
files_deleted.emit(deleted)
|
files_deleted.emit(deleted)
|
||||||
|
|
||||||
directory.previous = directory.current
|
directory.previous = directory.current
|
||||||
directory.current = {}
|
directory.current = { }
|
||||||
|
|
||||||
if _current_directory_index == _directory_list.size():
|
if _current_directory_index == _directory_list.size():
|
||||||
if not _to_delete.is_empty():
|
if not _to_delete.is_empty():
|
||||||
for dir in _to_delete:
|
for dir in _to_delete:
|
||||||
_directory_list.erase(dir)
|
_directory_list.erase(dir)
|
||||||
|
|
||||||
_current_directory_index = 0
|
_current_directory_index = 0
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
if _directory.current_is_dir():
|
if _directory.current_is_dir():
|
||||||
continue
|
continue
|
||||||
var full_file := _directory.get_current_dir().path_join(file)
|
var full_file := _directory.get_current_dir().path_join(file)
|
||||||
|
|
||||||
directory.current[file] = FileAccess.get_modified_time(full_file)
|
directory.current[file] = FileAccess.get_modified_time(full_file)
|
||||||
if directory.previous.get(file, -1) == -1:
|
if directory.previous.get(file, -1) == -1:
|
||||||
directory.new.append(full_file)
|
directory.new.append(full_file)
|
||||||
elif directory.current[file] > directory.previous[file]:
|
elif directory.current[file] > directory.previous[file]:
|
||||||
directory.modified.append(full_file)
|
directory.modified.append(full_file)
|
||||||
|
|
||||||
_remaining_steps -= 1
|
_remaining_steps -= 1
|
||||||
|
|
||||||
_remaining_steps = scan_step
|
_remaining_steps = scan_step
|
||||||
_current_delay = scan_delay
|
_current_delay = scan_delay
|
||||||
File renamed without changes.
+14
-9
@@ -6,6 +6,7 @@ extends FoldableContainer
|
|||||||
@export var select_all_button: Button
|
@export var select_all_button: Button
|
||||||
@export var deselect_all_button: Button
|
@export var deselect_all_button: Button
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
var saved_locales = local_data.settings.load_value("misc", "Locales", ["none"])
|
var saved_locales = local_data.settings.load_value("misc", "Locales", ["none"])
|
||||||
for l in TranslationServer.get_loaded_locales():
|
for l in TranslationServer.get_loaded_locales():
|
||||||
@@ -14,26 +15,29 @@ func _ready() -> void:
|
|||||||
if saved_locales.has(l):
|
if saved_locales.has(l):
|
||||||
n.button_pressed = true
|
n.button_pressed = true
|
||||||
locales_container.add_child(n)
|
locales_container.add_child(n)
|
||||||
|
|
||||||
for c : CheckBox in locales_container.get_children():
|
for c: CheckBox in locales_container.get_children():
|
||||||
c.toggled.connect(_on_locale_toggled)
|
c.toggled.connect(_on_locale_toggled)
|
||||||
|
|
||||||
select_all_button.pressed.connect(_set_all_locales_pressed.bind(true))
|
select_all_button.pressed.connect(_set_all_locales_pressed.bind(true))
|
||||||
deselect_all_button.pressed.connect(_set_all_locales_pressed.bind(false))
|
deselect_all_button.pressed.connect(_set_all_locales_pressed.bind(false))
|
||||||
select_all_button.icon = get_theme_icon("ThemeSelectAll", "EditorIcons")
|
select_all_button.icon = get_theme_icon("ThemeSelectAll", "EditorIcons")
|
||||||
deselect_all_button.icon = get_theme_icon("ThemeDeselectAll", "EditorIcons")
|
deselect_all_button.icon = get_theme_icon("ThemeDeselectAll", "EditorIcons")
|
||||||
|
|
||||||
|
|
||||||
func get_locales() -> Array[String]:
|
func get_locales() -> Array[String]:
|
||||||
var arr: Array[String] = []
|
var arr: Array[String] = []
|
||||||
for child : CheckBox in locales_container.get_children():
|
for child: CheckBox in locales_container.get_children():
|
||||||
if child.button_pressed:
|
if child.button_pressed:
|
||||||
arr.append(child.text)
|
arr.append(child.text)
|
||||||
return arr
|
return arr
|
||||||
|
|
||||||
|
|
||||||
func _set_all_locales_pressed(pressed: bool) -> void:
|
func _set_all_locales_pressed(pressed: bool) -> void:
|
||||||
for l : CheckBox in locales_container.get_children():
|
for l: CheckBox in locales_container.get_children():
|
||||||
l.button_pressed = pressed
|
l.button_pressed = pressed
|
||||||
|
|
||||||
|
|
||||||
func _on_locale_toggled(_toggled_on: bool) -> void:
|
func _on_locale_toggled(_toggled_on: bool) -> void:
|
||||||
var has_pressed := false
|
var has_pressed := false
|
||||||
var has_unpressed := false
|
var has_unpressed := false
|
||||||
@@ -48,10 +52,11 @@ func _on_locale_toggled(_toggled_on: bool) -> void:
|
|||||||
deselect_all_button.disabled = not has_pressed
|
deselect_all_button.disabled = not has_pressed
|
||||||
if not has_pressed:
|
if not has_pressed:
|
||||||
%NoneLocaleCheckBox.button_pressed = true
|
%NoneLocaleCheckBox.button_pressed = true
|
||||||
|
|
||||||
# "Select all" should only be enabled if at least one is unpressed
|
# "Select all" should only be enabled if at least one is unpressed
|
||||||
select_all_button.disabled = not has_unpressed
|
select_all_button.disabled = not has_unpressed
|
||||||
_save_to_config()
|
_save_to_config()
|
||||||
|
|
||||||
|
|
||||||
func _save_to_config() -> void:
|
func _save_to_config() -> void:
|
||||||
local_data.settings.save("misc", "Locales", get_locales())
|
local_data.settings.save("misc", "Locales", get_locales())
|
||||||
File renamed without changes.
+14
-11
@@ -1,5 +1,6 @@
|
|||||||
@tool
|
@tool
|
||||||
extends FoldableContainer
|
extends FoldableContainer
|
||||||
|
|
||||||
const SIZE = preload("res://addons/screenshots/debugger/bottom_panel/size/size.tscn")
|
const SIZE = preload("res://addons/screenshots/debugger/bottom_panel/size/size.tscn")
|
||||||
@onready var local_data = %LocalData
|
@onready var local_data = %LocalData
|
||||||
@export var sizes_container: FlowContainer
|
@export var sizes_container: FlowContainer
|
||||||
@@ -8,29 +9,29 @@ const SIZE = preload("res://addons/screenshots/debugger/bottom_panel/size/size.t
|
|||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
sizes_container.child_exiting_tree.connect(_on_size_removed)
|
sizes_container.child_exiting_tree.connect(_on_size_removed)
|
||||||
sizes_container.child_entered_tree.connect(_on_size_added)
|
sizes_container.child_entered_tree.connect(_on_size_added)
|
||||||
|
|
||||||
var def_width = ProjectSettings.get_setting("display/window/size/viewport_width")
|
var def_width = ProjectSettings.get_setting("display/window/size/viewport_width")
|
||||||
var def_height = ProjectSettings.get_setting("display/window/size/viewport_height")
|
var def_height = ProjectSettings.get_setting("display/window/size/viewport_height")
|
||||||
|
|
||||||
for s in local_data.settings.load_value("misc", "Sizes", [Vector2i(def_width,def_height)]):
|
for s in local_data.settings.load_value("misc", "Sizes", [Vector2i(def_width, def_height)]):
|
||||||
var new_size = SIZE.instantiate()
|
var new_size = SIZE.instantiate()
|
||||||
new_size.set_resolution(s)
|
new_size.set_resolution(s)
|
||||||
sizes_container.add_child(new_size)
|
sizes_container.add_child(new_size)
|
||||||
|
|
||||||
|
|
||||||
func _on_size_removed(node: Node) -> void:
|
func _on_size_removed(node: Node) -> void:
|
||||||
await node.tree_exited
|
await node.tree_exited
|
||||||
|
|
||||||
if not sizes_container:
|
if not sizes_container:
|
||||||
return
|
return
|
||||||
|
|
||||||
if sizes_container.get_child_count() == 1:
|
if sizes_container.get_child_count() == 1:
|
||||||
sizes_container.get_child(0).set_trash_button_disabled(true)
|
sizes_container.get_child(0).set_trash_button_disabled(true)
|
||||||
|
|
||||||
_save_to_config()
|
_save_to_config()
|
||||||
sizes_container.get_child(-1).set_add_button_visibility(true)
|
sizes_container.get_child(-1).set_add_button_visibility(true)
|
||||||
|
|
||||||
|
|
||||||
func _on_size_added(node: Node) -> void:
|
func _on_size_added(node: Node) -> void:
|
||||||
if not node.resolution_edited.is_connected(_save_to_config):
|
if not node.resolution_edited.is_connected(_save_to_config):
|
||||||
node.resolution_edited.connect(_save_to_config)
|
node.resolution_edited.connect(_save_to_config)
|
||||||
@@ -38,13 +39,15 @@ func _on_size_added(node: Node) -> void:
|
|||||||
for c in sizes_container.get_children():
|
for c in sizes_container.get_children():
|
||||||
c.set_trash_button_disabled(false)
|
c.set_trash_button_disabled(false)
|
||||||
c.set_add_button_visibility(false)
|
c.set_add_button_visibility(false)
|
||||||
|
|
||||||
_save_to_config()
|
_save_to_config()
|
||||||
sizes_container.get_child(-1).set_add_button_visibility(true)
|
sizes_container.get_child(-1).set_add_button_visibility(true)
|
||||||
|
|
||||||
|
|
||||||
func _save_to_config() -> void:
|
func _save_to_config() -> void:
|
||||||
local_data.settings.save("misc", "Sizes", get_sizes())
|
local_data.settings.save("misc", "Sizes", get_sizes())
|
||||||
|
|
||||||
|
|
||||||
func get_sizes() -> Array[Vector2i]:
|
func get_sizes() -> Array[Vector2i]:
|
||||||
var arr: Array[Vector2i] = []
|
var arr: Array[Vector2i] = []
|
||||||
for child in sizes_container.get_children():
|
for child in sizes_container.get_children():
|
||||||
File renamed without changes.
+8
-4
@@ -3,18 +3,21 @@ extends FoldableContainer
|
|||||||
|
|
||||||
@export var local_data: Node
|
@export var local_data: Node
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
%PickFolderButton.icon = get_theme_icon("FolderBrowse", "EditorIcons")
|
%PickFolderButton.icon = get_theme_icon("FolderBrowse", "EditorIcons")
|
||||||
%PickFolderButton.pressed.connect(func(): %FileDialog.show())
|
%PickFolderButton.pressed.connect(func(): %FileDialog.show())
|
||||||
%FileDialog.dir_selected.connect(_on_dir_selected)
|
%FileDialog.dir_selected.connect(_on_dir_selected)
|
||||||
%FileDialog.current_dir = %PathLineEdit.text
|
%FileDialog.current_dir = %PathLineEdit.text
|
||||||
|
|
||||||
for c in %FormatsContainers.get_children():
|
for c in %FormatsContainers.get_children():
|
||||||
c.toggled.connect(_on_format_toggled)
|
c.toggled.connect(_on_format_toggled)
|
||||||
|
|
||||||
|
|
||||||
func _on_dir_selected(path: String) -> void:
|
func _on_dir_selected(path: String) -> void:
|
||||||
%PathLineEdit.text = path
|
%PathLineEdit.text = path
|
||||||
|
|
||||||
|
|
||||||
func _on_format_toggled(_toggled_on: bool) -> void:
|
func _on_format_toggled(_toggled_on: bool) -> void:
|
||||||
var has_pressed := false
|
var has_pressed := false
|
||||||
var has_unpressed := false
|
var has_unpressed := false
|
||||||
@@ -24,13 +27,14 @@ func _on_format_toggled(_toggled_on: bool) -> void:
|
|||||||
has_pressed = true
|
has_pressed = true
|
||||||
else:
|
else:
|
||||||
has_unpressed = true
|
has_unpressed = true
|
||||||
|
|
||||||
if not has_pressed:
|
if not has_pressed:
|
||||||
%PNGCheckBox.button_pressed = true
|
%PNGCheckBox.button_pressed = true
|
||||||
|
|
||||||
|
|
||||||
func get_formats() -> Array[String]:
|
func get_formats() -> Array[String]:
|
||||||
var arr: Array[String] = []
|
var arr: Array[String] = []
|
||||||
for child : CheckBox in %FormatsContainers.get_children():
|
for child: CheckBox in %FormatsContainers.get_children():
|
||||||
if child.button_pressed:
|
if child.button_pressed:
|
||||||
arr.append(child.text)
|
arr.append(child.text)
|
||||||
return arr
|
return arr
|
||||||
File renamed without changes.
+4
-3
@@ -1,10 +1,11 @@
|
|||||||
@tool
|
@tool
|
||||||
extends VBoxContainer
|
extends VBoxContainer
|
||||||
|
|
||||||
@export var texture : Texture2D
|
@export var texture: Texture2D
|
||||||
@export var locale: String
|
@export var locale: String
|
||||||
@export var path: String
|
@export var path: String
|
||||||
|
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
$Button.icon = texture
|
$Button.icon = texture
|
||||||
@@ -12,6 +13,6 @@ func _ready() -> void:
|
|||||||
$Label.text = path.get_file()
|
$Label.text = path.get_file()
|
||||||
var globalized_path = ProjectSettings.globalize_path(path)
|
var globalized_path = ProjectSettings.globalize_path(path)
|
||||||
$Button.pressed.connect(func(): OS.shell_open(globalized_path))
|
$Button.pressed.connect(func(): OS.shell_open(globalized_path))
|
||||||
|
|
||||||
for c : Control in get_children():
|
for c: Control in get_children():
|
||||||
c.tooltip_text = "%s\n%sx%s\nLocale: %s" % [path.get_file(), resolution.x, resolution.y, locale]
|
c.tooltip_text = "%s\n%sx%s\nLocale: %s" % [path.get_file(), resolution.x, resolution.y, locale]
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+28
-18
@@ -1,30 +1,31 @@
|
|||||||
@tool
|
@tool
|
||||||
extends HBoxContainer
|
extends HBoxContainer
|
||||||
|
|
||||||
signal resolution_edited
|
signal resolution_edited
|
||||||
@export var preset_option_button: OptionButton
|
@export var preset_option_button: OptionButton
|
||||||
|
|
||||||
var presets : Dictionary[String, Vector2i] = {
|
var presets: Dictionary[String, Vector2i] = {
|
||||||
"iPhone 6.9\" (portrait)" : Vector2i(1320, 2868),
|
"iPhone 6.9\" (portrait)": Vector2i(1320, 2868),
|
||||||
"iPhone 6.9\" (landscape)" : Vector2i(2868, 1320),
|
"iPhone 6.9\" (landscape)": Vector2i(2868, 1320),
|
||||||
|
"iPad 13\" (portrait)": Vector2i(2064, 2752),
|
||||||
"iPad 13\" (portrait)" : Vector2i(2064, 2752),
|
"iPad 13\" (landscape)": Vector2i(2752, 2064),
|
||||||
"iPad 13\" (landscape)" : Vector2i(2752, 2064)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
var i = 0
|
var i = 0
|
||||||
preset_option_button.clear()
|
preset_option_button.clear()
|
||||||
for preset in presets:
|
for preset in presets:
|
||||||
preset_option_button.add_item(preset)
|
preset_option_button.add_item(preset)
|
||||||
preset_option_button.set_item_metadata(i, presets[preset])
|
preset_option_button.set_item_metadata(i, presets[preset])
|
||||||
i+=1
|
i += 1
|
||||||
preset_option_button.add_item("Custom")
|
preset_option_button.add_item("Custom")
|
||||||
preset_option_button.item_selected.connect(_on_preset_selected)
|
preset_option_button.item_selected.connect(_on_preset_selected)
|
||||||
|
|
||||||
if preset_option_button.selected == -1:
|
if preset_option_button.selected == -1:
|
||||||
preset_option_button.select(0)
|
preset_option_button.select(0)
|
||||||
_on_preset_selected(0)
|
_on_preset_selected(0)
|
||||||
|
|
||||||
%XLineEdit.text_changed.connect(_on_resolution_edited.bind("x"))
|
%XLineEdit.text_changed.connect(_on_resolution_edited.bind("x"))
|
||||||
%YLineEdit.text_changed.connect(_on_resolution_edited.bind("y"))
|
%YLineEdit.text_changed.connect(_on_resolution_edited.bind("y"))
|
||||||
%AddButton.pressed.connect(_on_add_button_pressed)
|
%AddButton.pressed.connect(_on_add_button_pressed)
|
||||||
@@ -36,34 +37,41 @@ func _ready() -> void:
|
|||||||
%TrashButton.pressed.connect(_on_trash_button_pressed)
|
%TrashButton.pressed.connect(_on_trash_button_pressed)
|
||||||
%TrashButton.icon = get_theme_icon("Remove", "EditorIcons")
|
%TrashButton.icon = get_theme_icon("Remove", "EditorIcons")
|
||||||
|
|
||||||
|
|
||||||
func _on_trash_button_pressed() -> void:
|
func _on_trash_button_pressed() -> void:
|
||||||
queue_free()
|
queue_free()
|
||||||
|
|
||||||
func set_trash_button_disabled(p_disabled : bool) -> void:
|
|
||||||
|
func set_trash_button_disabled(p_disabled: bool) -> void:
|
||||||
%TrashButton.disabled = p_disabled
|
%TrashButton.disabled = p_disabled
|
||||||
|
|
||||||
|
|
||||||
func set_add_button_visibility(p_visible: bool) -> void:
|
func set_add_button_visibility(p_visible: bool) -> void:
|
||||||
%AddButton.visible = p_visible
|
%AddButton.visible = p_visible
|
||||||
|
|
||||||
|
|
||||||
func _on_add_button_pressed() -> void:
|
func _on_add_button_pressed() -> void:
|
||||||
var size_panel = load("res://addons/screenshots/debugger/bottom_panel/size/size.tscn")
|
var size_panel = load("res://addons/screenshots/debugger/bottom_panel/size/size.tscn")
|
||||||
get_parent().add_child(size_panel.instantiate())
|
get_parent().add_child(size_panel.instantiate())
|
||||||
$AddButton.hide()
|
$AddButton.hide()
|
||||||
|
|
||||||
|
|
||||||
func _on_preset_selected(idx: int) -> void:
|
func _on_preset_selected(idx: int) -> void:
|
||||||
var resolution : Vector2i = preset_option_button.get_item_metadata(idx)
|
var resolution: Vector2i = preset_option_button.get_item_metadata(idx)
|
||||||
if not resolution:
|
if not resolution:
|
||||||
return
|
return
|
||||||
|
|
||||||
%XLineEdit.text = str(resolution.x)
|
%XLineEdit.text = str(resolution.x)
|
||||||
%YLineEdit.text = str(resolution.y)
|
%YLineEdit.text = str(resolution.y)
|
||||||
resolution_edited.emit()
|
resolution_edited.emit()
|
||||||
|
|
||||||
|
|
||||||
func set_resolution(p_resolution: Vector2i) -> void:
|
func set_resolution(p_resolution: Vector2i) -> void:
|
||||||
%XLineEdit.text = str(p_resolution.x)
|
%XLineEdit.text = str(p_resolution.x)
|
||||||
%YLineEdit.text = str(p_resolution.y)
|
%YLineEdit.text = str(p_resolution.y)
|
||||||
select_preset_option(p_resolution)
|
select_preset_option(p_resolution)
|
||||||
|
|
||||||
|
|
||||||
func select_preset_option(resolution: Vector2i) -> void:
|
func select_preset_option(resolution: Vector2i) -> void:
|
||||||
if not is_node_ready():
|
if not is_node_ready():
|
||||||
await ready
|
await ready
|
||||||
@@ -74,12 +82,14 @@ func select_preset_option(resolution: Vector2i) -> void:
|
|||||||
idx = i
|
idx = i
|
||||||
preset_option_button.select(idx)
|
preset_option_button.select(idx)
|
||||||
|
|
||||||
|
|
||||||
func get_resolution() -> Vector2i:
|
func get_resolution() -> Vector2i:
|
||||||
var res : Vector2i
|
var res: Vector2i
|
||||||
res.x = int(%XLineEdit.text)
|
res.x = int(%XLineEdit.text)
|
||||||
res.y = int(%YLineEdit.text)
|
res.y = int(%YLineEdit.text)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
||||||
func _on_resolution_edited(new_text: String, axis: String) -> void:
|
func _on_resolution_edited(new_text: String, axis: String) -> void:
|
||||||
# Remove all non-digit characters
|
# Remove all non-digit characters
|
||||||
var filtered := ""
|
var filtered := ""
|
||||||
@@ -94,6 +104,6 @@ func _on_resolution_edited(new_text: String, axis: String) -> void:
|
|||||||
elif axis == "y":
|
elif axis == "y":
|
||||||
if %YLineEdit.text != filtered:
|
if %YLineEdit.text != filtered:
|
||||||
%YLineEdit.text = filtered
|
%YLineEdit.text = filtered
|
||||||
|
|
||||||
select_preset_option(get_resolution())
|
select_preset_option(get_resolution())
|
||||||
resolution_edited.emit()
|
resolution_edited.emit()
|
||||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,22 @@
|
|||||||
|
@tool
|
||||||
|
extends EditorDebuggerPlugin
|
||||||
|
|
||||||
|
var session_id_to_editor_panel: Dictionary = { }
|
||||||
|
|
||||||
|
|
||||||
|
func _setup_session(p_session_id: int) -> void:
|
||||||
|
var editor_panel: Control = preload("res://addons/screenshots/debugger/bottom_panel/bottom_panel.tscn").instantiate()
|
||||||
|
var editor_debugger_session: EditorDebuggerSession = get_session(p_session_id)
|
||||||
|
|
||||||
|
var _success: int = editor_debugger_session.started.connect(editor_panel.on_session_started)
|
||||||
|
editor_debugger_session.add_session_tab(editor_panel)
|
||||||
|
session_id_to_editor_panel[p_session_id] = editor_panel
|
||||||
|
|
||||||
|
|
||||||
|
func _has_capture(p_prefix: String) -> bool:
|
||||||
|
return p_prefix == "screenshot"
|
||||||
|
|
||||||
|
|
||||||
|
func _capture(p_message: String, p_data: Array, p_session_id: int) -> bool:
|
||||||
|
var editor_panel: Control = session_id_to_editor_panel[p_session_id]
|
||||||
|
return editor_panel.on_editor_debugger_plugin_capture(p_message, p_data)
|
||||||
File renamed without changes.
@@ -3,5 +3,5 @@
|
|||||||
name="Screenshots"
|
name="Screenshots"
|
||||||
description="Takes screenshots of all sizes and locales with a single click."
|
description="Takes screenshots of all sizes and locales with a single click."
|
||||||
author="Davide Di Staso"
|
author="Davide Di Staso"
|
||||||
version="1.1"
|
version="1.2"
|
||||||
script="plugin.gd"
|
script="plugin.gd"
|
||||||
@@ -3,8 +3,9 @@ extends EditorPlugin
|
|||||||
|
|
||||||
const SHUTTER_WINDOW = "res://addons/screenshots/autoload/shutter_window/shutter_window.tscn"
|
const SHUTTER_WINDOW = "res://addons/screenshots/autoload/shutter_window/shutter_window.tscn"
|
||||||
|
|
||||||
var m_editor_debugger_plugin : EditorDebuggerPlugin = preload("res://addons/screenshots/debugger/editor_debugger_plugin.gd").new()
|
var m_editor_debugger_plugin: EditorDebuggerPlugin = preload("res://addons/screenshots/debugger/editor_debugger_plugin.gd").new()
|
||||||
var bottom_panel : Control
|
var bottom_panel: Control
|
||||||
|
|
||||||
|
|
||||||
func _enable_plugin() -> void:
|
func _enable_plugin() -> void:
|
||||||
add_autoload_singleton("Screenshots", SHUTTER_WINDOW)
|
add_autoload_singleton("Screenshots", SHUTTER_WINDOW)
|
||||||
File renamed without changes.
@@ -1,23 +0,0 @@
|
|||||||
; Engine configuration file.
|
|
||||||
; It's best edited using the editor UI and not directly,
|
|
||||||
; since the parameters that go here are not all obvious.
|
|
||||||
;
|
|
||||||
; Format:
|
|
||||||
; [section] ; section goes between []
|
|
||||||
; param=value ; assign values to parameters
|
|
||||||
|
|
||||||
config_version=5
|
|
||||||
|
|
||||||
[application]
|
|
||||||
|
|
||||||
config/name="Screenshots"
|
|
||||||
config/features=PackedStringArray("4.5", "Forward Plus")
|
|
||||||
config/icon="res://store_assets/icon.svg"
|
|
||||||
|
|
||||||
[autoload]
|
|
||||||
|
|
||||||
Screenshots="*res://addons/screenshots/autoload/shutter_window/shutter_window.tscn"
|
|
||||||
|
|
||||||
[editor_plugins]
|
|
||||||
|
|
||||||
enabled=PackedStringArray("res://addons/kenyoni/plugin_reloader/plugin.cfg", "res://addons/screenshots/plugin.cfg")
|
|
||||||
@@ -1,35 +1,41 @@
|
|||||||
@tool
|
@tool
|
||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
var settings: LocalFile
|
var settings: LocalFile
|
||||||
|
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
settings = LocalFile.new("res://addons/screenshots/settings.cfg")
|
settings = LocalFile.new("res://addons/screenshots/settings.cfg")
|
||||||
|
|
||||||
|
|
||||||
class LocalFile:
|
class LocalFile:
|
||||||
signal value_changed(section: String, key: String, new_value)
|
signal value_changed(section: String, key: String, new_value)
|
||||||
|
|
||||||
var config: ConfigFile
|
var config: ConfigFile
|
||||||
var file_path: String
|
var file_path: String
|
||||||
|
|
||||||
|
|
||||||
func _init(path: String):
|
func _init(path: String):
|
||||||
file_path = path
|
file_path = path
|
||||||
config = ConfigFile.new()
|
config = ConfigFile.new()
|
||||||
load_config()
|
load_config()
|
||||||
|
|
||||||
|
|
||||||
func load_config():
|
func load_config():
|
||||||
var err = config.load(file_path)
|
var err = config.load(file_path)
|
||||||
if err != OK:
|
if err != OK:
|
||||||
# File doesn't exist or couldn't be loaded, that's fine
|
# File doesn't exist or couldn't be loaded, that's fine
|
||||||
# We'll create it when we first save
|
# We'll create it when we first save
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
func save(section: String, key: String, value):
|
func save(section: String, key: String, value):
|
||||||
var old_value = null
|
var old_value = null
|
||||||
var has_existing_key = config.has_section_key(section, key)
|
var has_existing_key = config.has_section_key(section, key)
|
||||||
|
|
||||||
if has_existing_key:
|
if has_existing_key:
|
||||||
old_value = config.get_value(section, key)
|
old_value = config.get_value(section, key)
|
||||||
|
|
||||||
# Only save and emit if the value is different
|
# Only save and emit if the value is different
|
||||||
if not has_existing_key or old_value != value:
|
if not has_existing_key or old_value != value:
|
||||||
config.set_value(section, key, value)
|
config.set_value(section, key, value)
|
||||||
@@ -38,7 +44,8 @@ class LocalFile:
|
|||||||
push_error("Failed to save config file " + file_path + ": " + str(err))
|
push_error("Failed to save config file " + file_path + ": " + str(err))
|
||||||
else:
|
else:
|
||||||
value_changed.emit(section, key, value)
|
value_changed.emit(section, key, value)
|
||||||
|
|
||||||
|
|
||||||
func load_value(section: String, key: String, default_value = null):
|
func load_value(section: String, key: String, default_value = null):
|
||||||
# Check if the key exists first to avoid C++ errors
|
# Check if the key exists first to avoid C++ errors
|
||||||
if config.has_section_key(section, key):
|
if config.has_section_key(section, key):
|
||||||
@@ -48,38 +55,44 @@ class LocalFile:
|
|||||||
if default_value != null:
|
if default_value != null:
|
||||||
save(section, key, default_value)
|
save(section, key, default_value)
|
||||||
return default_value
|
return default_value
|
||||||
|
|
||||||
|
|
||||||
func has_key(section: String, key: String) -> bool:
|
func has_key(section: String, key: String) -> bool:
|
||||||
return config.has_section_key(section, key)
|
return config.has_section_key(section, key)
|
||||||
|
|
||||||
|
|
||||||
func has_section(section: String) -> bool:
|
func has_section(section: String) -> bool:
|
||||||
return config.has_section(section)
|
return config.has_section(section)
|
||||||
|
|
||||||
|
|
||||||
# Get all values from a section
|
# Get all values from a section
|
||||||
func get_section(section: String) -> Dictionary:
|
func get_section(section: String) -> Dictionary:
|
||||||
if config.has_section(section):
|
if config.has_section(section):
|
||||||
return config.get_section_values(section)
|
return config.get_section_values(section)
|
||||||
return {}
|
return { }
|
||||||
|
|
||||||
|
|
||||||
# Get all sections
|
# Get all sections
|
||||||
func get_sections() -> PackedStringArray:
|
func get_sections() -> PackedStringArray:
|
||||||
return config.get_sections()
|
return config.get_sections()
|
||||||
|
|
||||||
|
|
||||||
# Remove a key
|
# Remove a key
|
||||||
func remove_key(section: String, key: String):
|
func remove_key(section: String, key: String):
|
||||||
config.erase_section_key(section, key)
|
config.erase_section_key(section, key)
|
||||||
var err = config.save(file_path)
|
var err = config.save(file_path)
|
||||||
if err != OK:
|
if err != OK:
|
||||||
push_error("Failed to save config file " + file_path + ": " + str(err))
|
push_error("Failed to save config file " + file_path + ": " + str(err))
|
||||||
|
|
||||||
|
|
||||||
# Remove an entire section
|
# Remove an entire section
|
||||||
func remove_section(section: String):
|
func remove_section(section: String):
|
||||||
config.erase_section(section)
|
config.erase_section(section)
|
||||||
var err = config.save(file_path)
|
var err = config.save(file_path)
|
||||||
if err != OK:
|
if err != OK:
|
||||||
push_error("Failed to save config file " + file_path + ": " + str(err))
|
push_error("Failed to save config file " + file_path + ": " + str(err))
|
||||||
|
|
||||||
|
|
||||||
# Clear entire file
|
# Clear entire file
|
||||||
func clear_all():
|
func clear_all():
|
||||||
config.clear()
|
config.clear()
|
||||||
File renamed without changes.
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB |
@@ -1,40 +0,0 @@
|
|||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://db676w16nxng0"
|
|
||||||
path="res://.godot/imported/icon.png-328cfcb6969469a4250bbb3ec82ff0ac.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://store_assets/icon.png"
|
|
||||||
dest_files=["res://.godot/imported/icon.png-328cfcb6969469a4250bbb3ec82ff0ac.ctex"]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/high_quality=false
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
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/channel_remap/red=0
|
|
||||||
process/channel_remap/green=1
|
|
||||||
process/channel_remap/blue=2
|
|
||||||
process/channel_remap/alpha=3
|
|
||||||
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
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500" xmlns:bx="https://boxy-svg.com" width="500px" height="500px"><defs><linearGradient id="color-0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.743002, 0, 0, 1.743002, 453.197397, -3.162562)"><stop style="stop-color: rgb(165, 237, 159);"/></linearGradient><linearGradient id="color-1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1, 0, 0, 1, 6.29529, 20)"><stop style="stop-color: rgb(126, 215, 119);"/></linearGradient></defs><g transform="matrix(1, 0, 0, 1, -14.40535, -6.770363)" id="object-0"><g style="" transform="matrix(1, 0, 0, 1, 3.577872, -86.76339)"><rect width="257" height="216.686" x="202.857" y="120.558" rx="1.5" style="stroke-width: 26; stroke: rgb(201, 251, 196); fill-rule: nonzero; fill: rgb(216, 255, 213); opacity: 0.64;" transform="matrix(0.88294, 0.469487, -0.469487, 0.88294, 132.060254, -90.921077)"/><rect width="257" height="216.686" x="118.883" y="184.537" rx="1.5" style="stroke-width: 26; stroke: rgb(201, 251, 196); fill-rule: nonzero; fill: rgb(216, 255, 213); opacity: 0.78;" transform="matrix(0.963508, 0.267678, -0.267678, 0.963508, 87.424809, -55.531413)"/><rect width="257" height="216.686" x="40.169" y="243.572" rx="1.5" style="stroke-width: 26px; stroke: url("#color-0"); fill: rgb(216, 255, 213);"/><path d="M 188.826 311.601 L 188.826 331.758 L 168.669 331.758 L 168.669 351.915 L 128.355 351.915 L 128.355 372.072 L 108.198 372.072 L 108.198 392.229 L 88.042 392.229 L 88.042 412.386 L 249.296 412.386 L 249.296 372.072 L 229.14 372.072 L 229.14 331.758 L 208.983 331.758 L 208.983 311.601 L 188.826 311.601 Z" style="stroke-width: 22px; paint-order: stroke; fill: url("#color-0"); stroke: rgb(156, 221, 151);"/></g><path d="M 390.493 302.791 L 413.837 333.916 L 452.744 333.916 C 469.956 333.916 483.869 347.86 483.869 365.041 L 483.869 458.415 C 483.869 475.597 469.956 489.541 452.744 489.541 L 265.994 489.541 C 248.813 489.541 234.869 475.597 234.869 458.415 L 234.869 365.041 C 234.869 347.86 248.813 333.916 265.994 333.916 L 304.899 333.916 L 328.243 302.791 L 390.493 302.791 Z M 318.937 388.385 C 300.978 419.509 323.45 458.415 359.368 458.415 C 376.052 458.415 391.459 449.513 399.801 435.073 C 417.79 403.946 395.318 365.041 359.368 365.041 C 342.686 365.041 327.279 373.942 318.937 388.385 Z" style="stroke-width: 10px; fill: url("#color-1");"/></g><g transform="matrix(1, 0, 0, 1, 208.661346, -169.870087)"/></svg>
|
|
||||||
|
Before Width: | Height: | Size: 2.5 KiB |
@@ -1,43 +0,0 @@
|
|||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://beexo7stly40j"
|
|
||||||
path="res://.godot/imported/icon.svg-e03c482d947fcbee68178cf4fedc07b2.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://store_assets/icon.svg"
|
|
||||||
dest_files=["res://.godot/imported/icon.svg-e03c482d947fcbee68178cf4fedc07b2.ctex"]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/high_quality=false
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
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/channel_remap/red=0
|
|
||||||
process/channel_remap/green=1
|
|
||||||
process/channel_remap/blue=2
|
|
||||||
process/channel_remap/alpha=3
|
|
||||||
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
|
|
||||||
svg/scale=1.0
|
|
||||||
editor/scale_with_editor_scale=false
|
|
||||||
editor/convert_colors_with_editor_theme=false
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.1 MiB |
@@ -1,21 +0,0 @@
|
|||||||
[gd_scene load_steps=2 format=3 uid="uid://dhxwkyejss1af"]
|
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://beexo7stly40j" path="res://store_assets/icon.svg" id="1_uhqqe"]
|
|
||||||
|
|
||||||
[node name="Test" type="Control"]
|
|
||||||
layout_mode = 3
|
|
||||||
anchors_preset = 15
|
|
||||||
anchor_right = 1.0
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="."]
|
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = 15
|
|
||||||
anchor_right = 1.0
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
texture = ExtResource("1_uhqqe")
|
|
||||||
expand_mode = 1
|
|
||||||
Reference in new issue
Block a user