init
9
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
# Godot 4+ specific ignores
|
||||||
|
.godot/
|
||||||
|
.nomedia
|
||||||
|
|
||||||
|
# Godot-specific ignores
|
||||||
|
.import/
|
||||||
|
export.cfg
|
||||||
|
export_credentials.cfg
|
||||||
|
*.tmp
|
||||||
21
addons/script-ide/LICENSE
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2023 Marius Hanl
|
||||||
|
|
||||||
|
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.
|
||||||
69
addons/script-ide/README.md
Normal file
|
|
@ -0,0 +1,69 @@
|
||||||
|
# Script IDE
|
||||||
|
|
||||||
|
Transforms the Script UI into an IDE like UI.
|
||||||
|
Multiline Tabs are used for navigating between scripts.
|
||||||
|
The default Outline got an overhaul and now shows all members of the script (not just methods) with unique icons for faster navigation.
|
||||||
|
Enhanced keyboard navigation for Scripts and Outline.
|
||||||
|
Fast quick search functionality.
|
||||||
|
Quick function Override functionality.
|
||||||
|
|
||||||
|
Features:
|
||||||
|
- Scripts are now shown as Multiline Tabs
|
||||||
|
- The Outline got an overhaul and shows more than just the methods of the script. It includes the following members with a unique icon:
|
||||||
|
- Classes (Red Square)
|
||||||
|
- Constants (Red Circle)
|
||||||
|
- Signals (Yellow)
|
||||||
|
- Export variables (Orange)
|
||||||
|
- (Static) Variables (Red)
|
||||||
|
- Engine callback functions (Blue)
|
||||||
|
- (Static) Functions (Green)
|
||||||
|
- Setter functions (Green circle, with an arrow inside it pointing to the right)
|
||||||
|
- Getter functions (Green circle, with an arrow inside it pointing to the left)
|
||||||
|
- All the different members of the script can be hidden or made visible again by the outline filter. This allows fine control what should be visible (e.g. only signals, (Godot) functions, ...)
|
||||||
|
- A `Right Click` enables only the clicked filter, another `Right Click` will enable all filters again
|
||||||
|
- The Outline can be opened in a Popup with a defined shortcut for quick navigation between methods
|
||||||
|
- You can navigate through the Outline with the `Arrow` keys (or `Page up/Page down`) and scroll to the selected item by pressing `ENTER`
|
||||||
|
- Scripts can be opened in a Popup with a defined shortcut or when clicking the three dots on the top right of the Tabs for quick navigation between scripts
|
||||||
|
- The currently edited script is automatically selected in the Filesystem Dock
|
||||||
|
- Files can be quickly searched by the Quick Search Popup with `Shift`+`Shift`
|
||||||
|
- You can find and quickly override any method from your super classes with `Alt`+`Ins`
|
||||||
|
- The plugin is written with performance in mind, everything is very fast and works without any lags or stuttering
|
||||||
|
|
||||||
|
Customization:
|
||||||
|
- The Outline is on the right side (can be changed to be on the left side again)
|
||||||
|
- The Outline can be toggled via `File -> Toggle Scripts Panel`. This will hide or show it
|
||||||
|
- The order in the Outline can be changed
|
||||||
|
- There is also the possibility to hide private members, this is all members starting with a `_`
|
||||||
|
- The Script ItemList is not visible by default, but can be made visible again
|
||||||
|
|
||||||
|
All settings can be changed in the `Editor Settings` under `Plugin` -> `Script Ide`:
|
||||||
|
- `Open Outline Popup` = Shortcut to control how the Outline Popup should be triggered (default=CTRL+O or META+O)
|
||||||
|
- `Outline Position Right` = Flag to control whether the outline should be on the right or on the left side of the script editor (default=true)
|
||||||
|
- `Outline Order` = List which specifies the order of all different types in the Outline
|
||||||
|
- `Hide Private Members` = Flag to control whether private members (methods/variables/constants starting with '_') should be hidden in the Outline or not (default=false)
|
||||||
|
- `Open Script Popup` = Shortcut to control how the Script Popup should be triggered (default=CTRL+U or META+U)
|
||||||
|
- `Script List Visible` = Flag to control whether the script list should still be visible or not (above the outline) (default=false)
|
||||||
|
- `Script Tabs Singleline` = Flag to control whether the script tabs should be in a single line (instead of multiline) (default=false)
|
||||||
|
- `Script Tabs Visible` = Flag to control whether the script tabs should be visible or not (default=true)
|
||||||
|
- `Script Tabs Position Top` = Flag to control whether the script tabs should be on the top or on the bottom (default=true)
|
||||||
|
- `Script Tabs Close Button Always` = Flag to control whether the script tabs should always have the close button or only the select tab (default=false)
|
||||||
|
- `Auto Navigate in FileSystem Dock` = Flag to control whether the script that is currently edited should be automatically selected in the Filesystem Dock (default=true)
|
||||||
|
- `Open Quick Search Popup` = Shortcut to control how the Quick Search Popup should be triggered (default=Shift+Shift, double press behavior is hardcoded for now)
|
||||||
|
- `Open Override Popup` = Shortcut to control how the Override Popup should be triggered (default=Alt+Ins)
|
||||||
|
- `Cycle Tab forward` = Shortcut to cycle the script tabs in the forward direction (only works in the 'Script' Editor Tab) (default=CTRL+TAB)
|
||||||
|
- `Cycle Tab backward` = Shortcut to cycle the script tabs in the backward direction (only works in the 'Script' Editor Tab) (default=CTRL+SHIFT+TAB)
|
||||||
|
- All outline visibility settings
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
1
addons/script-ide/icon/class.svg
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="1" width="14" height="14" fill="#ff7085"/></svg>
|
||||||
|
After Width: | Height: | Size: 127 B |
44
addons/script-ide/icon/class.svg.import
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://csik7oxvt7tq3"
|
||||||
|
path="res://.godot/imported/class.svg-e6f2816a1f06041fb421c2af52817a4a.ctex"
|
||||||
|
metadata={
|
||||||
|
"has_editor_variant": true,
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://addons/script-ide/icon/class.svg"
|
||||||
|
dest_files=["res://.godot/imported/class.svg-e6f2816a1f06041fb421c2af52817a4a.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=true
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
1
addons/script-ide/icon/constant.svg
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-3.866 0-7 3.134-7 7 0 3.866 3.134 7 7 7s7-3.134 7-7c0-3.866-3.134-7-7-7zm0 2c2.7614 0 5 2.2386 5 5 0 2.7614-2.2386 5-5 5-2.7614 0-5-2.2386-5-5 0-2.7614 2.2386-5 5-5z" fill="#ff7085"/></svg>
|
||||||
|
After Width: | Height: | Size: 268 B |
44
addons/script-ide/icon/constant.svg.import
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cawc456ja8vf5"
|
||||||
|
path="res://.godot/imported/constant.svg-f6e857276565573c7540f3c32801842a.ctex"
|
||||||
|
metadata={
|
||||||
|
"has_editor_variant": true,
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://addons/script-ide/icon/constant.svg"
|
||||||
|
dest_files=["res://.godot/imported/constant.svg-f6e857276565573c7540f3c32801842a.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=true
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
1
addons/script-ide/icon/engine_func.svg
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-3.866 0-7 3.134-7 7 0 3.866 3.134 7 7 7 3.866 0 7-3.134 7-7 0-3.866-3.134-7-7-7z" fill="#57b3ff"/></svg>
|
||||||
|
After Width: | Height: | Size: 183 B |
44
addons/script-ide/icon/engine_func.svg.import
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cupb0polhqrwj"
|
||||||
|
path="res://.godot/imported/engine_func.svg-91320e42f9cc7bdd7576002e82fa6ab8.ctex"
|
||||||
|
metadata={
|
||||||
|
"has_editor_variant": true,
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://addons/script-ide/icon/engine_func.svg"
|
||||||
|
dest_files=["res://.godot/imported/engine_func.svg-91320e42f9cc7bdd7576002e82fa6ab8.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=true
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
1
addons/script-ide/icon/export.svg
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-3.866 0-7 3.134-7 7 0 3.866 3.134 7 7 7 3.866 0 7-3.134 7-7 0-3.866-3.134-7-7-7z" fill="#ffb273"/></svg>
|
||||||
|
After Width: | Height: | Size: 183 B |
44
addons/script-ide/icon/export.svg.import
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bvu2gnj8fv2kw"
|
||||||
|
path="res://.godot/imported/export.svg-d2d18132258a7a219ec1af1f0316c91c.ctex"
|
||||||
|
metadata={
|
||||||
|
"has_editor_variant": true,
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://addons/script-ide/icon/export.svg"
|
||||||
|
dest_files=["res://.godot/imported/export.svg-d2d18132258a7a219ec1af1f0316c91c.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=true
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
1
addons/script-ide/icon/func.svg
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-3.866 0-7 3.134-7 7 0 3.866 3.134 7 7 7 3.866 0 7-3.134 7-7 0-3.866-3.134-7-7-7z" fill="#8eef97"/></svg>
|
||||||
|
After Width: | Height: | Size: 183 B |
44
addons/script-ide/icon/func.svg.import
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://rni04cl446ov"
|
||||||
|
path="res://.godot/imported/func.svg-139842caa5b4b7e4839711b6c756d0f7.ctex"
|
||||||
|
metadata={
|
||||||
|
"has_editor_variant": true,
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://addons/script-ide/icon/func.svg"
|
||||||
|
dest_files=["res://.godot/imported/func.svg-139842caa5b4b7e4839711b6c756d0f7.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=true
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
1
addons/script-ide/icon/func_get.svg
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 15c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm0.5-2a1 1 0 0 1-0.70703-0.29297l-4-4a1 1 0 0 1-0.25977-0.62695 1.0001 1.0001 0 0 1 0-0.16016 1 1 0 0 1 0.25977-0.62695l4-4a1 1 0 0 1 1.4141 0 1 1 0 0 1 0 1.4141l-2.293 2.293h4.5859a1 1 0 0 1 1 1 1 1 0 0 1-1 1h-4.5859l2.293 2.293a1 1 0 0 1 0 1.4141 1 1 0 0 1-0.70703 0.29297z" fill="#8eef97"/></svg>
|
||||||
|
After Width: | Height: | Size: 435 B |
44
addons/script-ide/icon/func_get.svg.import
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://c2a3aowyhxj5x"
|
||||||
|
path="res://.godot/imported/func_get.svg-093f0ce02889d1f102ff9cc3e7f72654.ctex"
|
||||||
|
metadata={
|
||||||
|
"has_editor_variant": true,
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://addons/script-ide/icon/func_get.svg"
|
||||||
|
dest_files=["res://.godot/imported/func_get.svg-093f0ce02889d1f102ff9cc3e7f72654.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=true
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
1
addons/script-ide/icon/func_set.svg
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-3.866 0-7 3.134-7 7 0 3.866 3.134 7 7 7s7-3.134 7-7c0-3.866-3.134-7-7-7zm-0.5 2a1 1 0 0 1 0.70703 0.29297l4 4a1 1 0 0 1 0.25977 0.62695 1.0001 1.0001 0 0 1 0 0.16016 1 1 0 0 1-0.25977 0.62695l-4 4a1 1 0 0 1-1.4141 0 1 1 0 0 1 0-1.4141l2.293-2.293h-4.5859a1 1 0 0 1-1-1 1 1 0 0 1 1-1h4.5859l-2.293-2.293a1 1 0 0 1 0-1.4141 1 1 0 0 1 0.70703-0.29297z" fill="#8eef97"/></svg>
|
||||||
|
After Width: | Height: | Size: 451 B |
44
addons/script-ide/icon/func_set.svg.import
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bvjkrti6kj6o2"
|
||||||
|
path="res://.godot/imported/func_set.svg-c31168d90866ff1707ad9834754bd2c9.ctex"
|
||||||
|
metadata={
|
||||||
|
"has_editor_variant": true,
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://addons/script-ide/icon/func_set.svg"
|
||||||
|
dest_files=["res://.godot/imported/func_set.svg-c31168d90866ff1707ad9834754bd2c9.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=true
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
1
addons/script-ide/icon/property.svg
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-3.866 0-7 3.134-7 7 0 3.866 3.134 7 7 7 3.866 0 7-3.134 7-7 0-3.866-3.134-7-7-7z" fill="#ff7085"/></svg>
|
||||||
|
After Width: | Height: | Size: 183 B |
44
addons/script-ide/icon/property.svg.import
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dbwlgnwv5e8kl"
|
||||||
|
path="res://.godot/imported/property.svg-9e228499f30651faad74aa99e4499d7e.ctex"
|
||||||
|
metadata={
|
||||||
|
"has_editor_variant": true,
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://addons/script-ide/icon/property.svg"
|
||||||
|
dest_files=["res://.godot/imported/property.svg-9e228499f30651faad74aa99e4499d7e.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=true
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
1
addons/script-ide/icon/signal.svg
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-3.866 0-7 3.134-7 7 0 3.866 3.134 7 7 7 3.866 0 7-3.134 7-7 0-3.866-3.134-7-7-7z" fill="#ffdd65"/></svg>
|
||||||
|
After Width: | Height: | Size: 183 B |
44
addons/script-ide/icon/signal.svg.import
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bnccvnaloqnte"
|
||||||
|
path="res://.godot/imported/signal.svg-97182e1498b520a1ff5b8b9017c3b480.ctex"
|
||||||
|
metadata={
|
||||||
|
"has_editor_variant": true,
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://addons/script-ide/icon/signal.svg"
|
||||||
|
dest_files=["res://.godot/imported/signal.svg-97182e1498b520a1ff5b8b9017c3b480.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=true
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
342
addons/script-ide/override/override_panel.gd
Normal file
|
|
@ -0,0 +1,342 @@
|
||||||
|
@tool
|
||||||
|
extends PopupPanel
|
||||||
|
|
||||||
|
const FUNC_META: StringName = &"func"
|
||||||
|
|
||||||
|
@onready var filter_txt: LineEdit = %FilterTxt
|
||||||
|
@onready var class_func_tree: Tree = %ClassFuncTree
|
||||||
|
@onready var ok_btn: Button = %OkBtn
|
||||||
|
@onready var cancel_btn: Button = %CancelBtn
|
||||||
|
|
||||||
|
var plugin: EditorPlugin
|
||||||
|
|
||||||
|
var selections: Dictionary[String, bool] = {} # Used as Set.
|
||||||
|
var class_to_functions: Dictionary[StringName, PackedStringArray]
|
||||||
|
|
||||||
|
#region Plugin Processing
|
||||||
|
func _ready() -> void:
|
||||||
|
filter_txt.text_changed.connect(update_tree_filter.unbind(1))
|
||||||
|
|
||||||
|
class_func_tree.multi_selected.connect(func(item: TreeItem, col: int, selected: bool): save_selection(selected, item))
|
||||||
|
class_func_tree.item_activated.connect(generate_functions)
|
||||||
|
|
||||||
|
cancel_btn.pressed.connect(hide)
|
||||||
|
ok_btn.pressed.connect(generate_functions)
|
||||||
|
|
||||||
|
about_to_popup.connect(on_show)
|
||||||
|
|
||||||
|
if (plugin != null):
|
||||||
|
filter_txt.gui_input.connect(navigate_on_tree)
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
func navigate_on_tree(event: InputEvent):
|
||||||
|
if (event.is_action_pressed(&"ui_down", true)):
|
||||||
|
var selected: TreeItem = get_selected_tree_item()
|
||||||
|
if (selected == null):
|
||||||
|
return
|
||||||
|
var item: TreeItem = selected.get_next_in_tree()
|
||||||
|
if (item == null):
|
||||||
|
return
|
||||||
|
|
||||||
|
focus_tree_item(item)
|
||||||
|
elif (event.is_action_pressed(&"ui_up", true)):
|
||||||
|
var selected: TreeItem = get_selected_tree_item()
|
||||||
|
if (selected == null):
|
||||||
|
return
|
||||||
|
var item: TreeItem = selected.get_prev_in_tree()
|
||||||
|
if (item == null):
|
||||||
|
return
|
||||||
|
|
||||||
|
focus_tree_item(item)
|
||||||
|
elif (event.is_action_pressed(&"ui_page_down", true)):
|
||||||
|
var selected: TreeItem = get_selected_tree_item()
|
||||||
|
if (selected == null):
|
||||||
|
return
|
||||||
|
|
||||||
|
var item: TreeItem = selected.get_next_in_tree()
|
||||||
|
if (item == null):
|
||||||
|
return
|
||||||
|
|
||||||
|
for index: int in 4:
|
||||||
|
var next: TreeItem = item.get_next_in_tree()
|
||||||
|
if (next == null):
|
||||||
|
break
|
||||||
|
item = next
|
||||||
|
|
||||||
|
focus_tree_item(item)
|
||||||
|
elif (event.is_action_pressed(&"ui_page_up", true)):
|
||||||
|
var selected: TreeItem = get_selected_tree_item()
|
||||||
|
if (selected == null):
|
||||||
|
return
|
||||||
|
|
||||||
|
var item: TreeItem = selected.get_prev_in_tree()
|
||||||
|
if (item == null):
|
||||||
|
return
|
||||||
|
|
||||||
|
for index: int in 4:
|
||||||
|
var prev: TreeItem = item.get_prev_in_tree()
|
||||||
|
if (prev == null):
|
||||||
|
break
|
||||||
|
item = prev
|
||||||
|
|
||||||
|
focus_tree_item(item)
|
||||||
|
elif (event.is_action_pressed(&"ui_select", true)):
|
||||||
|
var selected: TreeItem = get_selected_tree_item()
|
||||||
|
if (selected == null):
|
||||||
|
return
|
||||||
|
|
||||||
|
if (!selected.is_selectable(0)):
|
||||||
|
selected.collapsed = !selected.collapsed
|
||||||
|
class_func_tree.accept_event()
|
||||||
|
return
|
||||||
|
|
||||||
|
if (selected.is_selected(0)):
|
||||||
|
selected.deselect(0)
|
||||||
|
save_selection(false, selected)
|
||||||
|
else:
|
||||||
|
selected.select(0)
|
||||||
|
save_selection(true, selected)
|
||||||
|
|
||||||
|
class_func_tree.accept_event()
|
||||||
|
elif (event.is_action_pressed(&"ui_text_submit", true)):
|
||||||
|
if (selections.size() == 0):
|
||||||
|
return
|
||||||
|
|
||||||
|
generate_functions()
|
||||||
|
class_func_tree.accept_event()
|
||||||
|
|
||||||
|
func get_selected_tree_item() -> TreeItem:
|
||||||
|
var selected: TreeItem = class_func_tree.get_selected()
|
||||||
|
if (selected == null):
|
||||||
|
selected = class_func_tree.get_root()
|
||||||
|
return selected
|
||||||
|
|
||||||
|
func focus_tree_item(item: TreeItem):
|
||||||
|
var was_selected: bool = item.is_selected(0)
|
||||||
|
item.select(0)
|
||||||
|
item.deselect(0)
|
||||||
|
if (was_selected):
|
||||||
|
item.select(0)
|
||||||
|
|
||||||
|
class_func_tree.ensure_cursor_is_visible()
|
||||||
|
class_func_tree.accept_event()
|
||||||
|
|
||||||
|
func update_tree_filter():
|
||||||
|
update_tree()
|
||||||
|
|
||||||
|
func save_selection(selected: bool, item: TreeItem):
|
||||||
|
if (selected):
|
||||||
|
selections[item.get_text(0)] = true
|
||||||
|
else:
|
||||||
|
selections.erase(item.get_text(0))
|
||||||
|
|
||||||
|
ok_btn.disabled = selections.size() == 0
|
||||||
|
|
||||||
|
func on_show():
|
||||||
|
class_func_tree.clear()
|
||||||
|
selections.clear()
|
||||||
|
ok_btn.disabled = true
|
||||||
|
filter_txt.text = &""
|
||||||
|
|
||||||
|
var script: Script = EditorInterface.get_script_editor().get_current_script()
|
||||||
|
class_to_functions = collect_all_class_functions(script) # [StringName, PackedStringArray]
|
||||||
|
if (class_to_functions.is_empty()):
|
||||||
|
return
|
||||||
|
|
||||||
|
update_tree()
|
||||||
|
filter_txt.grab_focus()
|
||||||
|
|
||||||
|
func update_tree():
|
||||||
|
class_func_tree.clear()
|
||||||
|
|
||||||
|
var text: String = filter_txt.text
|
||||||
|
|
||||||
|
var root: TreeItem = class_func_tree.create_item()
|
||||||
|
for class_name_str: StringName in class_to_functions.keys():
|
||||||
|
var class_item: TreeItem = root.create_child(0)
|
||||||
|
class_item.set_selectable(0, false)
|
||||||
|
class_item.set_text(0, class_name_str)
|
||||||
|
|
||||||
|
for function: String in class_to_functions.get(class_name_str):
|
||||||
|
var is_preselected: bool = selections.has(function)
|
||||||
|
if (is_preselected || text.is_empty() || text.is_subsequence_ofn(function)):
|
||||||
|
var func_item: TreeItem = class_item.create_child()
|
||||||
|
func_item.set_text(0, function)
|
||||||
|
if (plugin.keywords.has(function.get_slice("(", 0))):
|
||||||
|
func_item.set_icon(0, plugin.engine_func_icon)
|
||||||
|
else:
|
||||||
|
func_item.set_icon(0, plugin.func_icon)
|
||||||
|
|
||||||
|
if (is_preselected):
|
||||||
|
func_item.select(0)
|
||||||
|
|
||||||
|
func collect_all_class_functions(script: Script) -> Dictionary[StringName, PackedStringArray]:
|
||||||
|
var existing_funcs: Dictionary[String, bool] = {} # Used as Set.
|
||||||
|
for func_str: String in plugin.outline_cache.engine_funcs:
|
||||||
|
existing_funcs[func_str] = true
|
||||||
|
for func_str: String in plugin.outline_cache.funcs:
|
||||||
|
existing_funcs[func_str] = true
|
||||||
|
|
||||||
|
var class_to_functions: Dictionary[StringName, PackedStringArray] = collect_super_class_functions(script.get_base_script(), existing_funcs)
|
||||||
|
var native_class_to_functions: Dictionary[StringName, PackedStringArray] = collect_native_class_functions(script.get_instance_base_type(), existing_funcs)
|
||||||
|
|
||||||
|
return native_class_to_functions.merged(class_to_functions)
|
||||||
|
|
||||||
|
func collect_super_class_functions(base_script: Script, existing_funcs: Dictionary[String, bool]) -> Dictionary[StringName, PackedStringArray]:
|
||||||
|
var super_classes: Array[Script] = []
|
||||||
|
while (base_script != null):
|
||||||
|
super_classes.insert(0, base_script)
|
||||||
|
|
||||||
|
base_script = base_script.get_base_script()
|
||||||
|
|
||||||
|
var class_to_functions: Dictionary[StringName, PackedStringArray] = {}
|
||||||
|
for super_class: Script in super_classes:
|
||||||
|
var functions: PackedStringArray = collect_script_functions(super_class, existing_funcs)
|
||||||
|
if (functions.is_empty()):
|
||||||
|
continue
|
||||||
|
|
||||||
|
class_to_functions[super_class.get_global_name()] = functions
|
||||||
|
|
||||||
|
return class_to_functions
|
||||||
|
|
||||||
|
func collect_native_class_functions(native_class: StringName, existing_funcs: Dictionary[String, bool]) -> Dictionary[StringName, PackedStringArray]:
|
||||||
|
var super_native_classes: Array[StringName] = []
|
||||||
|
while (native_class != &""):
|
||||||
|
super_native_classes.insert(0, native_class)
|
||||||
|
|
||||||
|
native_class = ClassDB.get_parent_class(native_class)
|
||||||
|
|
||||||
|
var class_to_functions: Dictionary[StringName, PackedStringArray] = {}
|
||||||
|
for super_native_class: StringName in super_native_classes:
|
||||||
|
var functions: PackedStringArray = collect_class_functions(super_native_class, existing_funcs)
|
||||||
|
if (functions.is_empty()):
|
||||||
|
continue
|
||||||
|
|
||||||
|
class_to_functions[super_native_class] = functions
|
||||||
|
|
||||||
|
return class_to_functions
|
||||||
|
|
||||||
|
func collect_class_functions(native_class: StringName, existing_funcs: Dictionary[String, bool]):
|
||||||
|
var functions: PackedStringArray = []
|
||||||
|
|
||||||
|
for method: Dictionary in ClassDB.class_get_method_list(native_class, true):
|
||||||
|
if (method[&"flags"] & METHOD_FLAG_VIRTUAL <= 0):
|
||||||
|
continue
|
||||||
|
|
||||||
|
var func_name: String = method[&"name"]
|
||||||
|
if (existing_funcs.has(func_name)):
|
||||||
|
continue
|
||||||
|
|
||||||
|
func_name = create_function_signature(method)
|
||||||
|
functions.append(func_name)
|
||||||
|
|
||||||
|
return functions
|
||||||
|
|
||||||
|
func collect_script_functions(super_class: Script, existing_funcs: Dictionary[String, bool]) -> PackedStringArray:
|
||||||
|
var functions: PackedStringArray = []
|
||||||
|
|
||||||
|
for method: Dictionary in super_class.get_script_method_list():
|
||||||
|
var func_name: String = method[&"name"]
|
||||||
|
if (existing_funcs.has(func_name)):
|
||||||
|
continue
|
||||||
|
|
||||||
|
existing_funcs[func_name] = true
|
||||||
|
|
||||||
|
func_name = create_function_signature(method)
|
||||||
|
functions.append(func_name)
|
||||||
|
|
||||||
|
return functions
|
||||||
|
|
||||||
|
func create_function_signature(method: Dictionary) -> String:
|
||||||
|
var func_name: String = method[&"name"]
|
||||||
|
func_name += "("
|
||||||
|
|
||||||
|
var args: Array = method[&"args"]
|
||||||
|
var default_args: Array = method[&"default_args"]
|
||||||
|
|
||||||
|
var arg_index: int = 0
|
||||||
|
var default_arg_index: int = 0
|
||||||
|
var arg_str: String = ""
|
||||||
|
for arg: Dictionary in args:
|
||||||
|
if (arg_str != ""):
|
||||||
|
arg_str += ", "
|
||||||
|
|
||||||
|
arg_str += arg[&"name"]
|
||||||
|
var type: String = get_type(arg)
|
||||||
|
if (type != ""):
|
||||||
|
arg_str += ": " + type
|
||||||
|
|
||||||
|
if (args.size() - arg_index <= default_args.size()):
|
||||||
|
var default_arg: Variant = default_args[default_arg_index]
|
||||||
|
if (!default_arg):
|
||||||
|
var type_hint: int = arg[&"type"]
|
||||||
|
if (is_dictionary(type_hint)):
|
||||||
|
default_arg = {}
|
||||||
|
elif (is_array(type_hint)):
|
||||||
|
default_arg = []
|
||||||
|
|
||||||
|
arg_str += " = " + var_to_str(default_arg)
|
||||||
|
|
||||||
|
default_arg_index += 1
|
||||||
|
|
||||||
|
arg_index += 1
|
||||||
|
|
||||||
|
func_name += arg_str + ")"
|
||||||
|
|
||||||
|
var return_str: String = get_type(method[&"return"])
|
||||||
|
if (return_str == ""):
|
||||||
|
return_str = "void"
|
||||||
|
|
||||||
|
func_name += " -> " + return_str
|
||||||
|
|
||||||
|
return func_name
|
||||||
|
|
||||||
|
func generate_functions():
|
||||||
|
if (selections.size() == 0):
|
||||||
|
return
|
||||||
|
|
||||||
|
var generated_text: String = ""
|
||||||
|
for function: String in selections.keys():
|
||||||
|
generated_text += "\nfunc " + function + ":\n\tpass\n"
|
||||||
|
|
||||||
|
var editor: CodeEdit = EditorInterface.get_script_editor().get_current_editor().get_base_editor()
|
||||||
|
editor.text += generated_text
|
||||||
|
|
||||||
|
plugin.goto_line(editor.get_line_count() - 1)
|
||||||
|
|
||||||
|
# Deferred as otherwise we get weird errors in the console.
|
||||||
|
# Probably due to this beeing called in a signal and auto unparent is true.
|
||||||
|
# 100% Engine bug or at least weird behavior.
|
||||||
|
hide.call_deferred()
|
||||||
|
|
||||||
|
func get_type(dict: Dictionary) -> String:
|
||||||
|
var type: String = dict[&"class_name"]
|
||||||
|
if (type != &""):
|
||||||
|
return type
|
||||||
|
|
||||||
|
var type_hint: int = dict[&"type"]
|
||||||
|
if (type_hint == 0):
|
||||||
|
return &""
|
||||||
|
|
||||||
|
type = type_string(type_hint)
|
||||||
|
|
||||||
|
if (is_dictionary(type_hint)):
|
||||||
|
var generic: String = dict[&"hint_string"]
|
||||||
|
if (generic != &""):
|
||||||
|
var generic_parts: PackedStringArray = generic.split(";")
|
||||||
|
if (generic_parts.size() == 2):
|
||||||
|
return type + "[" + generic_parts[0] + ", " + generic_parts[1] + "]"
|
||||||
|
|
||||||
|
if (is_array(type_hint)):
|
||||||
|
var generic: String = dict[&"hint_string"]
|
||||||
|
if (generic != &""):
|
||||||
|
return type + "[" + generic + "]"
|
||||||
|
|
||||||
|
return type
|
||||||
|
|
||||||
|
func is_dictionary(type_hint: int):
|
||||||
|
return type_hint == 27
|
||||||
|
|
||||||
|
func is_array(type_hint: int):
|
||||||
|
return type_hint == 28
|
||||||
1
addons/script-ide/override/override_panel.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://c4w55j4jswg2t
|
||||||
58
addons/script-ide/override/override_panel.tscn
Normal file
|
|
@ -0,0 +1,58 @@
|
||||||
|
[gd_scene format=3 uid="uid://bb1n82qxlqanh"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://c4w55j4jswg2t" path="res://addons/script-ide/override/override_panel.gd" id="1_c3eqr"]
|
||||||
|
|
||||||
|
[node name="OverridePanel" type="PopupPanel" unique_id=145780904]
|
||||||
|
oversampling_override = 1.0
|
||||||
|
script = ExtResource("1_c3eqr")
|
||||||
|
|
||||||
|
[node name="PanelContainer" type="PanelContainer" parent="." unique_id=1028771242]
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_left = 4.0
|
||||||
|
offset_top = 4.0
|
||||||
|
offset_right = -4.0
|
||||||
|
offset_bottom = -4.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
|
||||||
|
[node name="MarginContainer" type="MarginContainer" parent="PanelContainer" unique_id=701240329]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer/MarginContainer" unique_id=46770551]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 4
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="PanelContainer/MarginContainer/VBoxContainer" unique_id=927995895]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Select Functions to Override/Implement"
|
||||||
|
|
||||||
|
[node name="FilterTxt" type="LineEdit" parent="PanelContainer/MarginContainer/VBoxContainer" unique_id=759695003]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
placeholder_text = "Filter Methods"
|
||||||
|
|
||||||
|
[node name="ClassFuncTree" type="Tree" parent="PanelContainer/MarginContainer/VBoxContainer" unique_id=1883825598]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_vertical = 3
|
||||||
|
hide_root = true
|
||||||
|
select_mode = 2
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer/MarginContainer/VBoxContainer" unique_id=1036676649]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 4
|
||||||
|
alignment = 2
|
||||||
|
|
||||||
|
[node name="OkBtn" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer/HBoxContainer" unique_id=598122006]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(64, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Ok"
|
||||||
|
|
||||||
|
[node name="CancelBtn" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer/HBoxContainer" unique_id=1978369329]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(64, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Cancel"
|
||||||
7
addons/script-ide/plugin.cfg
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
[plugin]
|
||||||
|
|
||||||
|
name="Script-IDE"
|
||||||
|
description="Transforms the Script UI into an IDE like UI. Tabs are used for navigating between scripts. The default Outline got an overhaul and now shows all members of the script (not just methods) with unique icons for faster navigation. Enhanced keyboard navigation for Scripts and Outline. Fast quick search functionality."
|
||||||
|
author="Marius Hanl"
|
||||||
|
version="2.0.4"
|
||||||
|
script="plugin.gd"
|
||||||
1220
addons/script-ide/plugin.gd
Normal file
1
addons/script-ide/plugin.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://bc0b5v66xdidn
|
||||||
254
addons/script-ide/quickopen/quick_open_panel.gd
Normal file
|
|
@ -0,0 +1,254 @@
|
||||||
|
## Quick open panel to quickly access all resources that are in the project.
|
||||||
|
## Initially shows all resources, but can be changed to more specific resources
|
||||||
|
## or filtered down with text.
|
||||||
|
@tool
|
||||||
|
extends PopupPanel
|
||||||
|
|
||||||
|
const ADDONS: StringName = &"res://addons"
|
||||||
|
const SEPARATOR: StringName = &" - "
|
||||||
|
const STRUCTURE_START: StringName = &"("
|
||||||
|
const STRUCTURE_END: StringName = &")"
|
||||||
|
|
||||||
|
#region UI
|
||||||
|
@onready var filter_bar: TabBar = %FilterBar
|
||||||
|
@onready var search_option_btn: OptionButton = %SearchOptionBtn
|
||||||
|
@onready var filter_txt: LineEdit = %FilterTxt
|
||||||
|
@onready var files_list: ItemList = %FilesList
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
var plugin: EditorPlugin
|
||||||
|
|
||||||
|
var scenes: Array[FileData]
|
||||||
|
var scripts: Array[FileData]
|
||||||
|
var resources: Array[FileData]
|
||||||
|
var others: Array[FileData]
|
||||||
|
|
||||||
|
# For performance and memory considerations, we add all files into one reusable array.
|
||||||
|
var all_files: Array[FileData]
|
||||||
|
|
||||||
|
var is_rebuild_cache: bool = true
|
||||||
|
|
||||||
|
#region Plugin and Shortcut processing
|
||||||
|
func _ready() -> void:
|
||||||
|
files_list.item_selected.connect(open_file)
|
||||||
|
search_option_btn.item_selected.connect(rebuild_cache_and_ui.unbind(1))
|
||||||
|
filter_txt.text_changed.connect(fill_files_list.unbind(1))
|
||||||
|
|
||||||
|
filter_bar.tab_changed.connect(change_fill_files_list.unbind(1))
|
||||||
|
|
||||||
|
about_to_popup.connect(on_show)
|
||||||
|
|
||||||
|
var file_system: EditorFileSystem = EditorInterface.get_resource_filesystem()
|
||||||
|
file_system.filesystem_changed.connect(schedule_rebuild)
|
||||||
|
|
||||||
|
if (plugin != null):
|
||||||
|
filter_txt.gui_input.connect(plugin.navigate_on_list.bind(files_list, open_file))
|
||||||
|
|
||||||
|
func _shortcut_input(event: InputEvent) -> void:
|
||||||
|
if (!event.is_pressed() || event.is_echo()):
|
||||||
|
return
|
||||||
|
|
||||||
|
if (plugin.tab_cycle_forward_shc.matches_event(event)):
|
||||||
|
get_viewport().set_input_as_handled()
|
||||||
|
|
||||||
|
var new_tab: int = filter_bar.current_tab + 1
|
||||||
|
if (new_tab == filter_bar.get_tab_count()):
|
||||||
|
new_tab = 0
|
||||||
|
filter_bar.current_tab = new_tab
|
||||||
|
elif (plugin.tab_cycle_backward_shc.matches_event(event)):
|
||||||
|
get_viewport().set_input_as_handled()
|
||||||
|
|
||||||
|
var new_tab: int = filter_bar.current_tab - 1
|
||||||
|
if (new_tab == -1):
|
||||||
|
new_tab = filter_bar.get_tab_count() - 1
|
||||||
|
filter_bar.current_tab = new_tab
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
func open_file(index: int):
|
||||||
|
var file: String = files_list.get_item_metadata(index)
|
||||||
|
|
||||||
|
if (ResourceLoader.exists(file)):
|
||||||
|
var res: Resource = load(file)
|
||||||
|
|
||||||
|
if (res is Script):
|
||||||
|
EditorInterface.edit_script(res)
|
||||||
|
EditorInterface.set_main_screen_editor.call_deferred("Script")
|
||||||
|
else:
|
||||||
|
EditorInterface.edit_resource(res)
|
||||||
|
|
||||||
|
if (res is PackedScene):
|
||||||
|
EditorInterface.open_scene_from_path(file)
|
||||||
|
|
||||||
|
# Need to be deferred as it does not work otherwise.
|
||||||
|
var root: Node = EditorInterface.get_edited_scene_root()
|
||||||
|
if (root is Node3D):
|
||||||
|
EditorInterface.set_main_screen_editor.call_deferred("3D")
|
||||||
|
else:
|
||||||
|
EditorInterface.set_main_screen_editor.call_deferred("2D")
|
||||||
|
else:
|
||||||
|
# Text files (.txt, .md) will not be recognized, which seems to be a very bad
|
||||||
|
# limitation from the Engine. The methods called by the Engine are also not exposed.
|
||||||
|
# So we just select the file, which is better than nothing.
|
||||||
|
EditorInterface.select_file(file)
|
||||||
|
|
||||||
|
# Deferred as otherwise we get weird errors in the console.
|
||||||
|
# Probably due to this beeing called in a signal and auto unparent is true.
|
||||||
|
# 100% Engine bug or at least weird behavior.
|
||||||
|
hide.call_deferred()
|
||||||
|
|
||||||
|
func schedule_rebuild():
|
||||||
|
is_rebuild_cache = true
|
||||||
|
|
||||||
|
func on_show():
|
||||||
|
if (search_option_btn.selected != 0):
|
||||||
|
search_option_btn.selected = 0
|
||||||
|
|
||||||
|
is_rebuild_cache = true
|
||||||
|
|
||||||
|
var rebuild_ui: bool = false
|
||||||
|
var all_tab_not_pressed: bool = filter_bar.current_tab != 0
|
||||||
|
rebuild_ui = is_rebuild_cache || all_tab_not_pressed
|
||||||
|
|
||||||
|
if (is_rebuild_cache):
|
||||||
|
rebuild_cache()
|
||||||
|
|
||||||
|
if (rebuild_ui):
|
||||||
|
if (all_tab_not_pressed):
|
||||||
|
# Triggers the ui update.
|
||||||
|
filter_bar.current_tab = 0
|
||||||
|
else:
|
||||||
|
fill_files_list()
|
||||||
|
|
||||||
|
filter_txt.select_all()
|
||||||
|
focus_and_select_first()
|
||||||
|
|
||||||
|
func rebuild_cache():
|
||||||
|
is_rebuild_cache = false
|
||||||
|
|
||||||
|
all_files.clear()
|
||||||
|
scenes.clear()
|
||||||
|
scripts.clear()
|
||||||
|
resources.clear()
|
||||||
|
others.clear()
|
||||||
|
|
||||||
|
build_file_cache()
|
||||||
|
|
||||||
|
func rebuild_cache_and_ui():
|
||||||
|
rebuild_cache()
|
||||||
|
fill_files_list()
|
||||||
|
|
||||||
|
focus_and_select_first()
|
||||||
|
|
||||||
|
func focus_and_select_first():
|
||||||
|
filter_txt.grab_focus()
|
||||||
|
|
||||||
|
if (files_list.item_count > 0):
|
||||||
|
files_list.select(0)
|
||||||
|
|
||||||
|
func build_file_cache():
|
||||||
|
var dir: EditorFileSystemDirectory = EditorInterface.get_resource_filesystem().get_filesystem()
|
||||||
|
build_file_cache_dir(dir)
|
||||||
|
|
||||||
|
all_files.append_array(scenes)
|
||||||
|
all_files.append_array(scripts)
|
||||||
|
all_files.append_array(resources)
|
||||||
|
all_files.append_array(others)
|
||||||
|
|
||||||
|
func build_file_cache_dir(dir: EditorFileSystemDirectory):
|
||||||
|
for index: int in dir.get_subdir_count():
|
||||||
|
build_file_cache_dir(dir.get_subdir(index))
|
||||||
|
|
||||||
|
for index: int in dir.get_file_count():
|
||||||
|
var file: String = dir.get_file_path(index)
|
||||||
|
if (search_option_btn.get_selected_id() == 0 && file.begins_with(ADDONS)):
|
||||||
|
continue
|
||||||
|
|
||||||
|
var last_delimiter: int = file.rfind(&"/")
|
||||||
|
|
||||||
|
var file_name: String = file.substr(last_delimiter + 1)
|
||||||
|
var file_structure: String = &""
|
||||||
|
if (file_name.length() + 6 != file.length()):
|
||||||
|
file_structure = SEPARATOR + STRUCTURE_START + file.substr(6, last_delimiter - 6) + STRUCTURE_END
|
||||||
|
|
||||||
|
var file_data: FileData = FileData.new()
|
||||||
|
file_data.file = file
|
||||||
|
file_data.file_name = file_name
|
||||||
|
file_data.file_name_structure = file_name + file_structure
|
||||||
|
file_data.file_type = dir.get_file_type(index)
|
||||||
|
|
||||||
|
# Needed, as otherwise we have no icon.
|
||||||
|
if (file_data.file_type == &"Resource"):
|
||||||
|
file_data.file_type = &"Object"
|
||||||
|
|
||||||
|
match (file.get_extension()):
|
||||||
|
&"tscn": scenes.append(file_data)
|
||||||
|
&"gd": scripts.append(file_data)
|
||||||
|
&"tres": resources.append(file_data)
|
||||||
|
&"gdshader": resources.append(file_data)
|
||||||
|
_: others.append(file_data)
|
||||||
|
|
||||||
|
func change_fill_files_list():
|
||||||
|
fill_files_list()
|
||||||
|
|
||||||
|
focus_and_select_first()
|
||||||
|
|
||||||
|
func fill_files_list():
|
||||||
|
files_list.clear()
|
||||||
|
|
||||||
|
if (filter_bar.current_tab == 0):
|
||||||
|
fill_files_list_with(all_files)
|
||||||
|
elif (filter_bar.current_tab == 1):
|
||||||
|
fill_files_list_with(scenes)
|
||||||
|
elif (filter_bar.current_tab == 2):
|
||||||
|
fill_files_list_with(scripts)
|
||||||
|
elif (filter_bar.current_tab == 3):
|
||||||
|
fill_files_list_with(resources)
|
||||||
|
elif (filter_bar.current_tab == 4):
|
||||||
|
fill_files_list_with(others)
|
||||||
|
|
||||||
|
func fill_files_list_with(files: Array[FileData]):
|
||||||
|
var filter_text: String = filter_txt.text
|
||||||
|
files.sort_custom(sort_by_filter)
|
||||||
|
|
||||||
|
for file_data: FileData in files:
|
||||||
|
var file: String = file_data.file
|
||||||
|
if (filter_text.is_empty() || filter_text.is_subsequence_ofn(file)):
|
||||||
|
var icon: Texture2D = EditorInterface.get_base_control().get_theme_icon(file_data.file_type, &"EditorIcons")
|
||||||
|
|
||||||
|
files_list.add_item(file_data.file_name_structure, icon)
|
||||||
|
files_list.set_item_metadata(files_list.item_count - 1, file)
|
||||||
|
files_list.set_item_tooltip(files_list.item_count - 1, file)
|
||||||
|
|
||||||
|
func sort_by_filter(file_data1: FileData, file_data2: FileData) -> bool:
|
||||||
|
var filter_text: String = filter_txt.text
|
||||||
|
var name1: String = file_data1.file_name
|
||||||
|
var name2: String = file_data2.file_name
|
||||||
|
|
||||||
|
for index: int in filter_text.length():
|
||||||
|
var a_oob: bool = index >= name1.length()
|
||||||
|
var b_oob: bool = index >= name2.length()
|
||||||
|
|
||||||
|
if (a_oob):
|
||||||
|
if (b_oob):
|
||||||
|
return false;
|
||||||
|
return true
|
||||||
|
if (b_oob):
|
||||||
|
return false
|
||||||
|
|
||||||
|
var char: String = filter_text[index]
|
||||||
|
var a_match: bool = char == name1[index]
|
||||||
|
var b_match: bool = char == name2[index]
|
||||||
|
|
||||||
|
if (a_match && !b_match):
|
||||||
|
return true
|
||||||
|
|
||||||
|
if (b_match && !a_match):
|
||||||
|
return false
|
||||||
|
|
||||||
|
return name1 < name2
|
||||||
|
|
||||||
|
class FileData:
|
||||||
|
var file: String
|
||||||
|
var file_name: String
|
||||||
|
var file_name_structure: String
|
||||||
|
var file_type: StringName
|
||||||
1
addons/script-ide/quickopen/quick_open_panel.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://cgwp4rl1udqbb
|
||||||
147
addons/script-ide/quickopen/quick_open_panel.tscn
Normal file
|
|
@ -0,0 +1,147 @@
|
||||||
|
[gd_scene format=3 uid="uid://d2pttchmj3n7q"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://cgwp4rl1udqbb" path="res://addons/script-ide/quickopen/quick_open_panel.gd" id="1_3tl1s"]
|
||||||
|
|
||||||
|
[sub_resource type="Image" id="Image_ta8yk"]
|
||||||
|
data = {
|
||||||
|
"data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 16, 225, 225, 225, 134, 224, 224, 224, 209, 224, 224, 224, 245, 224, 224, 224, 245, 224, 224, 224, 208, 224, 224, 224, 131, 236, 236, 236, 13, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 73, 224, 224, 224, 228, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 225, 225, 225, 225, 68, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 73, 224, 224, 224, 255, 224, 224, 224, 255, 225, 225, 225, 183, 224, 224, 224, 198, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 198, 224, 224, 224, 189, 224, 224, 224, 255, 224, 224, 224, 254, 224, 224, 224, 65, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 16, 224, 224, 224, 228, 224, 224, 224, 255, 224, 224, 224, 120, 226, 226, 226, 60, 224, 224, 224, 255, 225, 225, 225, 109, 225, 225, 225, 110, 224, 224, 224, 255, 226, 226, 226, 60, 224, 224, 224, 128, 224, 224, 224, 255, 225, 225, 225, 223, 234, 234, 234, 12, 255, 255, 255, 0, 255, 255, 255, 0, 225, 225, 225, 134, 224, 224, 224, 255, 225, 225, 225, 183, 255, 255, 255, 0, 224, 224, 224, 153, 224, 224, 224, 243, 255, 255, 255, 4, 255, 255, 255, 4, 224, 224, 224, 244, 225, 225, 225, 151, 255, 255, 255, 1, 225, 225, 225, 191, 224, 224, 224, 255, 225, 225, 225, 127, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 209, 224, 224, 224, 255, 224, 224, 224, 72, 255, 255, 255, 0, 224, 224, 224, 216, 224, 224, 224, 198, 255, 255, 255, 0, 255, 255, 255, 0, 225, 225, 225, 199, 224, 224, 224, 214, 255, 255, 255, 0, 226, 226, 226, 78, 224, 224, 224, 255, 224, 224, 224, 206, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 243, 224, 224, 224, 255, 226, 226, 226, 78, 255, 255, 255, 0, 224, 224, 224, 244, 225, 225, 225, 151, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 152, 224, 224, 224, 242, 255, 255, 255, 1, 227, 227, 227, 81, 224, 224, 224, 255, 224, 224, 224, 241, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 245, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 229, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 147, 225, 225, 225, 149, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 230, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 244, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 208, 224, 224, 224, 255, 224, 224, 224, 147, 224, 224, 224, 161, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 235, 224, 224, 224, 235, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 160, 225, 225, 225, 150, 224, 224, 224, 255, 224, 224, 224, 205, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 131, 224, 224, 224, 255, 224, 224, 224, 189, 255, 255, 255, 1, 224, 224, 224, 152, 224, 224, 224, 243, 255, 255, 255, 4, 255, 255, 255, 4, 224, 224, 224, 244, 225, 225, 225, 151, 255, 255, 255, 2, 225, 225, 225, 199, 224, 224, 224, 255, 225, 225, 225, 127, 255, 255, 255, 0, 255, 255, 255, 0, 236, 236, 236, 13, 224, 224, 224, 225, 224, 224, 224, 255, 224, 224, 224, 128, 225, 225, 225, 67, 224, 224, 224, 255, 225, 225, 225, 110, 226, 226, 226, 111, 224, 224, 224, 255, 225, 225, 225, 67, 225, 225, 225, 135, 224, 224, 224, 255, 224, 224, 224, 221, 234, 234, 234, 12, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 225, 225, 225, 68, 224, 224, 224, 254, 224, 224, 224, 255, 224, 224, 224, 194, 224, 224, 224, 220, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 219, 224, 224, 224, 196, 224, 224, 224, 255, 224, 224, 224, 253, 227, 227, 227, 62, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 66, 224, 224, 224, 225, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 220, 226, 226, 226, 61, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 237, 237, 237, 14, 224, 224, 224, 130, 224, 224, 224, 206, 224, 224, 224, 244, 224, 224, 224, 244, 224, 224, 224, 205, 225, 225, 225, 124, 230, 230, 230, 10, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0),
|
||||||
|
"format": "RGBA8",
|
||||||
|
"height": 16,
|
||||||
|
"mipmaps": false,
|
||||||
|
"width": 16
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="ImageTexture" id="ImageTexture_p6ab8"]
|
||||||
|
image = SubResource("Image_ta8yk")
|
||||||
|
|
||||||
|
[sub_resource type="Image" id="Image_rfjdh"]
|
||||||
|
data = {
|
||||||
|
"data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 225, 225, 225, 25, 226, 226, 226, 70, 229, 229, 229, 39, 255, 255, 255, 0, 226, 226, 226, 103, 224, 224, 224, 219, 224, 224, 224, 156, 255, 255, 255, 0, 255, 255, 255, 0, 226, 226, 226, 26, 225, 225, 225, 25, 255, 255, 255, 0, 224, 224, 224, 74, 224, 224, 224, 177, 226, 226, 226, 111, 255, 255, 255, 0, 224, 224, 224, 98, 224, 224, 224, 255, 225, 225, 225, 182, 255, 255, 255, 0, 228, 228, 228, 46, 224, 224, 224, 255, 224, 224, 224, 197, 255, 255, 255, 0, 224, 224, 224, 57, 224, 224, 224, 255, 224, 224, 224, 187, 255, 255, 255, 0, 225, 225, 225, 42, 224, 224, 224, 255, 224, 224, 224, 232, 255, 255, 255, 6, 224, 224, 224, 8, 225, 225, 225, 182, 224, 224, 224, 153, 255, 255, 255, 7, 255, 255, 255, 0, 228, 228, 228, 37, 255, 255, 255, 7, 255, 255, 255, 0, 229, 229, 229, 19, 224, 224, 224, 237, 224, 224, 224, 198, 225, 225, 225, 17, 255, 255, 255, 0, 227, 227, 227, 71, 224, 224, 224, 48, 255, 255, 255, 4, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 228, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 73, 224, 224, 224, 226, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0),
|
||||||
|
"format": "RGBA8",
|
||||||
|
"height": 16,
|
||||||
|
"mipmaps": false,
|
||||||
|
"width": 16
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="ImageTexture" id="ImageTexture_bbwjp"]
|
||||||
|
image = SubResource("Image_rfjdh")
|
||||||
|
|
||||||
|
[sub_resource type="Image" id="Image_002t5"]
|
||||||
|
data = {
|
||||||
|
"data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 33, 224, 224, 224, 255, 224, 224, 224, 255, 231, 231, 231, 31, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 226, 226, 226, 95, 224, 224, 224, 57, 255, 255, 255, 0, 224, 224, 224, 99, 224, 224, 224, 255, 224, 224, 224, 255, 225, 225, 225, 93, 255, 255, 255, 0, 224, 224, 224, 57, 224, 224, 224, 90, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 225, 225, 225, 93, 224, 224, 224, 255, 224, 224, 224, 254, 224, 224, 224, 165, 224, 224, 224, 217, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 214, 225, 225, 225, 167, 224, 224, 224, 254, 224, 224, 224, 254, 224, 224, 224, 88, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 228, 228, 228, 55, 224, 224, 224, 254, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 253, 225, 225, 225, 51, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 225, 225, 225, 166, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 160, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 33, 224, 224, 224, 99, 224, 224, 224, 217, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 186, 224, 224, 224, 32, 224, 224, 224, 33, 224, 224, 224, 187, 224, 224, 224, 255, 224, 224, 224, 255, 225, 225, 225, 215, 224, 224, 224, 98, 224, 224, 224, 32, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 33, 255, 255, 255, 0, 255, 255, 255, 0, 227, 227, 227, 36, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 33, 255, 255, 255, 0, 255, 255, 255, 0, 229, 229, 229, 38, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 231, 231, 231, 31, 226, 226, 226, 95, 224, 224, 224, 216, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 187, 225, 225, 225, 34, 226, 226, 226, 35, 224, 224, 224, 192, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 213, 226, 226, 226, 95, 231, 231, 231, 31, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 225, 225, 225, 166, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 163, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 57, 224, 224, 224, 254, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 254, 227, 227, 227, 54, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 90, 224, 224, 224, 254, 224, 224, 224, 253, 224, 224, 224, 161, 225, 225, 225, 215, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 213, 224, 224, 224, 162, 224, 224, 224, 253, 224, 224, 224, 253, 226, 226, 226, 86, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 88, 225, 225, 225, 51, 255, 255, 255, 0, 224, 224, 224, 98, 224, 224, 224, 255, 224, 224, 224, 255, 226, 226, 226, 95, 255, 255, 255, 0, 227, 227, 227, 53, 226, 226, 226, 86, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 32, 224, 224, 224, 255, 224, 224, 224, 255, 231, 231, 231, 31, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0),
|
||||||
|
"format": "RGBA8",
|
||||||
|
"height": 16,
|
||||||
|
"mipmaps": false,
|
||||||
|
"width": 16
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="ImageTexture" id="ImageTexture_ghict"]
|
||||||
|
image = SubResource("Image_002t5")
|
||||||
|
|
||||||
|
[sub_resource type="Image" id="Image_1kivx"]
|
||||||
|
data = {
|
||||||
|
"data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 4, 224, 224, 224, 99, 224, 224, 224, 213, 224, 224, 224, 212, 224, 224, 224, 97, 255, 255, 255, 4, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 4, 224, 224, 224, 99, 224, 224, 224, 222, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 220, 224, 224, 224, 97, 255, 255, 255, 4, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 4, 224, 224, 224, 99, 224, 224, 224, 222, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 213, 226, 226, 226, 87, 224, 224, 224, 88, 224, 224, 224, 214, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 220, 224, 224, 224, 97, 255, 255, 255, 4, 255, 255, 255, 0, 255, 255, 255, 0, 225, 225, 225, 199, 224, 224, 224, 255, 224, 224, 224, 255, 225, 225, 225, 215, 224, 224, 224, 89, 255, 255, 255, 2, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 2, 224, 224, 224, 90, 224, 224, 224, 216, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 194, 255, 255, 255, 0, 255, 255, 255, 4, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 221, 224, 224, 224, 99, 255, 255, 255, 4, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 5, 225, 225, 225, 101, 225, 225, 225, 223, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 3, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 213, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 222, 225, 225, 225, 100, 225, 225, 225, 100, 225, 225, 225, 223, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 3, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 2, 226, 226, 226, 87, 224, 224, 224, 213, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 2, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 2, 226, 226, 226, 87, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 1, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 225, 225, 225, 100, 255, 255, 255, 5, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 196, 224, 224, 224, 255, 224, 224, 224, 255, 225, 225, 225, 223, 225, 225, 225, 101, 255, 255, 255, 5, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 193, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 3, 225, 225, 225, 93, 224, 224, 224, 218, 224, 224, 224, 255, 224, 224, 224, 255, 225, 225, 225, 223, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 216, 225, 225, 225, 91, 255, 255, 255, 2, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 3, 225, 225, 225, 93, 224, 224, 224, 218, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 216, 225, 225, 225, 91, 255, 255, 255, 2, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 3, 225, 225, 225, 93, 224, 224, 224, 208, 225, 225, 225, 207, 225, 225, 225, 91, 255, 255, 255, 2, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0),
|
||||||
|
"format": "RGBA8",
|
||||||
|
"height": 16,
|
||||||
|
"mipmaps": false,
|
||||||
|
"width": 16
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="ImageTexture" id="ImageTexture_grjtr"]
|
||||||
|
image = SubResource("Image_1kivx")
|
||||||
|
|
||||||
|
[sub_resource type="Image" id="Image_6k5u0"]
|
||||||
|
data = {
|
||||||
|
"data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 184, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 181, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 226, 226, 226, 77, 225, 225, 225, 76, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 8, 224, 224, 224, 222, 224, 224, 224, 221, 224, 224, 224, 8, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 120, 224, 224, 224, 32, 224, 224, 224, 128, 224, 224, 224, 255, 224, 224, 224, 255, 225, 225, 225, 127, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 226, 226, 226, 35, 224, 224, 224, 248, 224, 224, 224, 195, 224, 224, 224, 247, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 247, 225, 225, 225, 34, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 224, 224, 224, 180, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 178, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 181, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 180, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0),
|
||||||
|
"format": "RGBA8",
|
||||||
|
"height": 16,
|
||||||
|
"mipmaps": false,
|
||||||
|
"width": 16
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="ImageTexture" id="ImageTexture_xupch"]
|
||||||
|
image = SubResource("Image_6k5u0")
|
||||||
|
|
||||||
|
[sub_resource type="Image" id="Image_sj6hy"]
|
||||||
|
data = {
|
||||||
|
"data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 225, 225, 225, 68, 224, 224, 224, 184, 224, 224, 224, 240, 224, 224, 224, 232, 224, 224, 224, 186, 227, 227, 227, 62, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 129, 224, 224, 224, 254, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 122, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 225, 225, 225, 68, 224, 224, 224, 254, 224, 224, 224, 254, 224, 224, 224, 123, 224, 224, 224, 32, 224, 224, 224, 33, 225, 225, 225, 125, 224, 224, 224, 254, 224, 224, 224, 254, 226, 226, 226, 69, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 184, 224, 224, 224, 255, 224, 224, 224, 123, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 225, 225, 225, 125, 224, 224, 224, 255, 225, 225, 225, 174, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 240, 224, 224, 224, 255, 231, 231, 231, 31, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 226, 226, 226, 35, 224, 224, 224, 255, 224, 224, 224, 233, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 232, 224, 224, 224, 255, 224, 224, 224, 32, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 228, 228, 228, 37, 224, 224, 224, 255, 224, 224, 224, 228, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 186, 224, 224, 224, 255, 224, 224, 224, 123, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 130, 224, 224, 224, 255, 224, 224, 224, 173, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 227, 227, 227, 62, 224, 224, 224, 255, 224, 224, 224, 254, 225, 225, 225, 126, 225, 225, 225, 34, 227, 227, 227, 36, 224, 224, 224, 131, 224, 224, 224, 255, 224, 224, 224, 255, 226, 226, 226, 77, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 122, 224, 224, 224, 254, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 210, 231, 231, 231, 21, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 226, 226, 226, 69, 225, 225, 225, 174, 224, 224, 224, 233, 224, 224, 224, 228, 224, 224, 224, 173, 226, 226, 226, 77, 224, 224, 224, 210, 224, 224, 224, 255, 224, 224, 224, 210, 231, 231, 231, 21, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 231, 231, 231, 21, 224, 224, 224, 210, 224, 224, 224, 255, 224, 224, 224, 210, 231, 231, 231, 21, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 231, 231, 231, 21, 224, 224, 224, 210, 224, 224, 224, 255, 224, 224, 224, 210, 231, 231, 231, 21, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 231, 231, 231, 21, 224, 224, 224, 210, 224, 224, 224, 227, 225, 225, 225, 34, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 231, 231, 231, 21, 225, 225, 225, 34, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0),
|
||||||
|
"format": "RGBA8",
|
||||||
|
"height": 16,
|
||||||
|
"mipmaps": false,
|
||||||
|
"width": 16
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="ImageTexture" id="ImageTexture_w6vkw"]
|
||||||
|
image = SubResource("Image_sj6hy")
|
||||||
|
|
||||||
|
[node name="QuickOpenPanel" type="PopupPanel" unique_id=1197081327]
|
||||||
|
oversampling_override = 1.0
|
||||||
|
script = ExtResource("1_3tl1s")
|
||||||
|
|
||||||
|
[node name="PanelContainer" type="PanelContainer" parent="." unique_id=170455275]
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_left = 4.0
|
||||||
|
offset_top = 4.0
|
||||||
|
offset_right = -4.0
|
||||||
|
offset_bottom = -4.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_vertical = 3
|
||||||
|
|
||||||
|
[node name="MarginContainer" type="MarginContainer" parent="PanelContainer" unique_id=811819428]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/margin_left = 5
|
||||||
|
theme_override_constants/margin_top = 5
|
||||||
|
theme_override_constants/margin_right = 5
|
||||||
|
theme_override_constants/margin_bottom = 5
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer/MarginContainer" unique_id=679259085]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 5
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer/MarginContainer/VBoxContainer" unique_id=150235257]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 4
|
||||||
|
|
||||||
|
[node name="FilterBar" type="TabBar" parent="PanelContainer/MarginContainer/VBoxContainer/HBoxContainer" unique_id=660360907]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
current_tab = 0
|
||||||
|
clip_tabs = false
|
||||||
|
scrolling_enabled = false
|
||||||
|
tab_count = 5
|
||||||
|
tab_0/title = "All"
|
||||||
|
tab_0/icon = SubResource("ImageTexture_p6ab8")
|
||||||
|
tab_1/title = "Scene"
|
||||||
|
tab_1/icon = SubResource("ImageTexture_bbwjp")
|
||||||
|
tab_2/title = "GDscript"
|
||||||
|
tab_2/icon = SubResource("ImageTexture_ghict")
|
||||||
|
tab_3/title = "Resource"
|
||||||
|
tab_3/icon = SubResource("ImageTexture_grjtr")
|
||||||
|
tab_4/title = "Other"
|
||||||
|
tab_4/icon = SubResource("ImageTexture_xupch")
|
||||||
|
|
||||||
|
[node name="SearchOptionBtn" type="OptionButton" parent="PanelContainer/MarginContainer/VBoxContainer/HBoxContainer" unique_id=902993731]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
selected = 0
|
||||||
|
item_count = 2
|
||||||
|
popup/item_0/text = "Project"
|
||||||
|
popup/item_0/id = 0
|
||||||
|
popup/item_1/text = "Project+Addons"
|
||||||
|
popup/item_1/id = 1
|
||||||
|
|
||||||
|
[node name="FilterTxt" type="LineEdit" parent="PanelContainer/MarginContainer/VBoxContainer" unique_id=721767691]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
placeholder_text = "Filter files"
|
||||||
|
right_icon = SubResource("ImageTexture_w6vkw")
|
||||||
|
|
||||||
|
[node name="FilesList" type="ItemList" parent="PanelContainer/MarginContainer/VBoxContainer" unique_id=190949578]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_vertical = 3
|
||||||
|
allow_reselect = true
|
||||||
85
addons/script-ide/tabbar/custom_tab.gd
Normal file
|
|
@ -0,0 +1,85 @@
|
||||||
|
@tool
|
||||||
|
extends Button
|
||||||
|
|
||||||
|
signal close_pressed
|
||||||
|
signal right_clicked
|
||||||
|
signal dragged_over
|
||||||
|
signal dropped(source_index: int, target_index: int)
|
||||||
|
|
||||||
|
var close_button: Button
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
icon_alignment = HORIZONTAL_ALIGNMENT_LEFT
|
||||||
|
alignment = HORIZONTAL_ALIGNMENT_LEFT
|
||||||
|
action_mode = ACTION_MODE_BUTTON_PRESS
|
||||||
|
auto_translate_mode = Node.AUTO_TRANSLATE_MODE_DISABLED
|
||||||
|
toggle_mode = true
|
||||||
|
|
||||||
|
func show_close_button():
|
||||||
|
if (close_button == null):
|
||||||
|
close_button = create_close_button()
|
||||||
|
|
||||||
|
add_child(close_button)
|
||||||
|
close_button.set_anchors_and_offsets_preset(Control.PRESET_CENTER_RIGHT)
|
||||||
|
|
||||||
|
func hide_close_button():
|
||||||
|
if (close_button != null):
|
||||||
|
remove_child(close_button)
|
||||||
|
|
||||||
|
func create_close_button() -> Button:
|
||||||
|
close_button = Button.new()
|
||||||
|
close_button.icon = EditorInterface.get_editor_theme().get_icon(&"Close", &"EditorIcons")
|
||||||
|
close_button.flat = true
|
||||||
|
close_button.focus_mode = Control.FOCUS_NONE
|
||||||
|
close_button.pressed.connect(on_close_pressed)
|
||||||
|
|
||||||
|
return close_button
|
||||||
|
|
||||||
|
func _gui_input(event: InputEvent) -> void:
|
||||||
|
if event is InputEventMouseButton && event.pressed:
|
||||||
|
if event.button_index == MOUSE_BUTTON_MIDDLE:
|
||||||
|
on_close_pressed()
|
||||||
|
elif (event.button_index == MOUSE_BUTTON_RIGHT):
|
||||||
|
button_pressed = true
|
||||||
|
on_right_click()
|
||||||
|
|
||||||
|
func on_right_click():
|
||||||
|
right_clicked.emit()
|
||||||
|
|
||||||
|
func on_close_pressed() -> void:
|
||||||
|
close_pressed.emit()
|
||||||
|
|
||||||
|
func _get_drag_data(at_position: Vector2) -> Variant:
|
||||||
|
var preview: Button = Button.new()
|
||||||
|
preview.text = text
|
||||||
|
preview.icon = icon
|
||||||
|
preview.icon_alignment = HORIZONTAL_ALIGNMENT_LEFT
|
||||||
|
preview.alignment = HORIZONTAL_ALIGNMENT_LEFT
|
||||||
|
preview.auto_translate_mode = Node.AUTO_TRANSLATE_MODE_DISABLED
|
||||||
|
preview.add_theme_stylebox_override(&"normal", get_theme_stylebox(&"normal"))
|
||||||
|
|
||||||
|
set_drag_preview(preview)
|
||||||
|
|
||||||
|
var drag_data: Dictionary[String, Variant]
|
||||||
|
drag_data["type"] = "script_list_element"
|
||||||
|
drag_data["script_list_element"] = EditorInterface.get_script_editor().get_current_editor()
|
||||||
|
drag_data["index"] = get_index()
|
||||||
|
|
||||||
|
return drag_data
|
||||||
|
|
||||||
|
func _can_drop_data(at_position: Vector2, data: Variant) -> bool:
|
||||||
|
if !(data is Dictionary):
|
||||||
|
return false
|
||||||
|
|
||||||
|
var can_drop: bool = data.has("index")
|
||||||
|
|
||||||
|
if (can_drop):
|
||||||
|
dragged_over.emit()
|
||||||
|
|
||||||
|
return can_drop
|
||||||
|
|
||||||
|
func _drop_data(at_position: Vector2, data: Variant) -> void:
|
||||||
|
if (!_can_drop_data(at_position, data)):
|
||||||
|
return
|
||||||
|
|
||||||
|
dropped.emit(data["index"], get_index())
|
||||||
1
addons/script-ide/tabbar/custom_tab.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://bppomxp4mri2o
|
||||||
434
addons/script-ide/tabbar/multiline_tab_container.gd
Normal file
|
|
@ -0,0 +1,434 @@
|
||||||
|
@tool
|
||||||
|
extends PanelContainer
|
||||||
|
|
||||||
|
const CLOSE_BTN_SPACER: String = " "
|
||||||
|
|
||||||
|
const CustomTab := preload("custom_tab.gd")
|
||||||
|
|
||||||
|
@onready var multiline_tab_bar: HFlowContainer = %MultilineTabBar
|
||||||
|
@onready var popup_btn: Button = %PopupBtn
|
||||||
|
|
||||||
|
var tab_hovered: StyleBoxFlat
|
||||||
|
var tab_focus: StyleBoxFlat
|
||||||
|
var tab_selected: StyleBoxFlat
|
||||||
|
var tab_unselected: StyleBoxFlat
|
||||||
|
|
||||||
|
var font_selected_color: Color
|
||||||
|
var font_unselected_color: Color
|
||||||
|
var font_hovered_color: Color
|
||||||
|
|
||||||
|
var show_close_button_always: bool = false : set = set_show_close_button_always
|
||||||
|
var is_singleline_tabs: bool = false : set = set_singleline_tabs
|
||||||
|
|
||||||
|
var tab_group: ButtonGroup = ButtonGroup.new()
|
||||||
|
|
||||||
|
var script_filter_txt: LineEdit
|
||||||
|
var scripts_item_list: ItemList
|
||||||
|
var scripts_tab_container: TabContainer
|
||||||
|
var popup: PopupPanel
|
||||||
|
|
||||||
|
var plugin: EditorPlugin
|
||||||
|
|
||||||
|
var suppress_theme_changed: bool
|
||||||
|
|
||||||
|
var last_drag_over_tab: CustomTab
|
||||||
|
var drag_marker: ColorRect
|
||||||
|
var current_tab: CustomTab
|
||||||
|
|
||||||
|
func _init() -> void:
|
||||||
|
tab_group.pressed.connect(on_new_tab_selected)
|
||||||
|
|
||||||
|
#region Plugin and related tab handling processing
|
||||||
|
func _ready() -> void:
|
||||||
|
popup_btn.pressed.connect(show_popup)
|
||||||
|
|
||||||
|
set_process(false)
|
||||||
|
|
||||||
|
if (plugin != null):
|
||||||
|
schedule_update()
|
||||||
|
|
||||||
|
func _notification(what: int) -> void:
|
||||||
|
if (what == NOTIFICATION_DRAG_END || what == NOTIFICATION_MOUSE_EXIT):
|
||||||
|
clear_drag_mark()
|
||||||
|
return
|
||||||
|
|
||||||
|
if (what == NOTIFICATION_THEME_CHANGED):
|
||||||
|
if (suppress_theme_changed):
|
||||||
|
return
|
||||||
|
|
||||||
|
suppress_theme_changed = true
|
||||||
|
add_theme_stylebox_override(&"panel", EditorInterface.get_editor_theme().get_stylebox(&"tabbar_background", &"TabContainer"))
|
||||||
|
suppress_theme_changed = false
|
||||||
|
|
||||||
|
tab_hovered = EditorInterface.get_editor_theme().get_stylebox(&"tab_hovered", &"TabContainer")
|
||||||
|
tab_focus = EditorInterface.get_editor_theme().get_stylebox(&"tab_focus", &"TabContainer")
|
||||||
|
tab_selected = EditorInterface.get_editor_theme().get_stylebox(&"tab_selected", &"TabContainer")
|
||||||
|
tab_unselected = EditorInterface.get_editor_theme().get_stylebox(&"tab_unselected", &"TabContainer")
|
||||||
|
|
||||||
|
if (drag_marker == null):
|
||||||
|
drag_marker = ColorRect.new()
|
||||||
|
drag_marker.set_anchors_and_offsets_preset(PRESET_LEFT_WIDE)
|
||||||
|
drag_marker.mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||||||
|
drag_marker.custom_minimum_size.x = 4 * EditorInterface.get_editor_scale()
|
||||||
|
drag_marker.color = EditorInterface.get_editor_theme().get_color(&"drop_mark_color", &"TabContainer")
|
||||||
|
|
||||||
|
font_hovered_color = EditorInterface.get_editor_theme().get_color(&"font_hovered_color", &"TabContainer")
|
||||||
|
font_selected_color = EditorInterface.get_editor_theme().get_color(&"font_selected_color", &"TabContainer")
|
||||||
|
font_unselected_color = EditorInterface.get_editor_theme().get_color(&"font_unselected_color", &"TabContainer")
|
||||||
|
|
||||||
|
if (plugin == null || multiline_tab_bar == null):
|
||||||
|
return
|
||||||
|
|
||||||
|
for tab: CustomTab in get_tabs():
|
||||||
|
update_tab_style(tab)
|
||||||
|
|
||||||
|
func update_tab_style(tab: CustomTab):
|
||||||
|
tab.add_theme_stylebox_override(&"normal", tab_unselected)
|
||||||
|
tab.add_theme_stylebox_override(&"hover", tab_hovered)
|
||||||
|
tab.add_theme_stylebox_override(&"hover_pressed", tab_hovered)
|
||||||
|
tab.add_theme_stylebox_override(&"focus", tab_focus)
|
||||||
|
tab.add_theme_stylebox_override(&"pressed", tab_selected)
|
||||||
|
|
||||||
|
tab.add_theme_color_override(&"font_color", font_unselected_color)
|
||||||
|
tab.add_theme_color_override(&"font_hover_color", font_hovered_color)
|
||||||
|
tab.add_theme_color_override(&"font_pressed_color", font_selected_color)
|
||||||
|
|
||||||
|
func update_icon_color(tab: CustomTab, color: Color):
|
||||||
|
tab.add_theme_color_override(&"icon_normal_color", color)
|
||||||
|
tab.add_theme_color_override(&"icon_hover_color", color)
|
||||||
|
tab.add_theme_color_override(&"icon_hover_pressed_color", color)
|
||||||
|
tab.add_theme_color_override(&"icon_pressed_color", color)
|
||||||
|
tab.add_theme_color_override(&"icon_focus_color", color)
|
||||||
|
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
sync_tabs_with_item_list()
|
||||||
|
|
||||||
|
if (is_singleline_tabs):
|
||||||
|
shift_singleline_tabs_to(current_tab)
|
||||||
|
|
||||||
|
set_process(false)
|
||||||
|
|
||||||
|
func _shortcut_input(event: InputEvent) -> void:
|
||||||
|
if (!event.is_pressed() || event.is_echo()):
|
||||||
|
return
|
||||||
|
|
||||||
|
if (!is_visible_in_tree()):
|
||||||
|
return
|
||||||
|
|
||||||
|
if (current_tab == null):
|
||||||
|
return
|
||||||
|
|
||||||
|
if (plugin.tab_cycle_forward_shc.matches_event(event)):
|
||||||
|
get_viewport().set_input_as_handled()
|
||||||
|
|
||||||
|
var tab_count: int = get_tab_count()
|
||||||
|
if (tab_count <= 1):
|
||||||
|
return
|
||||||
|
|
||||||
|
var index: int = current_tab.get_index()
|
||||||
|
var new_tab: int = index + 1
|
||||||
|
if (new_tab == tab_count):
|
||||||
|
new_tab = 0
|
||||||
|
|
||||||
|
var tab: CustomTab = get_tab(new_tab)
|
||||||
|
tab.button_pressed = true
|
||||||
|
elif (plugin.tab_cycle_backward_shc.matches_event(event)):
|
||||||
|
get_viewport().set_input_as_handled()
|
||||||
|
|
||||||
|
var tab_count: int = get_tab_count()
|
||||||
|
if (tab_count <= 1):
|
||||||
|
return
|
||||||
|
|
||||||
|
var index: int = current_tab.get_index()
|
||||||
|
var new_tab: int = index - 1
|
||||||
|
if (new_tab == -1):
|
||||||
|
new_tab = tab_count - 1
|
||||||
|
|
||||||
|
var tab: CustomTab = get_tab(new_tab)
|
||||||
|
tab.button_pressed = true
|
||||||
|
|
||||||
|
func _can_drop_data(at_position: Vector2, data: Variant) -> bool:
|
||||||
|
if !(data is Dictionary):
|
||||||
|
return false
|
||||||
|
|
||||||
|
var can_drop: bool = data.has("index") && data["index"] != get_tab_count() - 1
|
||||||
|
|
||||||
|
if (can_drop):
|
||||||
|
on_drag_over(get_tab(get_tab_count() - 1))
|
||||||
|
|
||||||
|
return can_drop
|
||||||
|
|
||||||
|
func _drop_data(at_position: Vector2, data: Variant) -> void:
|
||||||
|
if (!_can_drop_data(at_position, data)):
|
||||||
|
return
|
||||||
|
|
||||||
|
on_drag_drop(data["index"], get_tab_count() - 1)
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
func schedule_update():
|
||||||
|
set_process(true)
|
||||||
|
|
||||||
|
func on_drag_drop(source_index: int, target_index: int):
|
||||||
|
var child: Node = scripts_tab_container.get_child(source_index)
|
||||||
|
scripts_tab_container.move_child(child, target_index);
|
||||||
|
|
||||||
|
var tab: CustomTab = get_tab(target_index)
|
||||||
|
tab.grab_focus()
|
||||||
|
|
||||||
|
func on_drag_over(tab: CustomTab):
|
||||||
|
if (last_drag_over_tab == tab):
|
||||||
|
return
|
||||||
|
|
||||||
|
# The drag marker should always be orphan when here.
|
||||||
|
tab.add_child(drag_marker)
|
||||||
|
|
||||||
|
last_drag_over_tab = tab
|
||||||
|
|
||||||
|
func clear_drag_mark():
|
||||||
|
if (last_drag_over_tab == null):
|
||||||
|
return
|
||||||
|
|
||||||
|
last_drag_over_tab = null
|
||||||
|
if (drag_marker.get_parent() != null):
|
||||||
|
drag_marker.get_parent().remove_child(drag_marker)
|
||||||
|
|
||||||
|
func update_tabs():
|
||||||
|
update_script_text_filter()
|
||||||
|
|
||||||
|
for tab: CustomTab in get_tabs():
|
||||||
|
update_tab(tab)
|
||||||
|
|
||||||
|
func get_tabs() -> Array[Node]:
|
||||||
|
return multiline_tab_bar.get_children()
|
||||||
|
|
||||||
|
func update_selected_tab():
|
||||||
|
update_tab(tab_group.get_pressed_button())
|
||||||
|
|
||||||
|
func update_tab(tab: CustomTab):
|
||||||
|
if (tab == null):
|
||||||
|
return
|
||||||
|
|
||||||
|
var index: int = tab.get_index()
|
||||||
|
|
||||||
|
tab.text = scripts_item_list.get_item_text(index)
|
||||||
|
tab.icon = scripts_item_list.get_item_icon(index)
|
||||||
|
tab.tooltip_text = scripts_item_list.get_item_tooltip(index)
|
||||||
|
|
||||||
|
update_icon_color(tab, scripts_item_list.get_item_icon_modulate(index))
|
||||||
|
|
||||||
|
if (scripts_item_list.is_selected(index)):
|
||||||
|
tab.button_pressed = true
|
||||||
|
tab.text += CLOSE_BTN_SPACER
|
||||||
|
elif (show_close_button_always):
|
||||||
|
tab.text += CLOSE_BTN_SPACER
|
||||||
|
|
||||||
|
func get_tab(index: int) -> CustomTab:
|
||||||
|
if (index < 0 || index >= get_tab_count()):
|
||||||
|
return null
|
||||||
|
|
||||||
|
return multiline_tab_bar.get_child(index)
|
||||||
|
|
||||||
|
func get_tab_count() -> int:
|
||||||
|
return multiline_tab_bar.get_child_count()
|
||||||
|
|
||||||
|
func add_tab() -> CustomTab:
|
||||||
|
var tab: CustomTab = CustomTab.new()
|
||||||
|
tab.button_group = tab_group
|
||||||
|
|
||||||
|
if (show_close_button_always):
|
||||||
|
tab.show_close_button()
|
||||||
|
|
||||||
|
update_tab_style(tab)
|
||||||
|
|
||||||
|
tab.close_pressed.connect(on_tab_close_pressed.bind(tab))
|
||||||
|
tab.right_clicked.connect(on_tab_right_click.bind(tab))
|
||||||
|
tab.mouse_exited.connect(clear_drag_mark)
|
||||||
|
tab.dragged_over.connect(on_drag_over.bind(tab))
|
||||||
|
tab.dropped.connect(on_drag_drop)
|
||||||
|
|
||||||
|
multiline_tab_bar.add_child(tab)
|
||||||
|
return tab
|
||||||
|
|
||||||
|
func on_tab_right_click(tab: CustomTab):
|
||||||
|
var index: int = tab.get_index()
|
||||||
|
scripts_item_list.item_clicked.emit(index, scripts_item_list.get_local_mouse_position(), MOUSE_BUTTON_RIGHT)
|
||||||
|
|
||||||
|
func on_new_tab_selected(tab: CustomTab):
|
||||||
|
# Hide and show close button.
|
||||||
|
if (!show_close_button_always):
|
||||||
|
if (current_tab != null):
|
||||||
|
current_tab.hide_close_button()
|
||||||
|
|
||||||
|
if (tab != null):
|
||||||
|
tab.show_close_button()
|
||||||
|
|
||||||
|
update_script_text_filter()
|
||||||
|
|
||||||
|
var index: int = tab.get_index()
|
||||||
|
if (scripts_item_list != null && !scripts_item_list.is_selected(index)):
|
||||||
|
scripts_item_list.select(index)
|
||||||
|
scripts_item_list.item_selected.emit(index)
|
||||||
|
scripts_item_list.ensure_current_is_visible()
|
||||||
|
|
||||||
|
# Remove spacing from previous tab.
|
||||||
|
if (!show_close_button_always && current_tab != null):
|
||||||
|
update_tab(current_tab)
|
||||||
|
current_tab = tab
|
||||||
|
|
||||||
|
## Removes the script filter text and emits the signal so that the tabs stay
|
||||||
|
## and we do not break anything there.
|
||||||
|
func update_script_text_filter():
|
||||||
|
if (script_filter_txt.text != &""):
|
||||||
|
script_filter_txt.text = &""
|
||||||
|
script_filter_txt.text_changed.emit(&"")
|
||||||
|
|
||||||
|
func on_tab_close_pressed(tab: CustomTab) -> void:
|
||||||
|
scripts_item_list.item_clicked.emit(tab.get_index(), scripts_item_list.get_local_mouse_position(), MOUSE_BUTTON_MIDDLE)
|
||||||
|
|
||||||
|
func sync_tabs_with_item_list() -> void:
|
||||||
|
if (plugin == null):
|
||||||
|
return
|
||||||
|
|
||||||
|
if (get_tab_count() > scripts_item_list.item_count):
|
||||||
|
for index: int in range(get_tab_count() - 1, scripts_item_list.item_count - 1, -1):
|
||||||
|
var tab: CustomTab = get_tab(index)
|
||||||
|
|
||||||
|
if (tab == current_tab):
|
||||||
|
current_tab = null
|
||||||
|
|
||||||
|
multiline_tab_bar.remove_child(tab)
|
||||||
|
tab.free()
|
||||||
|
|
||||||
|
for index: int in scripts_item_list.item_count:
|
||||||
|
var tab: CustomTab = get_tab(index)
|
||||||
|
if (tab == null):
|
||||||
|
tab = add_tab()
|
||||||
|
|
||||||
|
update_tab(tab)
|
||||||
|
|
||||||
|
func tab_changed():
|
||||||
|
update_script_text_filter()
|
||||||
|
|
||||||
|
# When the tab change was not triggered by our component,
|
||||||
|
# we need to sync the selection.
|
||||||
|
update_tab(get_tab(scripts_tab_container.current_tab))
|
||||||
|
|
||||||
|
func script_order_changed() -> void:
|
||||||
|
schedule_update()
|
||||||
|
|
||||||
|
func set_popup(new_popup: PopupPanel) -> void:
|
||||||
|
popup = new_popup
|
||||||
|
|
||||||
|
func show_popup() -> void:
|
||||||
|
if (popup == null):
|
||||||
|
return
|
||||||
|
|
||||||
|
scripts_item_list.get_parent().reparent(popup)
|
||||||
|
scripts_item_list.get_parent().visible = true
|
||||||
|
|
||||||
|
popup.size = Vector2(250 * get_editor_scale(), get_parent().size.y - size.y)
|
||||||
|
popup.position = popup_btn.get_screen_position() - Vector2(popup.size.x, 0)
|
||||||
|
popup.popup()
|
||||||
|
|
||||||
|
script_filter_txt.grab_focus()
|
||||||
|
|
||||||
|
func get_editor_scale() -> float:
|
||||||
|
return EditorInterface.get_editor_scale()
|
||||||
|
|
||||||
|
func set_show_close_button_always(new_value: bool):
|
||||||
|
if (show_close_button_always == new_value):
|
||||||
|
return
|
||||||
|
|
||||||
|
show_close_button_always = new_value
|
||||||
|
|
||||||
|
if (multiline_tab_bar == null):
|
||||||
|
return
|
||||||
|
|
||||||
|
for tab: CustomTab in get_tabs():
|
||||||
|
tab.text = scripts_item_list.get_item_text(tab.get_index())
|
||||||
|
if (show_close_button_always):
|
||||||
|
tab.text += CLOSE_BTN_SPACER
|
||||||
|
if (!tab.button_pressed):
|
||||||
|
tab.show_close_button()
|
||||||
|
else:
|
||||||
|
if (!tab.button_pressed):
|
||||||
|
tab.hide_close_button()
|
||||||
|
else:
|
||||||
|
tab.text += CLOSE_BTN_SPACER
|
||||||
|
|
||||||
|
#region Singeline handling
|
||||||
|
func set_singleline_tabs(new_value: bool):
|
||||||
|
if (is_singleline_tabs == new_value):
|
||||||
|
return
|
||||||
|
|
||||||
|
is_singleline_tabs = new_value
|
||||||
|
|
||||||
|
if (is_singleline_tabs):
|
||||||
|
item_rect_changed.connect(update_singleline_tabs_width)
|
||||||
|
tab_group.pressed.connect(ensure_singleline_tab_visible.unbind(1))
|
||||||
|
|
||||||
|
if (multiline_tab_bar == null):
|
||||||
|
return
|
||||||
|
|
||||||
|
shift_singleline_tabs_to(current_tab)
|
||||||
|
else:
|
||||||
|
item_rect_changed.disconnect(update_singleline_tabs_width)
|
||||||
|
tab_group.pressed.disconnect(ensure_singleline_tab_visible)
|
||||||
|
|
||||||
|
if (multiline_tab_bar == null):
|
||||||
|
return
|
||||||
|
|
||||||
|
for tab: CustomTab in get_tabs():
|
||||||
|
tab.visible = true
|
||||||
|
|
||||||
|
func ensure_singleline_tab_visible():
|
||||||
|
if (current_tab != null && current_tab.visible):
|
||||||
|
return
|
||||||
|
|
||||||
|
shift_singleline_tabs_to(current_tab)
|
||||||
|
|
||||||
|
func update_singleline_tabs_width():
|
||||||
|
if (current_tab != null && !current_tab.visible):
|
||||||
|
shift_singleline_tabs_to(current_tab)
|
||||||
|
return
|
||||||
|
|
||||||
|
for tab: CustomTab in get_tabs():
|
||||||
|
if (tab.visible):
|
||||||
|
shift_singleline_tabs_to(tab)
|
||||||
|
break
|
||||||
|
|
||||||
|
func shift_singleline_tabs_to(start_tab: CustomTab):
|
||||||
|
var start: bool
|
||||||
|
var tab_bar_width: float = multiline_tab_bar.size.x
|
||||||
|
var tabs_width: float
|
||||||
|
var one_fit: bool = true
|
||||||
|
|
||||||
|
for tab: CustomTab in get_tabs():
|
||||||
|
if (start_tab == null || tab == start_tab):
|
||||||
|
start = true
|
||||||
|
|
||||||
|
if (start):
|
||||||
|
tabs_width += tab.size.x
|
||||||
|
|
||||||
|
tab.visible = tabs_width <= tab_bar_width
|
||||||
|
one_fit = one_fit || tab.visible
|
||||||
|
else:
|
||||||
|
tab.visible = false
|
||||||
|
|
||||||
|
if (current_tab != null && !current_tab.visible):
|
||||||
|
if (start_tab != current_tab):
|
||||||
|
shift_singleline_tabs_to(current_tab)
|
||||||
|
return
|
||||||
|
|
||||||
|
if (start_tab == null):
|
||||||
|
return
|
||||||
|
|
||||||
|
for index: int in range(start_tab.get_index() - 1, -1, -1):
|
||||||
|
var tab: CustomTab = get_tabs().get(index)
|
||||||
|
|
||||||
|
tabs_width += tab.size.x
|
||||||
|
if (tabs_width > tab_bar_width):
|
||||||
|
return
|
||||||
|
|
||||||
|
tab.visible = true
|
||||||
|
#endregion
|
||||||
1
addons/script-ide/tabbar/multiline_tab_container.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://l1rdargfn67o
|
||||||
39
addons/script-ide/tabbar/multiline_tab_container.tscn
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
[gd_scene format=3 uid="uid://vjuhunm2uboy"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://l1rdargfn67o" path="res://addons/script-ide/tabbar/multiline_tab_container.gd" id="1_8jr3v"]
|
||||||
|
|
||||||
|
[sub_resource type="DPITexture" id="DPITexture_p4126"]
|
||||||
|
_source = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\"><path fill=\"#e0e0e0\" fill-opacity=\".4\" d=\"M8 0a2 2 0 0 0 0 4 2 2 0 0 0 0-4zm0 6a2 2 0 0 0 0 4 2 2 0 0 0 0-4zm0 6a2 2 0 0 0 0 4 2 2 0 0 0 0-4z\"/></svg>
|
||||||
|
"
|
||||||
|
saturation = 1.8
|
||||||
|
color_map = {
|
||||||
|
Color(1, 0.37254903, 0.37254903, 1): Color(1, 0.47, 0.42, 1),
|
||||||
|
Color(0.37254903, 1, 0.5921569, 1): Color(0.45, 0.95, 0.5, 1),
|
||||||
|
Color(1, 0.8666667, 0.39607844, 1): Color(1, 0.87, 0.4, 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="MultilineTabContainer" type="PanelContainer" unique_id=635880120]
|
||||||
|
anchors_preset = 10
|
||||||
|
anchor_right = 1.0
|
||||||
|
offset_bottom = 28.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
script = ExtResource("1_8jr3v")
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="." unique_id=932291510]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
theme_override_constants/separation = 0
|
||||||
|
|
||||||
|
[node name="MultilineTabBar" type="HFlowContainer" parent="HBoxContainer" unique_id=2135340034]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
theme_override_constants/h_separation = 0
|
||||||
|
theme_override_constants/v_separation = 0
|
||||||
|
|
||||||
|
[node name="PopupBtn" type="Button" parent="HBoxContainer" unique_id=1586924518]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 8
|
||||||
|
icon = SubResource("DPITexture_p4126")
|
||||||
BIN
assets/fonts/AcPlus_IBM_EGA_8x14.ttf
Normal file
41
assets/fonts/AcPlus_IBM_EGA_8x14.ttf.import
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="font_data_dynamic"
|
||||||
|
type="FontFile"
|
||||||
|
uid="uid://wa68dxbjvpy3"
|
||||||
|
path="res://.godot/imported/AcPlus_IBM_EGA_8x14.ttf-a805a9908484f36aeca3cafc4b3e4e7d.fontdata"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/fonts/AcPlus_IBM_EGA_8x14.ttf"
|
||||||
|
dest_files=["res://.godot/imported/AcPlus_IBM_EGA_8x14.ttf-a805a9908484f36aeca3cafc4b3e4e7d.fontdata"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
Rendering=null
|
||||||
|
antialiasing=0
|
||||||
|
generate_mipmaps=false
|
||||||
|
disable_embedded_bitmaps=true
|
||||||
|
multichannel_signed_distance_field=false
|
||||||
|
msdf_pixel_range=8
|
||||||
|
msdf_size=48
|
||||||
|
allow_system_fallback=true
|
||||||
|
force_autohinter=false
|
||||||
|
modulate_color_glyphs=false
|
||||||
|
hinting=1
|
||||||
|
subpixel_positioning=4
|
||||||
|
keep_rounding_remainders=true
|
||||||
|
oversampling=0.0
|
||||||
|
Fallbacks=null
|
||||||
|
fallbacks=[]
|
||||||
|
Compress=null
|
||||||
|
compress=true
|
||||||
|
preload=[{
|
||||||
|
"chars": [],
|
||||||
|
"glyphs": [],
|
||||||
|
"name": "New Configuration",
|
||||||
|
"size": Vector2i(16, 0)
|
||||||
|
}]
|
||||||
|
language_support={}
|
||||||
|
script_support={}
|
||||||
|
opentype_features={}
|
||||||
BIN
assets/fonts/AcPlus_ToshibaSat_8x14.ttf
Normal file
42
assets/fonts/AcPlus_ToshibaSat_8x14.ttf.import
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="font_data_dynamic"
|
||||||
|
type="FontFile"
|
||||||
|
uid="uid://b3axvyht1jan2"
|
||||||
|
path="res://.godot/imported/AcPlus_ToshibaSat_8x14.ttf-d5dafe6dac0670aeede1df5286a30615.fontdata"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/fonts/AcPlus_ToshibaSat_8x14.ttf"
|
||||||
|
dest_files=["res://.godot/imported/AcPlus_ToshibaSat_8x14.ttf-d5dafe6dac0670aeede1df5286a30615.fontdata"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
Rendering=null
|
||||||
|
antialiasing=0
|
||||||
|
generate_mipmaps=false
|
||||||
|
disable_embedded_bitmaps=true
|
||||||
|
multichannel_signed_distance_field=false
|
||||||
|
msdf_pixel_range=8
|
||||||
|
msdf_size=48
|
||||||
|
allow_system_fallback=true
|
||||||
|
force_autohinter=false
|
||||||
|
modulate_color_glyphs=false
|
||||||
|
hinting=2
|
||||||
|
subpixel_positioning=4
|
||||||
|
keep_rounding_remainders=true
|
||||||
|
oversampling=0.0
|
||||||
|
Fallbacks=null
|
||||||
|
fallbacks=[]
|
||||||
|
Compress=null
|
||||||
|
compress=true
|
||||||
|
preload=[{
|
||||||
|
"chars": [],
|
||||||
|
"glyphs": [],
|
||||||
|
"name": "New Configuration",
|
||||||
|
"size": Vector2i(16, 0),
|
||||||
|
&"variation_embolden": 0.0
|
||||||
|
}]
|
||||||
|
language_support={}
|
||||||
|
script_support={}
|
||||||
|
opentype_features={}
|
||||||
BIN
assets/media/mis_portret.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
40
assets/media/mis_portret.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bscowe58v4ymo"
|
||||||
|
path="res://.godot/imported/mis_portret.png-4b1b8cd973980784f81d7ee83209bcd3.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/media/mis_portret.png"
|
||||||
|
dest_files=["res://.godot/imported/mis_portret.png-4b1b8cd973980784f81d7ee83209bcd3.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
|
||||||
18
assets/themes/main_theme.tres
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
[gd_resource type="Theme" load_steps=7 format=3 uid="uid://dy41x4ott07ql"]
|
||||||
|
|
||||||
|
[ext_resource type="StyleBox" uid="uid://ccceyx6def6q2" path="res://assets/themes/sbf/sbf_button_hover.tres" id="1_axncs"]
|
||||||
|
[ext_resource type="StyleBox" uid="uid://88r6i8w6wdup" path="res://assets/themes/sbf/sbf_button_normal.tres" id="1_vhku8"]
|
||||||
|
[ext_resource type="StyleBox" uid="uid://5s2poasttuwg" path="res://assets/themes/sbf/sbf_button_pressed.tres" id="2_axncs"]
|
||||||
|
[ext_resource type="StyleBox" uid="uid://c3dcm6w7ns4wk" path="res://assets/themes/sbf/sbf_focus_lineedit.tres" id="2_gvtt4"]
|
||||||
|
[ext_resource type="FontFile" uid="uid://b3axvyht1jan2" path="res://assets/fonts/AcPlus_ToshibaSat_8x14.ttf" id="6_4fp8c"]
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_axncs"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
default_font = ExtResource("6_4fp8c")
|
||||||
|
default_font_size = 32
|
||||||
|
Button/styles/focus = SubResource("StyleBoxEmpty_axncs")
|
||||||
|
Button/styles/hover = ExtResource("1_axncs")
|
||||||
|
Button/styles/normal = ExtResource("1_vhku8")
|
||||||
|
Button/styles/pressed = ExtResource("2_axncs")
|
||||||
|
LineEdit/styles/focus = ExtResource("2_gvtt4")
|
||||||
4
assets/themes/sbf/sbf_button_focus.tres
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
[gd_resource type="StyleBoxFlat" format=3 uid="uid://eq6uebxtu3vp"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
bg_color = Color(0, 0.8, 0.6, 0.69411767)
|
||||||
8
assets/themes/sbf/sbf_button_hover.tres
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
[gd_resource type="StyleBoxFlat" format=3 uid="uid://ccceyx6def6q2"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
content_margin_left = 5.0
|
||||||
|
content_margin_top = 5.0
|
||||||
|
content_margin_right = 5.0
|
||||||
|
content_margin_bottom = 5.0
|
||||||
|
bg_color = Color(0.09803922, 0.03529412, 0.2, 1)
|
||||||
8
assets/themes/sbf/sbf_button_normal.tres
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
[gd_resource type="StyleBoxFlat" format=3 uid="uid://88r6i8w6wdup"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
content_margin_left = 5.0
|
||||||
|
content_margin_top = 5.0
|
||||||
|
content_margin_right = 5.0
|
||||||
|
content_margin_bottom = 5.0
|
||||||
|
bg_color = Color(0.043137256, 0.015686275, 0.09019608, 1)
|
||||||
8
assets/themes/sbf/sbf_button_pressed.tres
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
[gd_resource type="StyleBoxFlat" format=3 uid="uid://5s2poasttuwg"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
content_margin_left = 5.0
|
||||||
|
content_margin_top = 5.0
|
||||||
|
content_margin_right = 5.0
|
||||||
|
content_margin_bottom = 5.0
|
||||||
|
bg_color = Color(0.5176471, 0.05882353, 0.2, 1)
|
||||||
9
assets/themes/sbf/sbf_focus_lineedit.tres
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
[gd_resource type="StyleBoxFlat" format=3 uid="uid://c3dcm6w7ns4wk"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
bg_color = Color(0.18039216, 0.18039216, 0.18039216, 1)
|
||||||
|
border_width_left = 1
|
||||||
|
border_width_top = 1
|
||||||
|
border_width_right = 1
|
||||||
|
border_width_bottom = 1
|
||||||
|
border_color = Color(0.97600263, 0.3896948, 0.59881276, 1)
|
||||||
34
project.godot
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
; 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="neowarsaw"
|
||||||
|
run/main_scene="uid://dt41bt5fi3t47"
|
||||||
|
config/features=PackedStringArray("4.5", "Forward Plus")
|
||||||
|
|
||||||
|
[autoload]
|
||||||
|
|
||||||
|
Global="*res://scenes/global.gd"
|
||||||
|
|
||||||
|
[display]
|
||||||
|
|
||||||
|
window/size/viewport_width=800
|
||||||
|
window/size/viewport_height=600
|
||||||
|
window/size/resizable=false
|
||||||
|
|
||||||
|
[editor]
|
||||||
|
|
||||||
|
version_control/plugin_name="GitPlugin"
|
||||||
|
version_control/autoload_on_startup=true
|
||||||
|
|
||||||
|
[editor_plugins]
|
||||||
|
|
||||||
|
enabled=PackedStringArray("res://addons/script-ide/plugin.cfg")
|
||||||
25
scenes/create_player/main.gd
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
extends Control
|
||||||
|
|
||||||
|
## Scene variables
|
||||||
|
@onready var new_character = get_node("Character/NewCharacter")
|
||||||
|
|
||||||
|
## Vars
|
||||||
|
@onready var button_new = get_node("Menu/New")
|
||||||
|
@onready var menu = get_node("Menu")
|
||||||
|
@onready var button_test = get_node("Top/TopMenu/ButtonTest")
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
pass
|
||||||
|
|
||||||
|
func _on_button_quit_pressed() -> void:
|
||||||
|
get_tree().quit()
|
||||||
|
|
||||||
|
func _on_new_pressed() -> void:
|
||||||
|
toggle_mode()
|
||||||
|
|
||||||
|
func toggle_mode() -> void:
|
||||||
|
new_character.visible = !new_character.visible
|
||||||
|
if menu.is_visible_in_tree():
|
||||||
|
menu.hide()
|
||||||
|
else:
|
||||||
|
menu.show()
|
||||||
1
scenes/create_player/main.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://djdhpn3mtkuh3
|
||||||
106
scenes/create_player/main.tscn
Normal file
|
|
@ -0,0 +1,106 @@
|
||||||
|
[gd_scene load_steps=6 format=3 uid="uid://dt41bt5fi3t47"]
|
||||||
|
|
||||||
|
[ext_resource type="Theme" uid="uid://dy41x4ott07ql" path="res://assets/themes/main_theme.tres" id="2_s4h7g"]
|
||||||
|
[ext_resource type="Script" uid="uid://djdhpn3mtkuh3" path="res://scenes/create_player/main.gd" id="2_ysn76"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://odjphawrdiw8" path="res://scenes/create_player/new_character/new_character.tscn" id="3_ysn76"]
|
||||||
|
|
||||||
|
[sub_resource type="ButtonGroup" id="ButtonGroup_ysn76"]
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_yty2c"]
|
||||||
|
|
||||||
|
[node name="Main" type="Control"]
|
||||||
|
custom_minimum_size = Vector2(640, 480)
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme = ExtResource("2_s4h7g")
|
||||||
|
script = ExtResource("2_ysn76")
|
||||||
|
|
||||||
|
[node name="Background" type="ColorRect" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
color = Color(0.050980393, 0.15294118, 0.19607843, 1)
|
||||||
|
|
||||||
|
[node name="Top" type="MarginContainer" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 10
|
||||||
|
anchor_right = 1.0
|
||||||
|
offset_bottom = 38.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
theme_override_constants/margin_left = 5
|
||||||
|
theme_override_constants/margin_top = 5
|
||||||
|
theme_override_constants/margin_right = 5
|
||||||
|
theme_override_constants/margin_bottom = 5
|
||||||
|
|
||||||
|
[node name="TopMenu" type="HBoxContainer" parent="Top"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ButtonQuit" type="Button" parent="Top/TopMenu"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Quit
|
||||||
|
"
|
||||||
|
|
||||||
|
[node name="VSeparator" type="VSeparator" parent="Top/TopMenu"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ButtonSave" type="Button" parent="Top/TopMenu"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "SAVE"
|
||||||
|
|
||||||
|
[node name="ButtonRoll" type="Button" parent="Top/TopMenu"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "ROLL"
|
||||||
|
|
||||||
|
[node name="ButtonTest" type="Button" parent="Top/TopMenu"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "!! TEST !!"
|
||||||
|
|
||||||
|
[node name="Character" type="MarginContainer" parent="."]
|
||||||
|
layout_mode = 0
|
||||||
|
offset_left = 8.0
|
||||||
|
offset_top = 64.0
|
||||||
|
offset_right = 792.0
|
||||||
|
offset_bottom = 592.0
|
||||||
|
theme_override_constants/margin_left = 5
|
||||||
|
theme_override_constants/margin_top = 5
|
||||||
|
theme_override_constants/margin_right = 5
|
||||||
|
theme_override_constants/margin_bottom = 5
|
||||||
|
|
||||||
|
[node name="NewCharacter" parent="Character" instance=ExtResource("3_ysn76")]
|
||||||
|
visible = false
|
||||||
|
layout_mode = 2
|
||||||
|
checkbox_group = SubResource("ButtonGroup_ysn76")
|
||||||
|
|
||||||
|
[node name="Menu" type="VBoxContainer" parent="."]
|
||||||
|
layout_mode = 0
|
||||||
|
offset_left = 312.0
|
||||||
|
offset_top = 56.0
|
||||||
|
offset_right = 468.0
|
||||||
|
offset_bottom = 176.0
|
||||||
|
|
||||||
|
[node name="New" type="Button" parent="Menu"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_styles/focus = SubResource("StyleBoxEmpty_yty2c")
|
||||||
|
text = "Nowa postać"
|
||||||
|
|
||||||
|
[node name="Load" type="Button" parent="Menu"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_styles/focus = SubResource("StyleBoxEmpty_yty2c")
|
||||||
|
disabled = true
|
||||||
|
text = "Załaduj"
|
||||||
|
|
||||||
|
[node name="Test" type="Button" parent="Menu"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_styles/focus = SubResource("StyleBoxEmpty_yty2c")
|
||||||
|
text = "Test"
|
||||||
|
|
||||||
|
[connection signal="pressed" from="Top/TopMenu/ButtonQuit" to="." method="_on_button_quit_pressed"]
|
||||||
|
[connection signal="pressed" from="Top/TopMenu/ButtonRoll" to="Character/NewCharacter" method="_on_button_roll_pressed"]
|
||||||
|
[connection signal="pressed" from="Menu/New" to="." method="_on_new_pressed"]
|
||||||
3
scenes/create_player/new_character/checkbox_group.tres
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
[gd_resource type="ButtonGroup" format=3 uid="uid://ctiyrpjxwmat"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
192
scenes/create_player/new_character/new_character.gd
Normal file
|
|
@ -0,0 +1,192 @@
|
||||||
|
extends Control
|
||||||
|
|
||||||
|
## Grupa przycisków typu checkbox która umożliwia
|
||||||
|
## wybór tylko jednej opcji
|
||||||
|
@export var checkbox_group: ButtonGroup
|
||||||
|
|
||||||
|
@onready var solo_cb = get_node("Rola/GridContainer/SoloCB")
|
||||||
|
@onready var netrunner_cb = get_node("Rola/GridContainer/NetrunnerCB")
|
||||||
|
@onready var korpo_cb = get_node("Rola/GridContainer/KorpoCB")
|
||||||
|
@onready var button_roll = $"../../Top/TopMenu/ButtonRoll"
|
||||||
|
|
||||||
|
enum Chum { SOLO, NETRUNNER, KORPO }
|
||||||
|
|
||||||
|
## Słownik zawierający szablony dla klasy netrunner
|
||||||
|
var netrunner: Dictionary = {
|
||||||
|
1: {
|
||||||
|
"INT": 5,
|
||||||
|
"REF": 8,
|
||||||
|
"ZW": 7,
|
||||||
|
"TECH": 7,
|
||||||
|
"CHA": 7,
|
||||||
|
"SW": 4,
|
||||||
|
"SZ": 8,
|
||||||
|
"RUCH": 7,
|
||||||
|
"BC": 7,
|
||||||
|
"EMP": 4,
|
||||||
|
},
|
||||||
|
2: {
|
||||||
|
"INT": 5,
|
||||||
|
"REF": 6,
|
||||||
|
"ZW": 7,
|
||||||
|
"TECH": 5,
|
||||||
|
"CHA": 8,
|
||||||
|
"SW": 3,
|
||||||
|
"SZ": 8,
|
||||||
|
"RUCH": 7,
|
||||||
|
"BC": 5,
|
||||||
|
"EMP": 5,
|
||||||
|
},
|
||||||
|
3: {
|
||||||
|
"INT": 5,
|
||||||
|
"REF": 6,
|
||||||
|
"ZW": 8,
|
||||||
|
"TECH": 6,
|
||||||
|
"CHA": 6,
|
||||||
|
"SW": 4,
|
||||||
|
"SZ": 7,
|
||||||
|
"RUCH": 6,
|
||||||
|
"BC": 7,
|
||||||
|
"EMP": 4,
|
||||||
|
},
|
||||||
|
4: {
|
||||||
|
"INT": 5,
|
||||||
|
"REF": 7,
|
||||||
|
"ZW": 7,
|
||||||
|
"TECH": 7,
|
||||||
|
"CHA": 7,
|
||||||
|
"SW": 5,
|
||||||
|
"SZ": 8,
|
||||||
|
"RUCH": 6,
|
||||||
|
"BC": 5,
|
||||||
|
"EMP": 5,
|
||||||
|
},
|
||||||
|
5: {
|
||||||
|
"INT": 5,
|
||||||
|
"REF": 8,
|
||||||
|
"ZW": 8,
|
||||||
|
"TECH": 5,
|
||||||
|
"CHA": 7,
|
||||||
|
"SW": 3,
|
||||||
|
"SZ": 7,
|
||||||
|
"RUCH": 5,
|
||||||
|
"BC": 5,
|
||||||
|
"EMP": 6,
|
||||||
|
},
|
||||||
|
6: {
|
||||||
|
"INT": 6,
|
||||||
|
"REF": 6,
|
||||||
|
"ZW": 6,
|
||||||
|
"TECH": 7,
|
||||||
|
"CHA": 8,
|
||||||
|
"SW": 4,
|
||||||
|
"SZ": 7,
|
||||||
|
"RUCH": 7,
|
||||||
|
"BC": 6,
|
||||||
|
"EMP": 6,
|
||||||
|
},
|
||||||
|
7: {
|
||||||
|
"INT": 6,
|
||||||
|
"REF": 6,
|
||||||
|
"ZW": 6,
|
||||||
|
"TECH": 7,
|
||||||
|
"CHA": 6,
|
||||||
|
"SW": 5,
|
||||||
|
"SZ": 7,
|
||||||
|
"RUCH": 7,
|
||||||
|
"BC": 7,
|
||||||
|
"EMP": 6,
|
||||||
|
},
|
||||||
|
8: {
|
||||||
|
"INT": 5,
|
||||||
|
"REF": 6,
|
||||||
|
"ZW": 8,
|
||||||
|
"TECH": 6,
|
||||||
|
"CHA": 8,
|
||||||
|
"SW": 4,
|
||||||
|
"SZ": 8,
|
||||||
|
"RUCH": 5,
|
||||||
|
"BC": 7,
|
||||||
|
"EMP": 4,
|
||||||
|
},
|
||||||
|
9: {
|
||||||
|
"INT": 7,
|
||||||
|
"REF": 6,
|
||||||
|
"ZW": 7,
|
||||||
|
"TECH": 7,
|
||||||
|
"CHA": 6,
|
||||||
|
"SW": 3,
|
||||||
|
"SZ": 6,
|
||||||
|
"RUCH": 5,
|
||||||
|
"BC": 6,
|
||||||
|
"EMP": 5,
|
||||||
|
},
|
||||||
|
10: {
|
||||||
|
"INT": 7,
|
||||||
|
"REF": 8,
|
||||||
|
"ZW": 6,
|
||||||
|
"TECH": 6,
|
||||||
|
"CHA": 6,
|
||||||
|
"SW": 4,
|
||||||
|
"SZ": 7,
|
||||||
|
"RUCH": 7,
|
||||||
|
"BC": 5,
|
||||||
|
"EMP": 6,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
## !! FUNKCJA TESTOWA !!
|
||||||
|
func test() -> void:
|
||||||
|
pass
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
var stats = get_tree().get_nodes_in_group("stats")
|
||||||
|
|
||||||
|
button_roll.disabled = true
|
||||||
|
netrunner_cb.button_pressed = true
|
||||||
|
korpo_cb.disabled = true
|
||||||
|
solo_cb.disabled = true
|
||||||
|
|
||||||
|
for stat in stats:
|
||||||
|
stat.text = "0"
|
||||||
|
|
||||||
|
|
||||||
|
func _draw() -> void:
|
||||||
|
var stats_scene = get_node("Stats")
|
||||||
|
|
||||||
|
if stats_scene.is_visible_in_tree():
|
||||||
|
button_roll.disabled = !button_roll.disabled
|
||||||
|
|
||||||
|
|
||||||
|
func _on_button_roll_pressed() -> void:
|
||||||
|
var roll = Global.rolld(10)
|
||||||
|
var button_pressed = checkbox_group.get_pressed_button()
|
||||||
|
var chum
|
||||||
|
|
||||||
|
match button_pressed.name:
|
||||||
|
"SoloCB":
|
||||||
|
chum = Chum.SOLO
|
||||||
|
"NetrunnerCB":
|
||||||
|
chum = Chum.NETRUNNER
|
||||||
|
"KorpoCB":
|
||||||
|
chum = Chum.KORPO
|
||||||
|
|
||||||
|
|
||||||
|
print("Rzut wynosi: %d a klasa to %s" % [roll, chum])
|
||||||
|
character_template(roll, chum)
|
||||||
|
|
||||||
|
|
||||||
|
func character_template(roll: int, chum: int) -> void:
|
||||||
|
var stats_group = get_tree().get_nodes_in_group("stats")
|
||||||
|
var template_number
|
||||||
|
|
||||||
|
match chum:
|
||||||
|
1:
|
||||||
|
template_number = netrunner.get(roll)
|
||||||
|
_:
|
||||||
|
print(":(")
|
||||||
|
|
||||||
|
if chum <= 1:
|
||||||
|
for i in range(stats_group.size()):
|
||||||
|
stats_group[i].text = str(template_number.values()[i])
|
||||||
1
scenes/create_player/new_character/new_character.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://be8pfcpjesmal
|
||||||
78
scenes/create_player/new_character/new_character.tscn
Normal file
|
|
@ -0,0 +1,78 @@
|
||||||
|
[gd_scene load_steps=5 format=3 uid="uid://odjphawrdiw8"]
|
||||||
|
|
||||||
|
[ext_resource type="Theme" uid="uid://dy41x4ott07ql" path="res://assets/themes/main_theme.tres" id="1_mks5g"]
|
||||||
|
[ext_resource type="Script" uid="uid://be8pfcpjesmal" path="res://scenes/create_player/new_character/new_character.gd" id="2_mks5g"]
|
||||||
|
[ext_resource type="ButtonGroup" uid="uid://ctiyrpjxwmat" path="res://scenes/create_player/new_character/checkbox_group.tres" id="3_rfvxj"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://p5nhkod3yaf0" path="res://scenes/create_player/new_character/stats.tscn" id="4_w7nxs"]
|
||||||
|
|
||||||
|
[node name="NewCharacter" type="Control"]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme = ExtResource("1_mks5g")
|
||||||
|
script = ExtResource("2_mks5g")
|
||||||
|
checkbox_group = ExtResource("3_rfvxj")
|
||||||
|
|
||||||
|
[node name="Ksywa" type="Label" parent="."]
|
||||||
|
layout_mode = 0
|
||||||
|
offset_left = 8.0
|
||||||
|
offset_top = 8.0
|
||||||
|
offset_right = 57.0
|
||||||
|
offset_bottom = 40.0
|
||||||
|
text = "Ksywa"
|
||||||
|
|
||||||
|
[node name="KsywaInput" type="LineEdit" parent="."]
|
||||||
|
layout_mode = 0
|
||||||
|
offset_left = 80.0
|
||||||
|
offset_top = 8.0
|
||||||
|
offset_right = 222.0
|
||||||
|
offset_bottom = 44.0
|
||||||
|
|
||||||
|
[node name="Rola" type="Label" parent="."]
|
||||||
|
layout_mode = 0
|
||||||
|
offset_left = 8.0
|
||||||
|
offset_top = 64.0
|
||||||
|
offset_right = 61.0
|
||||||
|
offset_bottom = 92.0
|
||||||
|
text = "ROLA"
|
||||||
|
|
||||||
|
[node name="GridContainer" type="GridContainer" parent="Rola"]
|
||||||
|
clip_contents = true
|
||||||
|
layout_mode = 0
|
||||||
|
offset_left = 72.0
|
||||||
|
offset_top = 4.0
|
||||||
|
offset_right = 222.0
|
||||||
|
offset_bottom = 96.0
|
||||||
|
columns = 2
|
||||||
|
|
||||||
|
[node name="NetrunnerCB" type="CheckBox" parent="Rola/GridContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
button_group = ExtResource("3_rfvxj")
|
||||||
|
|
||||||
|
[node name="Netrunner" type="Label" parent="Rola/GridContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Netrunner"
|
||||||
|
|
||||||
|
[node name="SoloCB" type="CheckBox" parent="Rola/GridContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
button_group = ExtResource("3_rfvxj")
|
||||||
|
|
||||||
|
[node name="Solo" type="Label" parent="Rola/GridContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Solo"
|
||||||
|
|
||||||
|
[node name="KorpoCB" type="CheckBox" parent="Rola/GridContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
button_group = ExtResource("3_rfvxj")
|
||||||
|
|
||||||
|
[node name="Korpo" type="Label" parent="Rola/GridContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Korpo"
|
||||||
|
|
||||||
|
[node name="Stats" parent="." instance=ExtResource("4_w7nxs")]
|
||||||
|
layout_mode = 0
|
||||||
|
offset_left = 248.0
|
||||||
|
offset_right = 472.0
|
||||||
11
scenes/create_player/new_character/notification.tscn
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
[gd_scene format=3 uid="uid://bhvrnh1s3pktt"]
|
||||||
|
|
||||||
|
[node name="Notification" type="Control"]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 8
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
88
scenes/create_player/new_character/stats.tscn
Normal file
|
|
@ -0,0 +1,88 @@
|
||||||
|
[gd_scene format=3 uid="uid://p5nhkod3yaf0"]
|
||||||
|
|
||||||
|
[node name="Stats" type="GridContainer"]
|
||||||
|
offset_left = 240.0
|
||||||
|
offset_right = 464.0
|
||||||
|
offset_bottom = 396.0
|
||||||
|
theme_override_constants/h_separation = 20
|
||||||
|
columns = 2
|
||||||
|
|
||||||
|
[node name="Inteligencja" type="Label" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "INT"
|
||||||
|
|
||||||
|
[node name="Int" type="LineEdit" parent="." groups=["stats"]]
|
||||||
|
layout_mode = 2
|
||||||
|
editable = false
|
||||||
|
|
||||||
|
[node name="Refleks" type="Label" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "REF"
|
||||||
|
|
||||||
|
[node name="Ref" type="LineEdit" parent="." groups=["stats"]]
|
||||||
|
layout_mode = 2
|
||||||
|
editable = false
|
||||||
|
|
||||||
|
[node name="Zwinnosc" type="Label" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "ZW"
|
||||||
|
|
||||||
|
[node name="Zw" type="LineEdit" parent="." groups=["stats"]]
|
||||||
|
layout_mode = 2
|
||||||
|
editable = false
|
||||||
|
|
||||||
|
[node name="Technika" type="Label" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "TECH"
|
||||||
|
|
||||||
|
[node name="Tech" type="LineEdit" parent="." groups=["stats"]]
|
||||||
|
layout_mode = 2
|
||||||
|
editable = false
|
||||||
|
|
||||||
|
[node name="Charakter" type="Label" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "CHA"
|
||||||
|
|
||||||
|
[node name="Cha" type="LineEdit" parent="." groups=["stats"]]
|
||||||
|
layout_mode = 2
|
||||||
|
editable = false
|
||||||
|
|
||||||
|
[node name="SilaWoli" type="Label" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "SW"
|
||||||
|
|
||||||
|
[node name="Sw" type="LineEdit" parent="." groups=["stats"]]
|
||||||
|
layout_mode = 2
|
||||||
|
editable = false
|
||||||
|
|
||||||
|
[node name="Szcescie" type="Label" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "SZ"
|
||||||
|
|
||||||
|
[node name="Sz" type="LineEdit" parent="." groups=["stats"]]
|
||||||
|
layout_mode = 2
|
||||||
|
editable = false
|
||||||
|
|
||||||
|
[node name="Ruch" type="Label" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "RUCH"
|
||||||
|
|
||||||
|
[node name="Ruch2" type="LineEdit" parent="." groups=["stats"]]
|
||||||
|
layout_mode = 2
|
||||||
|
editable = false
|
||||||
|
|
||||||
|
[node name="BudowaCiala" type="Label" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "BC"
|
||||||
|
|
||||||
|
[node name="Bc" type="LineEdit" parent="." groups=["stats"]]
|
||||||
|
layout_mode = 2
|
||||||
|
editable = false
|
||||||
|
|
||||||
|
[node name="Empatia" type="Label" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "EMP"
|
||||||
|
|
||||||
|
[node name="Emp" type="LineEdit" parent="." groups=["stats"]]
|
||||||
|
layout_mode = 2
|
||||||
|
editable = false
|
||||||
6
scenes/global.gd
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
var roll: int = 0
|
||||||
|
|
||||||
|
func rolld(d: int) -> int:
|
||||||
|
return randi_range(1, d)
|
||||||
1
scenes/global.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://ga8sek1nsl02
|
||||||