Compare commits

..

No commits in common. "master" and "v1.2.1" have entirely different histories.

64 changed files with 848 additions and 1795 deletions

View File

@ -1,32 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: bug
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. Windows]
- Godot Engine Version [e.g. 3.2.3rc6]
- Plugin Version [e.g. v1.7.0]
**Additional context**
Add any other context about the problem here.

View File

@ -1,17 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[FEATURE]"
labels: enhancement
assignees: ''
---
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe an implementation suggestion**
A clear and concise description of any implementation method you'd like to suggest. It may be technical or just theoretical.
**Additional context**
Add any other context or screenshots about the feature request here.

26
.gitignore vendored
View File

@ -1,26 +0,0 @@
# Godot-specific ignores
.import/
scn/
.import
default_env.tres
icon.png
icon.png.import
project.godot
# Imported translations (automatically generated from CSV files)
*.translation
# Mono-specific ignores
.mono/
data_*/
mono_crash.*.json
# System/tool-specific ignores
.directory
*~
# Plugin specific ignores
icons.pngs/
fonts/
file.samples/
icon.png

22
LICENSE
View File

@ -1,22 +0,0 @@
MIT License
Copyright (c) 2020 fenix-hub
Copyright (c) 2022 Péter Magyar
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.

View File

@ -1,3 +0,0 @@
[gd_scene format=2]
[node name="Node2D" type="Node2D"]

View File

@ -1,47 +1,39 @@
<p align="right"> Check my **[Discord](https://discord.gg/KnJGY9S)** to stay updated on this repository.
<a href="https://discord.gg/KnJGY9S"> *(Recommended since the AssetLibrary is not automatically updated)*
<img src="https://github.com/fenix-hub/ColoredBadges/blob/master/svg/social/discord.svg" alt="react" style="vertical-align:top; margin:6px 4px">
</a>
</p>
This plugin is now supported in [Godot Extended Library Discord](https://discord.gg/JNrcucg), check out the [Godot Extended Library Project](https://github.com/godot-extended-libraries)! # Godot Text Editor
A little plugin to easy-way manage your text files inside your project folder.
<img src="addons/file-editor/icon.png" width="64" height="64" align="left">
# Godot File Editor
A little plugin to easy-way manage your text files inside your project folder.
Author: *"Nicolo (fenix) Santilio"* Author: *"Nicolo (fenix) Santilio"*
Version: *1.9.2* Version: *1.2.1*
Godot Version: *3.3.4* Godot Version: *3.1.1-stable*
**This repository was pushed directly from Godot Engine Editor thanks to this [GitHub Integration](https://github.com/fenix-hub/godot-engine.github-integration)!** **This repository was pushed directly from Godot Engine Editor thanks to [GitHub Integration](https://github.com/fenix-hub/godot-engine.github-integration)!**
## What is this? ## What is this?
This is a little plugin I've made to easily edit text files in your project folder. This is a little plugin I've made to easily edit text files in your project folder.
## How does it work? ## How does it work?
You can open an existing file, create a new file and delete a file. You can open an existing file, create a new file and delete a file.
When opening / creating a file, the editor will open and you will be able to edit it and save it. When opening / creating a file, the editor will open and you will be able to edit it and save it.
You can just *Save* the file, or *Save file As* a new file (if it is a new file but also to make some copies). You can just *Save* the file, or *Save file As* a new file (if it is a new file but also to make some copies).
You will also be able to see some informations about the file you are editing (time and date of last edit) and you can set your editor to *Read Only* if you don't want to make changes but still read the content of the file. You will also be able to see some informations about the file you are editing (time and date of last edit) and you can set your editor to *Read Only* if you don't want to make changes but still read the content of the file.
Multiple files can be opened in different tabs. Multiple files can be opened in different tabs.
![preview_0](https://imgur.com/X3lA49e.png) ![preview_1](https://imgur.com/qYcRbWM.png) ![preview](https://i.imgur.com/LcrGCGS.png)
![preview1](https://i.imgur.com/BbZzKzD.png)![preview2](https://i.imgur.com/asggk4f.png) ![preview3](https://i.imgur.com/omReRZr.png)
## How do I install it? ## How do I install it?
**Manual** **Manual**
Just download this whole repository and put it in your `res://addons` folder inside the project you want to work on. Just download this whole repository and put it in your `res://addons` folder inside the project you want to work on.
Then, go to `Project > Plugins > "File Editor" > Status > Activate`. Then, go to `Project > Plugins > "File Editor" > Status > Activate`.
**Automatic** **Automatic**
You can find this plugin in the AssetLib of Godot Engine Editor. Just download it from there and everything should be fine! You can find this plugin in the AssetLib of Godot Engine Editor. Just download it from there and everything should be fine!
(Remember to activate this plugin) (Remember to activate this plugin)
## Supported formats ## Supported formats
+ "*.txt ; Plain Text File", + "*.txt ; Plain Text File",
+ "*.rtf ; Rich Text Format File", + "*.rtf ; Rich Text Format File",
+ "*.log ; Log File", + "*.log ; Log File",
+ "*.md ; MD File", + "*.md ; MD File",
+ "*.doc ; WordPad Document", + "*.doc ; WordPad Document",
+ "*.doc ; Microsoft Word Document", + "*.doc ; Microsoft Word Document",
@ -51,20 +43,16 @@ You can find this plugin in the AssetLib of Godot Engine Editor. Just download i
+ "*.dat ; Data File", + "*.dat ; Data File",
+ "*.xml ; XML File", + "*.xml ; XML File",
+ "*.sql ; SQL database file", + "*.sql ; SQL database file",
+ "*.json ; JavaScript Object Notation File", + "*.json ; JavaScript Object Notation File",
+ "*.html ; HyperText Markup Language" + "*.html ; HyperText Markup Language"
+ "*.cfg ; Configuration File"
+ "*.ini ; Initialization File (same as .cfg Configuration File)"
+ "*.csv ; Comma-separated values File"
+ "*.res ; Resource File"
#### Current version #### Current version
To check all the features that are included in the current version, please read the [VERSION file](./VERSION.md) To check all the features included in the current version, please read the [VERSION file](./VERSION.md)
#### Upcoming features #### Upcoming features
To check all the features I'm currently working on, please read the [TODO file](./TODO.md) To check all the features I'm currently working on, please read the [TODO file](./TODO.md)
# Disclaimer # Disclaimer
This addon was built for the intention of my **personal use**. It was released as an open source plugin in the hope that it could be useful to the Godot Engine Community. This addon was built for a **personal use** intention. It was released as an open source plugin in the hope that it could be useful to the Godot Engine Community.
As a "work in progress" project, there is *no warranty* for any eventual issue and bug that may broke your project. As a "work in progress" project, there is *no warranty* for any eventual issue and bug that may broke your project.
I don't assume any responsibility for possible corruptions of your project files. It is always advisable to keep a copy of your files and check any changes. I don't assume any responsibility for possible corruptions of your project files. It is always advisable to keep a copy of your files and check any changes.

View File

@ -0,0 +1,65 @@
**version 0.0.1**
*added*
- Plugin Created
-----------------------
**version 0.1.1**
*added*
- "Create new File" option
- "Open File" option
- "Delete File" option
- "Save File" option
- "Save File As.." option
-----------------------
**version 0.1.2**
*fixed*
- Repository Installation, folder order
-----------------------
**version 0.2.5**
*removed*
- Old layout
*added*
- New Layout
- Last modified time and date
- Tabs
-----------------------
**version 0.3.1**
*added*
- Version check
- Preview support
- Context menu in editor
- BBCode converter
- Light Mardkwon converter (DEMO)
-----------------------
**version 1.2.1**
*removed*
- Old layout, the plugin won't appear in docs
- Icons file extensions, plugin size reduced
- Old Mardkwon preview method
*added*
- More supported files
1. "*.dat ; Data File",
2. "*.xml ; XML File",
3. "*.sql ; SQL database file",
4. "*.json ; JavaScript Object Notation File",
5. "*.html ; HyperText Markup Language
- New Markdown preview method ( Markdown -> BBCode converter)
- New HTML preview method ( HTML -> BBCode converter)
- New Plugin Layout: a new ButtonTool "File" in you TopBar will appear
- Error check
- Message popups for closing unsaved files
-----------------------

View File

@ -0,0 +1,58 @@
Check my **[Discord](https://discord.gg/KnJGY9S)** to stay updated on this repository.
*(Recommended since the AssetLibrary is not automatically updated)*
# Godot Text Editor
A little plugin to easy-way manage your text files inside your project folder.
Author: *"Nicolo (fenix) Santilio"*
Version: *1.2.1*
Godot Version: *3.1.1-stable*
**This repository was pushed directly from Godot Engine Editor thanks to [GitHub Integration](https://github.com/fenix-hub/godot-engine.github-integration)!**
## What is this?
This is a little plugin I've made to easily edit text files in your project folder.
## How does it work?
You can open an existing file, create a new file and delete a file.
When opening / creating a file, the editor will open and you will be able to edit it and save it.
You can just *Save* the file, or *Save file As* a new file (if it is a new file but also to make some copies).
You will also be able to see some informations about the file you are editing (time and date of last edit) and you can set your editor to *Read Only* if you don't want to make changes but still read the content of the file.
Multiple files can be opened in different tabs.
![preview](https://i.imgur.com/LcrGCGS.png)
## How do I install it?
**Manual**
Just download this whole repository and put it in your `res://addons` folder inside the project you want to work on.
Then, go to `Project > Plugins > "File Editor" > Status > Activate`.
**Automatic**
You can find this plugin in the AssetLib of Godot Engine Editor. Just download it from there and everything should be fine!
(Remember to activate this plugin)
## Supported formats
+ "*.txt ; Plain Text File",
+ "*.rtf ; Rich Text Format File",
+ "*.log ; Log File",
+ "*.md ; MD File",
+ "*.doc ; WordPad Document",
+ "*.doc ; Microsoft Word Document",
+ "*.docm ; Word Open XML Macro-Enabled Document",
+ "*.docx ; Microsoft Word Open XML Document",
+ "*.bbs ; Bulletin Board System Text",
+ "*.dat ; Data File",
+ "*.xml ; XML File",
+ "*.sql ; SQL database file",
+ "*.json ; JavaScript Object Notation File",
+ "*.html ; HyperText Markup Language"
#### Current version
To check all the features included in the current version, please read the [VERSION file](./VERSION.md)
#### Upcoming features
To check all the features I'm currently working on, please read the [TODO file](./TODO.md)
# Disclaimer
This addon was built for a **personal use** intention. It was released as an open source plugin in the hope that it could be useful to the Godot Engine Community.
As a "work in progress" project, there is *no warranty* for any eventual issue and bug that may broke your project.
I don't assume any responsibility for possible corruptions of your project files. It is always advisable to keep a copy of your files and check any changes.

View File

@ -0,0 +1,4 @@
### to do (v-0.x.x)
- Popup dialog when closing a tab if there is new content
- Module for markdown support/conversion

View File

@ -0,0 +1,65 @@
**version 0.0.1**
*added*
- Plugin Created
-----------------------
**version 0.1.1**
*added*
- "Create new File" option
- "Open File" option
- "Delete File" option
- "Save File" option
- "Save File As.." option
-----------------------
**version 0.1.2**
*fixed*
- Repository Installation, folder order
-----------------------
**version 0.2.5**
*removed*
- Old layout
*added*
- New Layout
- Last modified time and date
- Tabs
-----------------------
**version 0.3.1**
*added*
- Version check
- Preview support
- Context menu in editor
- BBCode converter
- Light Mardkwon converter (DEMO)
-----------------------
**version 1.2.1**
*removed*
- Old layout, the plugin won't appear in docs
- Icons file extensions, plugin size reduced
- Old Mardkwon preview method
*added*
- More supported files
1. "*.dat ; Data File",
2. "*.xml ; XML File",
3. "*.sql ; SQL database file",
4. "*.json ; JavaScript Object Notation File",
5. "*.html ; HyperText Markup Language
- New Markdown preview method ( Markdown -> BBCode converter)
- New HTML preview method ( HTML -> BBCode converter)
- New Plugin Layout: a new ButtonTool "File" in you TopBar will appear
- Error check
- Message popups for closing unsaved files
-----------------------

View File

@ -1,16 +0,0 @@
[b]bolded text[/b]
[i]italicized text[/i]
[u]underlined text[/u]
[s]strikethrough text[/s]
[url]https://en.wikipedia.org[/url]
[url=https://en.wikipedia.org]English Wikipedia[/url]
[img]res://addons/file-editor/icon.png[/img]
[code]monospaced text[/code]
left [center]center[/center] [right]right[/right]
[center][wave amp=50 freq=10]oooooondaaaaaaaaa[/wave][/center]
[center][tornado amp=50 freq=10 radius=5]tornaaaaaadoooooo[/tornado][/center]
[center][shake rate=15 level=10]scossa[/shake][/center]
[center][fade start=4 length=14]Effetto fantasmaaaaaa[/fade][/center]
[center][rainbow freq=4 sat=10 val=100]Arcobaleno![/rainbow][/center]
[center][pulse freq=6.0 height=5.0][pulse color=#00FFAA freq=2.0]Questo è un codice custom![/pulse][/pulse][/center]
*Some md text in bb file*

View File

@ -1,9 +0,0 @@
; last modified 1 April 2001 by John Doe
[owner]
name="John Doe"
organization="Acme Widgets Inc."
[database]
; use IP address in case network name resolution is not working
server="192.0.2.62"
port="143"
file="payroll.dat"

View File

@ -1,19 +0,0 @@
COLUMN 1; ;COLUMN2;COLUMN3;COLUMN5;COLUMN6;;;;;;;;;
this is a; ;csv file with empty spaces; ;-;NEW COLUMN;;;;;;;;;
anyway,;they are stored in; ;the file;-;F;;;;;;;;;
this;is a ;new;line;-;F;;;;;;;;;
line 5;and column 5;where created;with the editor;-;F;;;;;;;;;
-;-;-;-;-;F;;;;;;;;;
res;res;res;;F;e;;;;;;;;;
awew;aweawe;ewaewa;wwwwwwwwiiiiiiiii ;F;F;;;;;;;;;
ciao;ciao;;;F;F;;;;;;;;;
ciao;ciao;ciao;ciao;ciao;F;;;;;;;;;
NON;NE;VOGLIO;SAPERE;NIENTE;;;;;;;;;;
UFFA;UFFA;UFFA;NUFFA;;REFFA;;;;;;;;;
;;;;;;;;;;;;;;
;;;;;;;;;;;;;;
;;;;;;;;;;;;;;
;;;;;;;;;;;;;;
;;;;;;;;;;;;;;
;;;;;;;;;;;;;;
;;;;;;;;;;;;;;YES
1 COLUMN 1 COLUMN2 COLUMN3 COLUMN5 COLUMN6
2 this is a csv file with empty spaces - NEW COLUMN
3 anyway, they are stored in the file - F
4 this is a new line - F
5 line 5 and column 5 where created with the editor - F
6 - - - - - F
7 res res res F e
8 awew aweawe ewaewa wwwwwwwwiiiiiiiii F F
9 ciao ciao F F
10 ciao ciao ciao ciao ciao F
11 NON NE VOGLIO SAPERE NIENTE
12 UFFA UFFA UFFA NUFFA REFFA
13
14
15
16
17
18
19 YES

View File

@ -1,3 +0,0 @@
[remap]
importer="keep"

View File

@ -1,9 +0,0 @@
<b>bolded text</b>
<i>italicized text</i>
<ins>insnderlined text</ins>
<del>deltrikethroinsgh text</del>
<a>httpdel://en.wikipedia.org</a>
<img src="res://addondel/file-editor/icon.png"/>
<a href=https://en.wikipedia.org>Englidelh Wikipedia</a>
<pre>monodelpaced text</pre>
left <center>center</center> <right>right</right>

View File

@ -1,9 +0,0 @@
[owner]
name="John Doe"
organization="Acme Widgets Inc."
[database]
server="192.0.2.62"
port="143"
file="payroll.dat"
[qqqq]
ewe="qq"

View File

@ -1,16 +0,0 @@
**bolded text**
*italicized text*
***bolded and italicized***
~~strikethrough~~
__underline__
> This is a quote
`this is some code`
[link](http://example.com)
![image](res://addons/file-editor/icon.png)
# header 1
## header 2
### header 3
#### header 5
##### header 6
###### header7

View File

@ -1 +0,0 @@
This is a simple text file.

View File

@ -1,120 +0,0 @@
<?xml version="1.0"?>
<catalog>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<genre>Computer</genre>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
<description>An in-depth look at creating applications
with XML.</description>
</book>
<book id="bk102">
<author>Ralls, Kim</author>
<title>Midnight Rain</title>
<genre>Fantasy</genre>
<price>5.95</price>
<publish_date>2000-12-16</publish_date>
<description>A former architect battles corporate zombies,
an evil sorceress, and her own childhood to become queen
of the world.</description>
</book>
<book id="bk103">
<author>Corets, Eva</author>
<title>Maeve Ascendant</title>
<genre>Fantasy</genre>
<price>5.95</price>
<publish_date>2000-11-17</publish_date>
<description>After the collapse of a nanotechnology
society in England, the young survivors lay the
foundation for a new society.</description>
</book>
<book id="bk104">
<author>Corets, Eva</author>
<title>Oberon's Legacy</title>
<genre>Fantasy</genre>
<price>5.95</price>
<publish_date>2001-03-10</publish_date>
<description>In post-apocalypse England, the mysterious
agent known only as Oberon helps to create a new life
for the inhabitants of London. Sequel to Maeve
Ascendant.</description>
</book>
<book id="bk105">
<author>Corets, Eva</author>
<title>The Sundered Grail</title>
<genre>Fantasy</genre>
<price>5.95</price>
<publish_date>2001-09-10</publish_date>
<description>The two daughters of Maeve, half-sisters,
battle one another for control of England. Sequel to
Oberon's Legacy.</description>
</book>
<book id="bk106">
<author>Randall, Cynthia</author>
<title>Lover Birds</title>
<genre>Romance</genre>
<price>4.95</price>
<publish_date>2000-09-02</publish_date>
<description>When Carla meets Paul at an ornithology
conference, tempers fly as feathers get ruffled.</description>
</book>
<book id="bk107">
<author>Thurman, Paula</author>
<title>Splish Splash</title>
<genre>Romance</genre>
<price>4.95</price>
<publish_date>2000-11-02</publish_date>
<description>A deep sea diver finds true love twenty
thousand leagues beneath the sea.</description>
</book>
<book id="bk108">
<author>Knorr, Stefan</author>
<title>Creepy Crawlies</title>
<genre>Horror</genre>
<price>4.95</price>
<publish_date>2000-12-06</publish_date>
<description>An anthology of horror stories about roaches,
centipedes, scorpions and other insects.</description>
</book>
<book id="bk109">
<author>Kress, Peter</author>
<title>Paradox Lost</title>
<genre>Science Fiction</genre>
<price>6.95</price>
<publish_date>2000-11-02</publish_date>
<description>After an inadvertant trip through a Heisenberg
Uncertainty Device, James Salway discovers the problems
of being quantum.</description>
</book>
<book id="bk110">
<author>O'Brien, Tim</author>
<title>Microsoft .NET: The Programming Bible</title>
<genre>Computer</genre>
<price>36.95</price>
<publish_date>2000-12-09</publish_date>
<description>Microsoft's .NET initiative is explored in
detail in this deep programmer's reference.</description>
</book>
<book id="bk111">
<author>O'Brien, Tim</author>
<title>MSXML3: A Comprehensive Guide</title>
<genre>Computer</genre>
<price>36.95</price>
<publish_date>2000-12-01</publish_date>
<description>The Microsoft MSXML3 parser is covered in
detail, with attention to XML DOM interfaces, XSLT processing,
SAX and more.</description>
</book>
<book id="bk112">
<author>Galos, Mike</author>
<title>Visual Studio 7: A Comprehensive Guide</title>
<genre>Computer</genre>
<price>49.95</price>
<publish_date>2001-04-16</publish_date>
<description>Microsoft Visual Studio 7 is explored in depth,
looking at how Visual Basic, Visual C++, C#, and ASP+ are
integrated into a comprehensive development
environment.</description>
</book>
</catalog>

View File

@ -1,9 +0,0 @@
keys;en;it;da;de;ja;es
HELLO;"""Hello!""";"""Ciao!""";"""Hej!""";"""Hallo!""";"""こんにちは!""";"""¡Hola!"""
BYE;"""Bye bye!""";"""Ciao ciao!""";"""Hej hej!""";"""Tschüss!""";"""バイバイ!""";"""¡Adiós!"""
GOODMORNING;"""Gooedmorning!""";"""Buongiorno!""";"""Gooedmorning!""";"""Guten Morgen!""";"""グーエドモーニング!""";"""¡Buen día!"""
CONFIRM;"""Confirm this action""";"""Conferma questa azione""";"""Bekræft denne handling""";"""Bestätigen Sie diese Aktion""";"""このアクションを確認します""";"""Confirma esta acción"""
CANCEL;"""Cancel this action""";"""Annulla questa azione""";"""Annuller denne handling""";"""Brechen Sie diese Aktion ab""";"""このアクションをキャンセルします""";"""Cancelar esta acción"""
YES;"""Yes, please""";"""Sì grazie""";"""Ja tak""";"""Ja bitte""";"""はい、お願いします""";"""Sí por favor"""
NO;"""No, thanks""";"""No grazie""";"""Nej tak""";"""Nein Danke""";"""結構です""";"""No, gracias"""
q;ds;q;q;q;w;q
1 keys en it da de ja es
2 HELLO "Hello!" "Ciao!" "Hej!" "Hallo!" "こんにちは!" "¡Hola!"
3 BYE "Bye bye!" "Ciao ciao!" "Hej hej!" "Tschüss!" "バイバイ!" "¡Adiós!"
4 GOODMORNING "Gooedmorning!" "Buongiorno!" "Gooedmorning!" "Guten Morgen!" "グーエドモーニング!" "¡Buen día!"
5 CONFIRM "Confirm this action" "Conferma questa azione" "Bekræft denne handling" "Bestätigen Sie diese Aktion" "このアクションを確認します" "Confirma esta acción"
6 CANCEL "Cancel this action" "Annulla questa azione" "Annuller denne handling" "Brechen Sie diese Aktion ab" "このアクションをキャンセルします" "Cancelar esta acción"
7 YES "Yes, please" "Sì grazie" "Ja tak" "Ja bitte" "はい、お願いします" "Sí por favor"
8 NO "No, thanks" "No grazie" "Nej tak" "Nein Danke" "結構です" "No, gracias"
9 q ds q q q w q

View File

@ -1,3 +0,0 @@
[remap]
importer="keep"

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 889 B

View File

@ -28,7 +28,6 @@ process/fix_alpha_border=true
process/premult_alpha=false process/premult_alpha=false
process/HDR_as_SRGB=false process/HDR_as_SRGB=false
process/invert_color=false process/invert_color=false
process/normal_map_invert_y=false
stream=false stream=false
size_limit=0 size_limit=0
detect_3d=true detect_3d=true

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 439 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 462 B

View File

@ -1,8 +0,0 @@
[Opened]
translation.csv="res://addons/file-editor/file.samples/translation.csv"
sample.bbs="res://addons/file-editor/file.samples/sample.bbs"
sample.cfg="res://addons/file-editor/file.samples/sample.cfg"
sample.ini="res://addons/file-editor/file.samples/sample.ini"
README.md="res://README.md"
VERSION.md="res://VERSION.md"

View File

@ -3,5 +3,5 @@
name="File Editor" name="File Editor"
description="An internal file editor to view and edit text files in your project folder." description="An internal file editor to view and edit text files in your project folder."
author="Nicolo 'fenix' Santilio" author="Nicolo 'fenix' Santilio"
version="1.9.0" version="1.2.1"
script="scripts/file-editor.gd" script="scripts/file-editor.gd"

View File

@ -1,86 +1,40 @@
[gd_scene load_steps=15 format=2] [gd_scene load_steps=7 format=2]
[ext_resource path="res://addons/file-editor/scripts/FileEditor.gd" type="Script" id=1] [ext_resource path="res://addons/file-editor/scripts/FileEditor.gd" type="Script" id=1]
[ext_resource path="res://addons/file-editor/fonts/Roboto-Black.ttf" type="DynamicFontData" id=2]
[sub_resource type="Image" id=41] [sub_resource type="DynamicFont" id=6]
data = { size = 13
"data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 224, 224, 224, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 224, 224, 224, 255, 224, 224, 224, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), font_data = ExtResource( 2 )
"format": "RGBA8",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id=30] [sub_resource type="StyleBoxFlat" id=7]
image = SubResource( 41 ) content_margin_left = 10.0
size = Vector2( 16, 16 ) content_margin_right = 10.0
bg_color = Color( 0.196078, 0.231373, 0.309804, 1 )
border_width_left = 1
border_width_top = 1
border_width_right = 1
border_color = Color( 0.121569, 0.145098, 0.192157, 1 )
expand_margin_bottom = 1.0
[sub_resource type="Image" id=42] [sub_resource type="StyleBoxFlat" id=8]
data = { content_margin_left = 10.0
"data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 224, 224, 224, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 224, 224, 224, 255, 224, 224, 224, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), content_margin_right = 10.0
"format": "RGBA8", bg_color = Color( 0.145098, 0.172549, 0.231373, 1 )
"height": 16, border_width_left = 1
"mipmaps": false, border_width_top = 1
"width": 16 border_width_right = 1
} border_color = Color( 0.121569, 0.145098, 0.192157, 1 )
expand_margin_bottom = 1.0
[sub_resource type="ImageTexture" id=32] [sub_resource type="StyleBoxFlat" id=9]
image = SubResource( 42 ) bg_color = Color( 0.121569, 0.145098, 0.192157, 1 )
size = Vector2( 16, 16 ) draw_center = false
border_width_left = 1
[sub_resource type="Image" id=43] border_width_top = 1
data = { border_width_right = 1
"data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 224, 224, 224, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 224, 224, 224, 255, 224, 224, 224, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), border_width_bottom = 1
"format": "RGBA8", border_color = Color( 0.121569, 0.145098, 0.192157, 1 )
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id=34]
image = SubResource( 43 )
size = Vector2( 16, 16 )
[sub_resource type="Image" id=44]
data = {
"data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 224, 224, 224, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 224, 224, 224, 255, 224, 224, 224, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ),
"format": "RGBA8",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id=36]
image = SubResource( 44 )
size = Vector2( 16, 16 )
[sub_resource type="Image" id=45]
data = {
"data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 224, 224, 224, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 224, 224, 224, 255, 224, 224, 224, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ),
"format": "RGBA8",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id=38]
image = SubResource( 45 )
size = Vector2( 16, 16 )
[sub_resource type="Image" id=46]
data = {
"data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 224, 224, 224, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 224, 224, 224, 255, 224, 224, 224, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ),
"format": "RGBA8",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id=40]
image = SubResource( 46 )
size = Vector2( 16, 16 )
[sub_resource type="StyleBoxEmpty" id=28]
[node name="FileEditor" type="Control"] [node name="FileEditor" type="Control"]
anchor_right = 1.0 anchor_right = 1.0
@ -89,105 +43,63 @@ size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
script = ExtResource( 1 ) script = ExtResource( 1 )
[node name="FileEditorContainer" type="VBoxContainer" parent="."] [node name="Container" type="VBoxContainer" parent="."]
visible = false
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
margin_left = 6.0 margin_left = 6.0
margin_right = -5.0 margin_right = -5.0
margin_bottom = -7.0
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
[node name="TobBar" type="HBoxContainer" parent="FileEditorContainer"] [node name="Buttons" type="HBoxContainer" parent="Container"]
margin_right = 1000.0 margin_right = 1013.0
margin_bottom = 20.0 margin_bottom = 20.0
[node name="file_btn" type="MenuButton" parent="FileEditorContainer/TobBar"] [node name="newfile_btn" type="Button" parent="Container/Buttons"]
margin_right = 35.0 margin_right = 110.0
margin_bottom = 20.0 margin_bottom = 20.0
text = "File" text = "Create new File"
items = [ "New File", null, 0, false, false, 0, 268435534, null, "", false, "Open File", null, 0, false, false, 1, 268435535, null, "", false, "Close File", null, 0, false, false, 2, 335544387, null, "", false, "", null, 0, false, false, -1, 0, null, "", true, "Save File", null, 0, false, false, 3, 268435539, null, "", false, "Save File as...", null, 0, false, false, 4, 335544403, null, "", false, "Delete File", null, 0, false, false, 5, 268435524, null, "", false, "", null, 0, false, false, -1, 0, null, "", true, "Search in file...", null, 0, false, false, 6, 268435526, null, "", false, "Replace occurencies", null, 0, false, false, 7, 268435538, null, "", false ] flat = true
[node name="preview_btn" type="MenuButton" parent="FileEditorContainer/TobBar"] [node name="openfile_btn" type="Button" parent="Container/Buttons"]
margin_left = 39.0 margin_left = 114.0
margin_right = 101.0 margin_right = 188.0
margin_bottom = 20.0 margin_bottom = 20.0
text = "Preview" text = "Open File"
items = [ "BBCode Preview", null, 0, false, false, 0, 0, null, "", false, "Markdown Preview", null, 0, false, false, 1, 0, null, "", false, "HTML Preview", null, 0, false, false, 2, 0, null, "", false, "CSV Preview", null, 0, false, false, 3, 0, null, "", false ] flat = true
[node name="SettingsBtn" type="MenuButton" parent="FileEditorContainer/TobBar"] [node name="deletefile_btn" type="Button" parent="Container/Buttons"]
margin_left = 105.0 margin_left = 192.0
margin_right = 168.0 margin_right = 274.0
margin_bottom = 20.0 margin_bottom = 20.0
text = "Settings" text = "Delete File"
items = [ "Change Font", null, 0, false, false, 0, 0, null, "", false ] flat = true
[node name="SplitContainer" type="HSplitContainer" parent="FileEditorContainer"] [node name="version" type="Label" parent="Container/Buttons"]
margin_top = 24.0 margin_left = 974.0
margin_top = 1.0
margin_right = 1013.0
margin_bottom = 18.0
size_flags_horizontal = 10
custom_fonts/font = SubResource( 6 )
custom_colors/font_color = Color( 0.121569, 0.145098, 0.192157, 1 )
text = "v1.2.1"
align = 1
[node name="Editor" type="TabContainer" parent="Container"]
visible = false
margin_top = 26.0
margin_right = 1000.0 margin_right = 1000.0
margin_bottom = 600.0 margin_bottom = 600.0
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 11
split_offset = 150 custom_styles/tab_fg = SubResource( 7 )
custom_styles/tab_bg = SubResource( 8 )
[node name="FileContainer" type="VBoxContainer" parent="FileEditorContainer/SplitContainer"] custom_styles/panel = SubResource( 9 )
margin_right = 153.0 custom_colors/font_color_fg = Color( 1, 1, 1, 1 )
margin_bottom = 576.0 tab_align = 0
drag_to_rearrange_enabled = true
[node name="OpenFileList" type="ItemList" parent="FileEditorContainer/SplitContainer/FileContainer"]
margin_right = 153.0
margin_bottom = 572.0
size_flags_vertical = 3
items = [ "translation.csv", SubResource( 30 ), false, "sample.bbs", SubResource( 32 ), false, "sample.cfg", SubResource( 34 ), false, "sample.ini", SubResource( 36 ), false, "README.md", SubResource( 38 ), false, "VERSION.md", SubResource( 40 ), false ]
allow_reselect = true
[node name="HSeparator" type="HSeparator" parent="FileEditorContainer/SplitContainer/FileContainer"]
margin_top = 576.0
margin_right = 153.0
margin_bottom = 576.0
rect_min_size = Vector2( 2, 0 )
custom_constants/separation = 0
custom_styles/separator = SubResource( 28 )
[node name="EditorContainer" type="VBoxContainer" parent="FileEditorContainer/SplitContainer"]
margin_left = 165.0
margin_right = 1000.0
margin_bottom = 576.0
[node name="HBoxContainer" type="HBoxContainer" parent="FileEditorContainer/SplitContainer/EditorContainer"]
margin_right = 835.0
margin_bottom = 24.0
[node name="Label" type="Label" parent="FileEditorContainer/SplitContainer/EditorContainer/HBoxContainer"]
margin_top = 5.0
margin_right = 71.0
margin_bottom = 19.0
text = "Editing file:"
[node name="OpenFileName" type="LineEdit" parent="FileEditorContainer/SplitContainer/EditorContainer/HBoxContainer"]
margin_left = 75.0
margin_right = 650.0
margin_bottom = 24.0
mouse_filter = 1
size_flags_horizontal = 3
text = "res://VERSION.md"
editable = false
[node name="wrap_button" type="OptionButton" parent="FileEditorContainer/SplitContainer/EditorContainer/HBoxContainer"]
margin_left = 654.0
margin_right = 738.0
margin_bottom = 24.0
text = "No Wrap"
items = [ "No Wrap", null, false, 0, null, "Soft Wrap", null, false, 1, null ]
selected = 0
[node name="map_button" type="OptionButton" parent="FileEditorContainer/SplitContainer/EditorContainer/HBoxContainer"]
margin_left = 742.0
margin_right = 835.0
margin_bottom = 24.0
text = "Show Map"
items = [ "Hide Map", null, false, 0, null, "Show Map", null, false, 1, null ]
selected = 1
[node name="FileList" type="FileDialog" parent="."] [node name="FileList" type="FileDialog" parent="."]
margin_top = 24.0 margin_top = 24.0
@ -195,12 +107,11 @@ margin_right = 1024.0
margin_bottom = 600.0 margin_bottom = 600.0
size_flags_vertical = 3 size_flags_vertical = 3
popup_exclusive = true popup_exclusive = true
window_title = "Salva un file"
dialog_hide_on_ok = true dialog_hide_on_ok = true
filters = PoolStringArray( "*.txt ; Plain Text File", "*.rtf ; Rich Text Format File", "*.log ; Log File", "*.md ; MD File", "*.doc ; WordPad Document", "*.doc ; Microsoft Word Document", "*.docm ; Word Open XML Macro-Enabled Document", "*.docx ; Microsoft Word Open XML Document", "*.bbs ; Bulletin Board System Text", "*.dat ; Data File", "*.xml ; XML File", "*.sql ; SQL database file", "*.json ; JavaScript Object Notation File", "*.html ; HyperText Markup Language", "*.csv ; Comma-separated values", "*.cfg ; Configuration File", "*.ini ; Initialization File (same as .cfg Configuration File)", "*.csv ; Comma-separated values File", "*.res ; Resource File" ) filters = PoolStringArray( "*.txt ; Plain Text File", "*.rtf ; Rich Text Format File", "*.log ; Log File", "*.md ; MD File", "*.doc ; WordPad Document", "*.doc ; Microsoft Word Document", "*.docm ; Word Open XML Macro-Enabled Document", "*.docx ; Microsoft Word Open XML Document", "*.bbs ; Bulletin Board System Text", "*.dat ; Data File", "*.xml ; XML File", "*.sql ; SQL database file", "*.json ; JavaScript Object Notation File", "*.html ; HyperText Markup Language" )
show_hidden_files = true
[node name="NewFileDialogue" type="AcceptDialog" parent="."] [node name="NewFileDialogue" type="AcceptDialog" parent="."]
editor/display_folded = true
margin_left = 348.254 margin_left = 348.254
margin_top = 232.623 margin_top = 232.623
margin_right = 644.254 margin_right = 644.254
@ -247,18 +158,7 @@ window_title = "Unsaved changes"
dialog_text = "There are some unsaved changes. dialog_text = "There are some unsaved changes.
Press \"OK\" if you want to close this tab anyway, or \"cancel\" if you want to keep on editing your file." Press \"OK\" if you want to close this tab anyway, or \"cancel\" if you want to keep on editing your file."
[node name="SelectFontDialog" type="FileDialog" parent="."] [node name="VSeparator" type="VSeparator" parent="."]
anchor_right = 1.0 visible = false
anchor_bottom = 1.0 anchor_bottom = 1.0
margin_left = 222.0 margin_right = 24.0
margin_top = 132.0
margin_right = -221.0
margin_bottom = -131.0
window_title = "Open a File"
resizable = true
mode = 0
access = 2
filters = PoolStringArray( "*.TTF", "*.ttf" )
show_hidden_files = true
[connection signal="confirmed" from="ConfirmationDialog" to="." method="_on_ConfirmationDialog_confirmed"]

View File

@ -0,0 +1,144 @@
[gd_scene load_steps=12 format=2]
[ext_resource path="res://addons/file-editor/scripts/FileScene.gd" type="Script" id=1]
[ext_resource path="res://addons/file-editor/fonts/Roboto-Black.ttf" type="DynamicFontData" id=2]
[sub_resource type="StyleBoxFlat" id=1]
content_margin_left = 10.0
content_margin_right = 10.0
bg_color = Color( 0.145098, 0.172549, 0.231373, 1 )
[sub_resource type="StyleBoxEmpty" id=9]
[sub_resource type="StyleBoxEmpty" id=2]
[sub_resource type="StyleBoxEmpty" id=3]
[sub_resource type="StyleBoxEmpty" id=4]
[sub_resource type="StyleBoxEmpty" id=5]
[sub_resource type="StyleBoxEmpty" id=6]
[sub_resource type="StyleBoxEmpty" id=7]
[sub_resource type="DynamicFont" id=8]
font_data = ExtResource( 2 )
[node name="filename" type="VBoxContainer"]
anchor_right = 1.0
anchor_bottom = 1.0
size_flags_vertical = 3
script = ExtResource( 1 )
[node name="HSeparator" type="HSeparator" parent="."]
margin_right = 1024.0
margin_bottom = 4.0
[node name="TopBar" type="HBoxContainer" parent="."]
margin_top = 8.0
margin_right = 1024.0
margin_bottom = 28.0
[node name="VSeparator" type="VSeparator" parent="TopBar"]
margin_right = 4.0
margin_bottom = 20.0
[node name="FileButton" type="MenuButton" parent="TopBar"]
margin_left = 8.0
margin_right = 51.0
margin_bottom = 20.0
custom_styles/hover = SubResource( 1 )
custom_styles/normal = SubResource( 1 )
text = "File"
flat = false
items = [ "Save File", null, 0, false, false, 0, 0, null, "", false, "Save file As...", null, 0, false, false, 1, 0, null, "", false, "", null, 0, false, false, -1, 0, null, "", true, "Normal Preview", null, 0, false, false, 2, 0, null, "", false, "BBCode Preview", null, 0, false, false, 3, 0, null, "", false, "Markdown Preview", null, 0, false, false, 4, 0, null, "", false, "HTML Preview", null, 0, false, false, 5, 0, null, "", false ]
[node name="filepath" type="Label" parent="TopBar"]
margin_left = 523.0
margin_top = 3.0
margin_right = 523.0
margin_bottom = 17.0
size_flags_horizontal = 6
[node name="close_btn" type="Button" parent="TopBar"]
margin_left = 996.0
margin_right = 1016.0
margin_bottom = 20.0
size_flags_horizontal = 8
text = "X"
[node name="VSeparator2" type="VSeparator" parent="TopBar"]
margin_left = 1020.0
margin_right = 1024.0
margin_bottom = 20.0
[node name="TextEditor" type="TextEdit" parent="."]
margin_top = 32.0
margin_right = 1024.0
margin_bottom = 577.0
size_flags_vertical = 3
syntax_highlighting = true
show_line_numbers = true
breakpoint_gutter = true
highlight_all_occurrences = true
smooth_scrolling = true
wrap_enabled = true
caret_blink = true
caret_blink_speed = 1.0
caret_moving_by_right_click = false
[node name="FileInfo" type="HBoxContainer" parent="."]
margin_top = 581.0
margin_right = 1024.0
margin_bottom = 600.0
custom_constants/separation = 2
[node name="VSeparator4" type="VSeparator" parent="FileInfo"]
margin_right = 5.0
margin_bottom = 19.0
rect_min_size = Vector2( 5, 0 )
custom_styles/separator = SubResource( 9 )
[node name="lastmodified_icon" type="TextureRect" parent="FileInfo"]
margin_left = 7.0
margin_right = 7.0
margin_bottom = 19.0
stretch_mode = 4
[node name="Label" type="Label" parent="FileInfo"]
margin_left = 9.0
margin_top = 2.0
margin_right = 134.0
margin_bottom = 16.0
text = "Last modified time:"
[node name="lastmodified" type="Label" parent="FileInfo"]
margin_left = 136.0
margin_top = 2.0
margin_right = 136.0
margin_bottom = 16.0
[node name="Readonly" type="CheckBox" parent="FileInfo"]
margin_left = 939.0
margin_right = 1018.0
margin_bottom = 19.0
size_flags_horizontal = 10
custom_styles/hover = SubResource( 2 )
custom_styles/pressed = SubResource( 3 )
custom_styles/focus = SubResource( 4 )
custom_styles/disabled = SubResource( 5 )
custom_styles/hover_pressed = SubResource( 6 )
custom_styles/normal = SubResource( 7 )
custom_fonts/font = SubResource( 8 )
custom_colors/font_color = Color( 0.145098, 0.172549, 0.231373, 1 )
custom_colors/font_color_pressed = Color( 1, 1, 1, 1 )
text = "Can Edit"
flat = true
[node name="VSeparator3" type="VSeparator" parent="FileInfo"]
margin_left = 1020.0
margin_right = 1024.0
margin_bottom = 19.0
rect_min_size = Vector2( 4, 0 )
[connection signal="text_changed" from="TextEditor" to="." method="_on_TextEditor_text_changed"]

View File

@ -0,0 +1,53 @@
[gd_scene load_steps=12 format=2]
[ext_resource path="res://addons/file-editor/scripts/Preview.gd" type="Script" id=1]
[ext_resource path="res://addons/file-editor/fonts/COUR.TTF" type="DynamicFontData" id=2]
[ext_resource path="res://addons/file-editor/fonts/Carlito-BoldItalic.ttf" type="DynamicFontData" id=3]
[ext_resource path="res://addons/file-editor/fonts/Carlito-Italic.ttf" type="DynamicFontData" id=4]
[ext_resource path="res://addons/file-editor/fonts/Carlito-Bold.ttf" type="DynamicFontData" id=5]
[ext_resource path="res://addons/file-editor/fonts/Carlito-Regular.ttf" type="DynamicFontData" id=6]
[sub_resource type="DynamicFont" id=1]
use_mipmaps = true
use_filter = true
font_data = ExtResource( 2 )
[sub_resource type="DynamicFont" id=2]
font_data = ExtResource( 3 )
[sub_resource type="DynamicFont" id=3]
font_data = ExtResource( 4 )
[sub_resource type="DynamicFont" id=4]
font_data = ExtResource( 5 )
[sub_resource type="DynamicFont" id=5]
font_data = ExtResource( 6 )
[node name="Preview" type="WindowDialog"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 81.0
margin_top = 47.0
margin_right = -80.0
margin_bottom = -48.0
window_title = "File preview"
resizable = true
script = ExtResource( 1 )
[node name="Container" type="VBoxContainer" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
[node name="TextPreview" type="RichTextLabel" parent="Container"]
margin_right = 863.0
margin_bottom = 505.0
size_flags_vertical = 3
custom_fonts/mono_font = SubResource( 1 )
custom_fonts/bold_italics_font = SubResource( 2 )
custom_fonts/italics_font = SubResource( 3 )
custom_fonts/bold_font = SubResource( 4 )
custom_fonts/normal_font = SubResource( 5 )
bbcode_enabled = true
scroll_following = true
[connection signal="popup_hide" from="." to="." method="_on_Preview_popup_hide"]

View File

@ -1,658 +1,139 @@
tool tool
extends Control extends Control
enum FileMenuOptions { onready var FileList = $FileList
FILE_MENU_OPTION_NEW = 0,
FILE_MENU_OPTION_OPEN = 1, onready var Editor = $Container/Editor
FILE_MENU_OPTION_CLOSE = 2,
FILE_MENU_OPTION_SAVE = 3, onready var OpenFile = $Container/Buttons/openfile_btn
FILE_MENU_OPTION_SAVE_AS = 4, onready var NewFile = $Container/Buttons/newfile_btn
FILE_MENU_OPTION_DELETE = 5, onready var DeleteFile = $Container/Buttons/deletefile_btn
FILE_MENU_OPTION_SEARCH = 6,
FILE_MENU_OPTION_REPLACE = 7, onready var NewFileDialogue = $NewFileDialogue
}; onready var NewFileDialogue_name = $NewFileDialogue/VBoxContainer/new_filename
onready var Version = $Container/Buttons/version
var FileScene = load("res://addons/file-editor/scenes/FileScene.tscn")
var DIRECTORY : String = "res://" var DIRECTORY : String = "res://"
var EXCEPTIONS : String = "addons" var EXCEPTIONS : String = "addons"
var EXTENSIONS : PoolStringArray = [ var EXTENSIONS : PoolStringArray = [
"*.txt ; Plain Text File", "*.txt ; Plain Text File",
"*.rtf ; Rich Text Format File", "*.rtf ; Rich Text Format File",
"*.log ; Log File", "*.log ; Log File",
"*.md ; MD File", "*.md ; MD File",
"*.doc ; WordPad Document", "*.doc ; WordPad Document",
"*.doc ; Microsoft Word Document", "*.doc ; Microsoft Word Document",
"*.docm ; Word Open XML Macro-Enabled Document", "*.docm ; Word Open XML Macro-Enabled Document",
"*.docx ; Microsoft Word Open XML Document", "*.docx ; Microsoft Word Open XML Document",
"*.bbs ; Bulletin Board System Text", "*.bbs ; Bulletin Board System Text",
"*.dat ; Data File", "*.dat ; Data File",
"*.xml ; XML File", "*.xml ; XML File",
"*.sql ; SQL database file", "*.sql ; SQL database file",
"*.json ; JavaScript Object Notation File", "*.json ; JavaScript Object Notation File",
"*.html ; HyperText Markup Language", "*.html ; HyperText Markup Language",
"*.csv ; Comma-separated values",
"*.cfg ; Configuration File",
"*.ini ; Initialization File (same as .cfg Configuration File)",
"*.csv ; Comma-separated values File",
"*.res ; Resource File",
] ]
var directories = []
var files = []
var file_btn : MenuButton = null func _ready():
var preview_btn : MenuButton = null OpenFile.connect("pressed",self,"open_selected_file")
var settings_btn : MenuButton = null NewFile.connect("pressed",self,"open_newfiledialogue")
DeleteFile.connect("pressed",self,"delete_selected_file")
NewFile.icon = IconLoader.load_icon_from_name("new")
OpenFile.icon = IconLoader.load_icon_from_name("file")
DeleteFile.icon = IconLoader.load_icon_from_name("delete")
NewFileDialogue.connect("confirmed",self,"create_new_file")
FileList.connect("confirmed",self,"update_list")
FileList.set_filters(EXTENSIONS)
Editor.hide()
var plugin_version = ""
var config = ConfigFile.new()
var err = config.load("res://addons/file-editor/plugin.cfg")
if err == OK:
plugin_version = config.get_value("plugin","version")
update_version("v"+plugin_version)
var file_btn_popup : PopupMenu = null func update_version(v : String):
var preview_btn_popup : PopupMenu = null Version.set_text(v)
var settings_btn_popup : PopupMenu = null
var editor_container : HSplitContainer = null func open_file(path : String):
var file_container : VBoxContainer = null
var open_file_list : ItemList = null
var split_editor_container : VBoxContainer = null
var open_file_name : LineEdit = null
var wrap_btn : OptionButton = null
var map_btn : OptionButton = null
var file_list : FileDialog = null
var new_file_dialogue : AcceptDialog = null
var new_file_dialogue_name : LineEdit = null
var confirmation_close : ConfirmationDialog = null
var select_font_dialog : FileDialog = null
var LastOpenedFiles : Reference = null
var Preview = preload("res://addons/file-editor/scripts/Preview.gd")
var VanillaEditor = preload("res://addons/file-editor/scripts/VanillaEditor.gd")
var directories : Array
var files : Array
var current_file_index : int = -1
var current_file_path : String
var save_as : bool = false
var current_editor : Control
var current_font : DynamicFont
var editing_file : bool = false
func _init() -> void:
set_anchors_and_margins_preset(Control.PRESET_WIDE)
size_flags_vertical = SIZE_EXPAND_FILL
size_flags_horizontal = SIZE_EXPAND_FILL
var vbc : VBoxContainer = VBoxContainer.new()
add_child(vbc)
vbc.set_anchors_and_margins_preset(Control.PRESET_WIDE)
var tob_bar : HBoxContainer = HBoxContainer.new()
vbc.add_child(tob_bar)
file_btn = MenuButton.new()
tob_bar.add_child(file_btn)
file_btn.text = "File"
file_btn_popup = file_btn.get_popup()
var hotkey : InputEventKey = InputEventKey.new()
hotkey.scancode = KEY_N
hotkey.control = true
file_btn_popup.add_item("New File", FileMenuOptions.FILE_MENU_OPTION_NEW, hotkey.get_scancode_with_modifiers())
hotkey = InputEventKey.new()
hotkey.scancode = KEY_O
hotkey.control = true
file_btn_popup.add_item("Open File", FileMenuOptions.FILE_MENU_OPTION_OPEN, hotkey.get_scancode_with_modifiers())
hotkey = InputEventKey.new()
hotkey.scancode = KEY_C
hotkey.control = true
hotkey.alt = true
file_btn_popup.add_item("Close File", FileMenuOptions.FILE_MENU_OPTION_CLOSE, hotkey.get_scancode_with_modifiers())
file_btn_popup.add_separator()
hotkey = InputEventKey.new()
hotkey.scancode = KEY_S
hotkey.control = true
file_btn_popup.add_item("Save File", FileMenuOptions.FILE_MENU_OPTION_SAVE, hotkey.get_scancode_with_modifiers())
hotkey = InputEventKey.new()
hotkey.scancode = KEY_S
hotkey.control = true
hotkey.alt = true
file_btn_popup.add_item("Save File as...", FileMenuOptions.FILE_MENU_OPTION_SAVE_AS, hotkey.get_scancode_with_modifiers())
#hotkey = InputEventKey.new()
#hotkey.scancode = KEY_D
#hotkey.control = true
#file_btn_popup.add_item("Delete File", FileMenuOptions.FILE_MENU_OPTION_DELETE, hotkey.get_scancode_with_modifiers())
file_btn_popup.add_item("Delete File", FileMenuOptions.FILE_MENU_OPTION_DELETE)
file_btn_popup.add_separator()
hotkey = InputEventKey.new()
hotkey.scancode = KEY_F
hotkey.control = true
file_btn_popup.add_item("Search in file...", FileMenuOptions.FILE_MENU_OPTION_SEARCH, hotkey.get_scancode_with_modifiers())
hotkey = InputEventKey.new()
hotkey.scancode = KEY_R
hotkey.control = true
file_btn_popup.add_item("Replace occurencies", FileMenuOptions.FILE_MENU_OPTION_REPLACE, hotkey.get_scancode_with_modifiers())
#Preview
preview_btn = MenuButton.new()
tob_bar.add_child(preview_btn)
preview_btn.text = "Preview"
preview_btn_popup = preview_btn.get_popup()
preview_btn_popup.add_item("BBCode Preview")
preview_btn_popup.add_item("Markdown Preview")
preview_btn_popup.add_item("HTML Preview")
preview_btn_popup.add_item("CSV Preview")
#Settings
settings_btn = MenuButton.new()
tob_bar.add_child(settings_btn)
settings_btn.text = "Settings"
settings_btn_popup = settings_btn.get_popup()
settings_btn_popup.add_item("Change Font")
#SplitContainer
editor_container = HSplitContainer.new()
vbc.add_child(editor_container)
editor_container.split_offset = 150
editor_container.size_flags_horizontal = SIZE_EXPAND_FILL
editor_container.size_flags_vertical = SIZE_EXPAND_FILL
#Files
file_container = VBoxContainer.new()
editor_container.add_child(file_container)
open_file_list = ItemList.new()
file_container.add_child(open_file_list)
open_file_list.allow_reselect = true
open_file_list.size_flags_vertical = SIZE_EXPAND_FILL
file_container.add_child(HSeparator.new())
#Editor
split_editor_container = VBoxContainer.new()
editor_container.add_child(split_editor_container)
var editor_top_bar : HBoxContainer = HBoxContainer.new()
split_editor_container.add_child(editor_top_bar)
var edtopbar_label : Label = Label.new()
editor_top_bar.add_child(edtopbar_label)
edtopbar_label.text = "Editing file:"
open_file_name = LineEdit.new()
editor_top_bar.add_child(open_file_name)
open_file_name.editable = false
open_file_name.mouse_filter = Control.MOUSE_FILTER_PASS
open_file_name.size_flags_horizontal = SIZE_EXPAND_FILL
wrap_btn = OptionButton.new()
editor_top_bar.add_child(wrap_btn)
wrap_btn.add_item("No Wrap")
wrap_btn.add_item("Soft Wrap")
map_btn = OptionButton.new()
editor_top_bar.add_child(map_btn)
map_btn.add_item("Hide Map")
map_btn.add_item("Show Map")
map_btn.selected = 1
#dialogs
file_list = FileDialog.new()
add_child(file_list)
file_list.show_hidden_files = true
file_list.dialog_hide_on_ok = true
file_list.window_title = "Save file"
file_list.popup_exclusive = true
file_list.set_anchors_and_margins_preset(Control.PRESET_WIDE)
file_list.margin_left = 222
file_list.margin_top = 132
file_list.margin_right = -221
file_list.margin_bottom = -131
file_list.rect_min_size = Vector2(200, 70)
new_file_dialogue = AcceptDialog.new()
add_child(new_file_dialogue)
new_file_dialogue.window_title = "Create new File"
var nfd_vbc : VBoxContainer = VBoxContainer.new()
new_file_dialogue.add_child(nfd_vbc)
var nfd_name : Label = Label.new()
nfd_vbc.add_child(nfd_name)
nfd_name.text = "Insert file name (no extension needed)"
nfd_name.align = Label.ALIGN_CENTER
nfd_name.valign = Label.VALIGN_CENTER
nfd_name.size_flags_vertical = SIZE_EXPAND_FILL
new_file_dialogue_name = LineEdit.new()
nfd_vbc.add_child(new_file_dialogue_name)
new_file_dialogue_name.clear_button_enabled = true
new_file_dialogue_name.text = "example"
new_file_dialogue_name.rect_min_size = Vector2(200, 0)
new_file_dialogue_name.size_flags_horizontal = SIZE_EXPAND | SIZE_SHRINK_CENTER
new_file_dialogue_name.size_flags_vertical = SIZE_EXPAND_FILL
confirmation_close = ConfirmationDialog.new()
add_child(confirmation_close)
confirmation_close.dialog_text = "There are some unsaved changes.\nPress \"OK\" if you want to close this tab anyway, or \"cancel\" if you want to keep on editing your file."
confirmation_close.window_title = "Unsaved changes"
confirmation_close.set_anchors_and_margins_preset(Control.PRESET_CENTER)
select_font_dialog = FileDialog.new()
add_child(select_font_dialog)
select_font_dialog.mode = FileDialog.MODE_OPEN_FILE
select_font_dialog.access = FileDialog.ACCESS_FILESYSTEM
select_font_dialog.show_hidden_files = true
select_font_dialog.window_title = "Open a File"
select_font_dialog.resizable = true
select_font_dialog.set_anchors_and_margins_preset(Control.PRESET_WIDE)
select_font_dialog.margin_left = 222
select_font_dialog.margin_top = 132
select_font_dialog.margin_right = -221
select_font_dialog.margin_bottom = -131
select_font_dialog.rect_min_size = Vector2(200, 70)
var farr : PoolStringArray = PoolStringArray()
farr.push_back("*.TTF")
farr.push_back("*.ttf")
select_font_dialog.filters = farr
func _ready() -> void:
if not Engine.is_editor_hint():
return
clean_editor()
connect_signals()
if LastOpenedFiles:
var opened_files : Array = LastOpenedFiles.load_opened_files()
for opened_file in opened_files:
open_file(opened_file[1], opened_file[2])
file_list.set_filters(EXTENSIONS)
func connect_signals() -> void:
file_list.connect("confirmed",self,"update_list")
file_btn_popup.connect("id_pressed",self,"_on_file_btn_pressed")
preview_btn_popup.connect("id_pressed",self,"_on_preview_btn_pressed")
settings_btn_popup.connect("id_pressed",self,"_on_settings_btn_pressed")
open_file_list.connect("item_selected",self,"_on_fileitem_pressed")
wrap_btn.connect("item_selected",self,"on_wrap_button")
map_btn.connect("item_selected",self,"on_minimap_button")
select_font_dialog.connect("file_selected",self,"_on_font_selected")
func create_selected_file() -> void:
update_list()
file_list.mode = FileDialog.MODE_SAVE_FILE
file_list.set_title("Create a new File")
if file_list.is_connected("file_selected",self,"delete_file"):
file_list.disconnect("file_selected",self,"delete_file")
if file_list.is_connected("file_selected",self,"open_file"):
file_list.disconnect("file_selected",self,"open_file")
if not file_list.is_connected("file_selected",self,"create_new_file"):
file_list.connect("file_selected",self,"create_new_file")
open_file_list()
func open_selected_file() -> void:
update_list()
file_list.mode = FileDialog.MODE_OPEN_FILE
file_list.set_title("Select a File you want to edit")
if file_list.is_connected("file_selected",self,"delete_file"):
file_list.disconnect("file_selected",self,"delete_file")
if file_list.is_connected("file_selected",self,"create_new_file"):
file_list.disconnect("file_selected",self,"create_new_file")
if not file_list.is_connected("file_selected",self,"open_file"):
file_list.connect("file_selected",self,"open_file")
open_file_list()
func delete_selected_file() -> void:
update_list()
file_list.mode = FileDialog.MODE_OPEN_FILES
file_list.set_title("Select one or more Files you want to delete")
if file_list.is_connected("file_selected",self,"open_file"):
file_list.disconnect("file_selected",self,"open_file")
if file_list.is_connected("file_selected",self,"create_new_file"):
file_list.disconnect("file_selected",self,"create_new_file")
if not file_list.is_connected("files_selected",self,"delete_file"):
file_list.connect("files_selected",self,"delete_file")
open_file_list()
func save_current_file_as() -> void:
update_list()
file_list.mode = FileDialog.MODE_SAVE_FILE
file_list.set_title("Save this File as...")
if file_list.is_connected("file_selected",self,"delete_file"):
file_list.disconnect("file_selected",self,"delete_file")
if file_list.is_connected("file_selected",self,"open_file"):
file_list.disconnect("file_selected",self,"open_file")
if not file_list.is_connected("file_selected",self,"create_new_file"):
file_list.connect("file_selected",self,"create_new_file")
open_file_list()
func _on_file_btn_pressed(index : int) -> void:
match index:
FileMenuOptions.FILE_MENU_OPTION_NEW:
create_selected_file()
FileMenuOptions.FILE_MENU_OPTION_OPEN:
open_selected_file()
FileMenuOptions.FILE_MENU_OPTION_CLOSE:
if current_file_index!=-1 and current_file_path != "":
close_file(current_file_index)
FileMenuOptions.FILE_MENU_OPTION_SAVE:
if current_file_index!=-1 and current_file_path != "":
save_as = false
save_file(current_file_path)
FileMenuOptions.FILE_MENU_OPTION_SAVE_AS:
if current_file_index!=-1 and current_file_path != "":
save_as = true
save_file(current_file_path)
save_current_file_as()
FileMenuOptions.FILE_MENU_OPTION_DELETE:
delete_selected_file()
FileMenuOptions.FILE_MENU_OPTION_SEARCH:
current_editor.open_search_box()
FileMenuOptions.FILE_MENU_OPTION_REPLACE:
current_editor.open_replace_box()
func _on_preview_btn_pressed(id : int) -> void:
if id == 0:
bbcode_preview()
elif id == 1:
markdown_preview()
elif id == 2:
html_preview()
elif id == 3:
csv_preview()
func _on_settings_btn_pressed(index : int) -> void:
match index:
0:
select_font_dialog.popup()
func _on_font_selected(font_path : String) -> void:
current_editor.set_font(font_path)
LastOpenedFiles.store_editor_fonts(current_file_path.get_file(), font_path)
func _on_fileitem_pressed(index : int) -> void:
current_file_index = index
var selected_item_metadata : Array = open_file_list.get_item_metadata(current_file_index)
var extension : String = selected_item_metadata[0].current_path.get_file().get_extension()
if open_file_list.get_item_text(current_file_index).begins_with("(*)"):
editing_file = true
else:
editing_file = false
current_file_path = selected_item_metadata[0].current_path
if current_editor.visible or current_editor == null:
if current_editor != null:
current_editor.hide()
current_editor = selected_item_metadata[0]
current_editor.show()
open_file_name.set_text(current_editor.current_path)
if wrap_btn.get_selected_id() == 1:
current_editor.set_wrap_enabled(true)
else:
current_editor.set_wrap_enabled(false)
if map_btn.get_selected_id() == 1:
current_editor.draw_minimap(true)
else:
current_editor.draw_minimap(false)
func open_file(path : String, font : String = "null") -> void:
if current_file_path != path:
current_file_path = path
var vanilla_editor : Control = open_in_vanillaeditor(path)
if font != "null" and vanilla_editor.get("custom_fonts/font")!=null:
vanilla_editor.set_font(font)
generate_file_item(path, vanilla_editor)
LastOpenedFiles.store_opened_files(open_file_list)
current_editor.show()
func generate_file_item(path : String , veditor : Control) -> void:
open_file_name.set_text(path)
open_file_list.add_item(path.get_file(), null,true)
current_file_index = open_file_list.get_item_count()-1
open_file_list.set_item_metadata(current_file_index,[veditor])
open_file_list.select(open_file_list.get_item_count()-1)
func open_in_vanillaeditor(path : String) -> Control:
var editor : Control = VanillaEditor.new()
editor.LastOpenedFiles = LastOpenedFiles
editor.file_list = file_list
split_editor_container.add_child(editor,true)
if current_editor and current_editor!=editor:
editor.show()
current_editor.hide()
current_editor = editor
editor.connect("text_changed",self,"_on_vanillaeditor_text_changed")
var current_file : File = File.new() var current_file : File = File.new()
current_file.open(path,File.READ) current_file.open(path,File.READ)
var current_content : String = "" var current_content = current_file.get_as_text()
current_content = current_file.get_as_text()
var last_modified = OS.get_datetime_from_unix_time(current_file.get_modified_time(path)) var last_modified = OS.get_datetime_from_unix_time(current_file.get_modified_time(path))
var file_tab = FileScene.instance()
Editor.add_child(file_tab)
file_tab.new_file_open(path,current_content,last_modified)
Editor.show()
current_file.close() current_file.close()
editor.new_file_open(current_content,last_modified,current_file_path)
update_list() update_list()
if wrap_btn.get_selected_id() == 1:
current_editor.set_wrap_enabled(true)
return editor
func close_file(index : int) -> void: func open_newfiledialogue():
if editing_file: NewFileDialogue.popup()
confirmation_close.popup() NewFileDialogue.set_position(OS.get_screen_size()/2 - NewFileDialogue.get_size()/2)
func create_new_file():
if NewFileDialogue_name.get_text():
NewFileDialogue.hide()
var new_file_tab = FileScene.instance()
Editor.add_child(new_file_tab)
new_file_tab.new_file_create(NewFileDialogue_name.get_text())
Editor.show()
update_list()
else: else:
confirm_close(index) print("<filename> cannot be empty! Please, give your file a name.")
func confirm_close(index : int) -> void: func open_filelist():
LastOpenedFiles.remove_opened_file(index,open_file_list) update_list()
open_file_list.remove_item(index) FileList.popup()
open_file_name.clear() FileList.set_position(OS.get_screen_size()/2 - FileList.get_size()/2)
current_editor.queue_free()
if index > 0:
open_file_list.select(index-1)
_on_fileitem_pressed(index-1)
func _on_update_file() -> void: func open_selected_file():
var current_file : File = File.new() update_list()
current_file.open(current_file_path,File.READ) FileList.mode = FileDialog.MODE_OPEN_FILE
FileList.set_title("Select a file you want to edit")
var current_content : String = current_file.get_as_text() if FileList.is_connected("file_selected",self,"delete_file"):
var last_modified : Dictionary = OS.get_datetime_from_unix_time(current_file.get_modified_time(current_file_path)) FileList.disconnect("file_selected",self,"delete_file")
if not FileList.is_connected("file_selected",self,"open_file"):
current_file.close() FileList.connect("file_selected",self,"open_file")
else:
current_editor.new_file_open(current_content,last_modified,current_file_path) FileList.disconnect("file_selected",self,"open_file")
FileList.connect("file_selected",self,"open_file")
open_filelist()
func delete_file(files_selected : PoolStringArray) -> void: func delete_selected_file():
update_list()
FileList.mode = FileDialog.MODE_OPEN_FILE
FileList.set_title("Select a file you want to delete")
if FileList.is_connected("file_selected",self,"open_file"):
FileList.disconnect("file_selected",self,"open_file")
if not FileList.is_connected("file_selected",self,"delete_file"):
FileList.connect("file_selected",self,"delete_file")
else:
FileList.disconnect("file_selected",self,"delete_file")
FileList.connect("file_selected",self,"delete_file")
open_filelist()
func delete_file(path : String):
var dir = Directory.new() var dir = Directory.new()
for file in files_selected: dir.remove(path)
dir.remove(file)
update_list() update_list()
func open_new_file_dialogue() -> void: func update_list():
new_file_dialogue.popup() FileList.invalidate()
new_file_dialogue.set_position(OS.get_screen_size()/2 - new_file_dialogue.get_size()/2)
func open_file_list() -> void:
update_list()
file_list.popup()
file_list.set_position(OS.get_screen_size()/2 - file_list.get_size()/2)
func create_new_file(given_path : String) -> void:
var current_file : File = File.new()
current_file.open(given_path,File.WRITE)
if save_as:
current_file.store_line(current_editor.text_editor.get_text())
current_file.close()
open_file(given_path)
func save_file(current_path : String) -> void:
print("Saving file: ",current_path)
var current_file : File = File.new()
current_file.open(current_path,File.WRITE)
var current_content : String = ""
var lines : int = current_editor.text_editor.get_line_count()
for line in range(lines):
#if current_editor.text_editor.get_line(line) == "":
# continue
current_content = current_editor.text_editor.get_text()
current_file.store_line(current_editor.text_editor.get_line(line))
current_file.close()
current_file_path = current_path
var last_modified : Dictionary = OS.get_datetime_from_unix_time(current_file.get_modified_time(current_file_path))
current_editor.update_lastmodified(last_modified,"save")
open_file_list.set_item_metadata(current_file_index,[current_editor])
if open_file_list.get_item_text(current_file_index).begins_with("(*)"):
open_file_list.set_item_text(current_file_index,open_file_list.get_item_text(current_file_index).lstrip("(*)"))
editing_file = false
update_list()
func clean_editor() -> void:
var nodes : Array = get_tree().get_nodes_in_group("vanilla_editor")
for i in range(nodes.size()):
var vanillaeditor : Node = nodes[i]
vanillaeditor.queue_free()
open_file_name.clear()
open_file_list.clear()
func csv_preview() -> void:
var preview : Control = Preview.new()
get_parent().get_parent().get_parent().add_child(preview)
preview.popup()
preview.window_title += " ("+current_file_path.get_file()+")"
var lines : int = current_editor.text_editor.get_line_count()
var rows : Array = Array()
for i in range(0, lines-1):
rows.append(current_editor.text_editor.get_line(i).rsplit(",",false))
preview.print_csv(rows)
func bbcode_preview() -> void:
var preview : Control = Preview.new()
get_parent().get_parent().get_parent().add_child(preview)
preview.popup()
preview.window_title += " ("+current_file_path.get_file()+")"
preview.print_bb(current_editor.text_editor.get_text())
func markdown_preview() -> void:
var preview : Control = Preview.new()
get_parent().get_parent().get_parent().add_child(preview)
preview.popup()
preview.window_title += " ("+current_file_path.get_file()+")"
preview.print_markdown(current_editor.text_editor.get_text())
func html_preview() -> void:
var preview : Control = Preview.new()
get_parent().get_parent().get_parent().add_child(preview)
preview.popup()
preview.window_title += " ("+current_file_path.get_file()+")"
preview.print_html(current_editor.text_editor.get_text())
func _on_vanillaeditor_text_changed() -> void:
if not open_file_list.get_item_text(current_file_index).begins_with("(*)"):
open_file_list.set_item_text(current_file_index,"(*)"+open_file_list.get_item_text(current_file_index))
editing_file = true
func update_list() -> void:
file_list.invalidate()
func on_wrap_button(index:int) -> void:
match index:
0:
current_editor.set_wrap_enabled(false)
1:
current_editor.set_wrap_enabled(true)
func on_minimap_button(index:int) -> void:
match index:
0:
current_editor.draw_minimap(false)
1:
current_editor.draw_minimap(true)
func check_file_preview(file : String) -> void:
# check whether the opened file has a corresponding preview session for its extension
pass
func _on_ConfirmationDialog_confirmed() -> void:
confirm_close(current_file_index)

View File

@ -0,0 +1,19 @@
tool
extends ToolButton
var fileditor_workspace
var fileditor
func _ready():
connect("pressed",self,"show_fileditor")
func show_fileditor():
fileditor_workspace.get_children()[0].hide()
fileditor_workspace.get_children()[1].hide()
fileditor_workspace.get_children()[2].hide()
fileditor_workspace.add_child(fileditor)
fileditor.show()
func load_values(fi, fe):
fileditor_workspace = fi
fileditor = fe

View File

@ -0,0 +1,156 @@
tool
extends VBoxContainer
onready var CloseFile = $TopBar/close_btn
onready var ReadOnly = $FileInfo/Readonly
onready var FileButton = $TopBar/FileButton.get_popup()
onready var TextEditor = $TextEditor
onready var LastModified = $FileInfo/lastmodified
onready var FileList = get_parent().get_parent().get_parent().get_node("FileList")
onready var ClosingFile = get_parent().get_parent().get_parent().get_node("ConfirmationDialog")
onready var FilePath = $TopBar/filepath
onready var LastModifiedIcon = $FileInfo/lastmodified_icon
var current_path = ""
var current_filename = ""
var old_file_content = ""
var Preview = load("res://addons/file-editor/scenes/Preview.tscn")
func _ready():
FileButton.connect("id_pressed",self,"button_pressed")
ClosingFile.connect("confirmed",self,"queue_free")
CloseFile.connect("pressed",self,"close_editor")
ReadOnly.connect("toggled",self,"_on_Readonly_toggled")
ReadOnly.set("custom_icons/checked",IconLoader.load_icon_from_name("read"))
ReadOnly.set("custom_icons/unchecked",IconLoader.load_icon_from_name("edit"))
func new_file_open(file_path, file_content, last_modified) :
current_path = file_path
var filename_ = file_path.get_file().replace(".","-")
FilePath.set_text(current_path)
if get_parent().has_node(filename_):
queue_free()
else:
set_name(filename_)
current_filename = filename_
old_file_content = file_content
TextEditor.set_text(file_content)
LastModifiedIcon.texture = IconLoader.load_icon_from_name("saveas")
LastModified.set_text(str(last_modified.hour)+":"+str(last_modified.minute)+" "+str(last_modified.day)+"/"+str(last_modified.month)+"/"+str(last_modified.year))
FileList.invalidate()
func new_file_create(file_name):
set_name(file_name)
current_filename = file_name
FileButton.set_item_disabled(0,true)
FileList.invalidate()
func save_file(current_path : String):
var current_file = File.new()
current_file.open(current_path,File.WRITE)
var current_content = TextEditor.get_text()
if current_content == null:
current_content = ""
current_file.store_line(current_content)
current_file.close()
old_file_content = current_content
var last_modified = OS.get_datetime_from_unix_time(current_file.get_modified_time(current_path))
LastModified.set_text(str(last_modified.hour)+":"+str(last_modified.minute)+" "+str(last_modified.day)+"/"+str(last_modified.month)+"/"+str(last_modified.year))
LastModifiedIcon.texture = IconLoader.load_icon_from_name("save")
FilePath.set_text(current_path)
FileList.invalidate()
func save_file_as():
var current_content = TextEditor.get_text()
FileList.mode = FileDialog.MODE_SAVE_FILE
FileList.set_title("Save this file as...")
if FileList.is_connected("file_selected",self,"delete_file"):
FileList.disconnect("file_selected",self,"delete_file")
if not FileList.is_connected("file_selected",self,"save_file"):
FileList.connect("file_selected",self,"save_file")
FileList.current_file = current_filename.replace("-",".")
open_filelist()
old_file_content = current_content
FileList.invalidate()
func open_filelist():
FileList.popup()
FileList.set_position(OS.get_screen_size()/2 - FileList.get_size()/2)
func button_pressed(id : int):
if id == 0:
save_file(current_path)
elif id == 1:
save_file_as()
elif id == 2:
open_preview()
elif id == 3:
bbcode_preview()
elif id == 4:
markdown_preview()
elif id == 5:
html_preview()
func open_preview():
var preview = Preview.instance()
get_parent().get_parent().get_parent().add_child(preview)
preview.popup()
preview.window_title += " ("+current_filename+")"
preview.print_preview(TextEditor.get_text())
func bbcode_preview():
var preview = Preview.instance()
get_parent().get_parent().get_parent().add_child(preview)
preview.popup()
preview.window_title += " ("+current_filename+")"
preview.print_bb(TextEditor.get_text())
func markdown_preview():
var preview = Preview.instance()
get_parent().get_parent().get_parent().add_child(preview)
preview.popup()
preview.window_title += " ("+current_filename+")"
preview.print_markdown(TextEditor.get_text())
func html_preview():
var preview = Preview.instance()
get_parent().get_parent().get_parent().add_child(preview)
preview.popup()
preview.window_title += " ("+current_filename+")"
preview.print_html(TextEditor.get_text())
func close_editor():
if old_file_content != TextEditor.get_text():
ClosingFile.popup()
else:
queue_free()
func _on_Readonly_toggled(button_pressed):
if button_pressed:
ReadOnly.set_text("Read Only")
TextEditor.readonly = (true)
else:
ReadOnly.set_text("Can Edit")
TextEditor.readonly = (false)
func _on_TextEditor_text_changed():
LastModifiedIcon.texture = IconLoader.load_icon_from_name("saveas")

View File

@ -2,14 +2,14 @@ tool
extends Node extends Node
func load_icon_from_name(icon_name : String) -> ImageTexture: func load_icon_from_name(icon_name : String) -> ImageTexture:
var file : File = File.new() var file = File.new()
var image : Image = Image.new() var image = Image.new()
var texture : ImageTexture = ImageTexture.new() var texture = ImageTexture.new()
file.open("res://addons/file-editor/icons.pngs/"+icon_name+".png.buttonicon", File.READ) file.open("res://addons/file-editor/icons.pngs/"+icon_name+".png.buttonicon", File.READ)
var buffer : PoolByteArray = file.get_buffer(file.get_len()) var buffer = file.get_buffer(file.get_len())
file.close() file.close()
image.load_png_from_buffer(buffer) image.load_png_from_buffer(buffer)
texture.create_from_image(image) texture.create_from_image(image)
return texture return texture

View File

@ -1,71 +0,0 @@
tool
extends Reference
var editor_plugin : EditorPlugin = null
var editor_settings : EditorSettings = null
func store_opened_files(filecontainer : Control) -> void:
var arr : Array = Array()
for child in range(filecontainer.get_item_count()):
var filepath : String = filecontainer.get_item_metadata(child)[0].current_path
var a : Array = Array()
a.push_back(filepath.get_file())
a.push_back(filepath)
arr.push_back(a)
editor_settings.set_project_metadata("file_editor", "files", arr)
func remove_opened_file(index : int , filecontainer : Control) -> void:
var filepath : String = filecontainer.get_item_metadata(index)[0].current_path
var f : String = filepath.get_file()
var arr : Array = editor_settings.get_project_metadata("file_editor", "files", Array())
for i in range(arr.size()):
var a : Array = arr[i]
if a[0] == f:
arr.remove(i)
break
editor_settings.set_project_metadata("file_editor", "files", arr)
var fonts_dict : Dictionary = editor_settings.get_project_metadata("file_editor", "file_fonts", Dictionary())
if fonts_dict.has(f):
fonts_dict.erase(f)
editor_settings.set_project_metadata("file_editor", "file_fonts", fonts_dict)
func load_opened_files() -> Array:
var arr : Array = editor_settings.get_project_metadata("file_editor", "files", Array())
var fonts_dict : Dictionary = editor_settings.get_project_metadata("file_editor", "file_fonts", Dictionary())
var keys : Array = Array()
for i in range(arr.size()):
var a : Array = arr[i]
# creating and returning an Array with this format [1:file name, 2:file path, 3:file font]
var k : Array
k.push_back(a[0])
k.push_back(a[1])
if fonts_dict.has(a[0]):
k.push_back(fonts_dict[a[0]])
else:
k.push_back("null")
keys.append(k)
return keys
func store_editor_fonts(file_name : String, font_path : String) -> void:
var fonts_dict : Dictionary = editor_settings.get_project_metadata("file_editor", "file_fonts", Dictionary())
fonts_dict[file_name] = font_path
editor_settings.set_project_metadata("file_editor", "file_fonts", fonts_dict)
func get_editor_font() -> String:
#var editor_plugin : EditorPlugin = EditorPlugin.new()
return editor_plugin.get_editor_interface().get_editor_settings().get_setting("interface/editor/code_font")

View File

@ -1,170 +1,104 @@
tool tool
extends WindowDialog extends WindowDialog
var text_preview : RichTextLabel = null onready var TextPreview = $Container/TextPreview
var table_preview : GridContainer = null
signal image_downloaded() func _ready():
signal image_loaded() pass
func _init() -> void: func print_preview(content : String):
window_title = "File preview" TextPreview.append_bbcode(content)
resizable = true
set_anchors_and_margins_preset(Control.PRESET_WIDE)
margin_left = 81
margin_top = 47
margin_right = -80
margin_bottom = -48
var vbc : VBoxContainer = VBoxContainer.new()
vbc.set_anchors_and_margins_preset(Control.PRESET_WIDE)
add_child(vbc)
text_preview = RichTextLabel.new()
vbc.add_child(text_preview)
text_preview.scroll_following = true
text_preview.bbcode_enabled = true
text_preview.size_flags_vertical = SIZE_EXPAND_FILL
text_preview.hide()
table_preview = GridContainer.new()
vbc.add_child(table_preview)
table_preview.columns = 3
table_preview.size_flags_horizontal = SIZE_EXPAND_FILL
table_preview.size_flags_vertical = SIZE_EXPAND_FILL
table_preview.hide()
connect("popup_hide", self, "_on_Preview_popup_hide")
func print_preview(content : String) -> void: func print_bb(content : String):
text_preview.append_bbcode(content) TextPreview.append_bbcode(content)
text_preview.show()
func print_bb(content : String) -> void: func print_markdown(content : String):
text_preview.append_bbcode(content) var result = ""
text_preview.show() var bolded = []
var italics = []
func print_markdown(content : String) -> void: var striked = []
var result : Array = Array() var coded = []
var bolded : Array = Array() var linknames = []
var italics : Array = Array() var images = []
var striked : Array = Array() var links = []
var coded : Array = Array() var lists = []
var linknames : Array = Array()
var images : Array = Array()
var links : Array = Array()
var lists : Array = Array()
var underlined : Array = Array()
var regex : RegEx = RegEx.new() var regex = RegEx.new()
regex.compile('\\*\\*(?<boldtext>.*)\\*\\*') regex.compile('\\*\\*(?<boldtext>.*)\\*\\*')
result = regex.search_all(content) result = regex.search_all(content)
for i in range(result.size()): if result:
var res : RegExMatch = result[i] for res in result:
bolded.append(res.get_string("boldtext")) bolded.append(res.get_string("boldtext"))
regex.compile('\\_\\_(?<underlinetext>.*)\\_\\_')
result = regex.search_all(content)
for i in range(result.size()):
var res : RegExMatch = result[i]
underlined.append(res.get_string("underlinetext"))
regex.compile("\\*(?<italictext>.*)\\*") regex.compile("\\*(?<italictext>.*)\\*")
result = regex.search_all(content) result = regex.search_all(content)
for i in range(result.size()): if result:
var res : RegExMatch = result[i] for res in result:
italics.append(res.get_string("italictext")) italics.append(res.get_string("italictext"))
regex.compile("~~(?<strikedtext>.*)~~") regex.compile("~~(?<strikedtext>.*)~~")
result = regex.search_all(content) result = regex.search_all(content)
for i in range(result.size()): if result:
var res : RegExMatch = result[i] for res in result:
striked.append(res.get_string("strikedtext")) striked.append(res.get_string("strikedtext"))
regex.compile("`(?<coded>.*)`") regex.compile("`(?<coded>.*)`")
result = regex.search_all(content) result = regex.search_all(content)
for i in range(result.size()): if result:
var res : RegExMatch = result[i] for res in result:
coded.append(res.get_string("coded")) coded.append(res.get_string("coded"))
regex.compile("[+-*](?<element>\\s.*)") regex.compile("[+-](?<element>\\s.*)")
result = regex.search_all(content) result = regex.search_all(content)
for i in range(result.size()): if result:
var res : RegExMatch = result[i] for res in result:
lists.append(res.get_string("element")) lists.append(res.get_string("element"))
regex.compile("(?<img>!\\[.*?\\))") regex.compile("(?<img>!\\[.*?\\))")
result = regex.search_all(content) result = regex.search_all(content)
for i in range(result.size()): if result:
var res : RegExMatch = result[i] for res in result:
images.append(res.get_string("img")) images.append(res.get_string("img"))
regex.compile("\\[(?<linkname>.*?)\\]|\\((?<link>[h\\.]\\S*?)\\)") regex.compile("\\[(?<linkname>.*?)\\]|\\((?<link>[h\\.]\\S*?)\\)")
result = regex.search_all(content) result = regex.search_all(content)
for i in range(result.size()): if result:
var res : RegExMatch = result[i] for res in result:
if res.get_string("link")!="":
if res.get_string("link")!="": links.append(res.get_string("link"))
links.append(res.get_string("link")) if res.get_string("linkname")!="":
linknames.append(res.get_string("linkname"))
if res.get_string("linkname")!="":
linknames.append(res.get_string("linkname"))
for i in range(bolded.size()): for bold in bolded:
var bold : String = bolded[i]
content = content.replace("**"+bold+"**","[b]"+bold+"[/b]") content = content.replace("**"+bold+"**","[b]"+bold+"[/b]")
for italic in italics:
for i in range(italics.size()):
var italic : String = italics[i]
content = content.replace("*"+italic+"*","[i]"+italic+"[/i]") content = content.replace("*"+italic+"*","[i]"+italic+"[/i]")
for strik in striked:
for i in range(striked.size()):
var strik : String = striked[i]
content = content.replace("~~"+strik+"~~","[s]"+strik+"[/s]") content = content.replace("~~"+strik+"~~","[s]"+strik+"[/s]")
for code in coded:
for i in range(underlined.size()):
var underline : String = underlined[i]
content = content.replace("__"+underline+"__","[u]"+underline+"[/u]")
for i in range(coded.size()):
var code : String = coded[i]
content = content.replace("`"+code+"`","[code]"+code+"[/code]") content = content.replace("`"+code+"`","[code]"+code+"[/code]")
for image in images:
for i in range(images.size()):
var image : String = images[i]
var substr = image.split("(") var substr = image.split("(")
var imglink = substr[1].rstrip(")") var imglink = substr[1].rstrip(")")
content = content.replace(image,"[img]"+imglink+"[/img]") content = content.replace(image,"[img]"+imglink+"[/img]")
for i in links.size(): for i in links.size():
content = content.replace("["+linknames[i]+"]("+links[i]+")","[url="+links[i]+"]"+linknames[i]+"[/url]") content = content.replace("["+linknames[i]+"]("+links[i]+")","[url="+links[i]+"]"+linknames[i]+"[/url]")
for element in lists:
for i in range(lists.size()):
var element : String = lists[i]
if content.find("- "+element): if content.find("- "+element):
content = content.replace("-"+element,"[indent]-"+element+"[/indent]") content = content.replace("-"+element,"[indent]-"+element+"[/indent]")
if content.find("+ "+element): if content.find("+ "+element):
content = content.replace("+"+element,"[indent]-"+element+"[/indent]") content = content.replace("+"+element,"[indent]-"+element+"[/indent]")
if content.find("* "+element):
content = content.replace("+"+element,"[indent]-"+element+"[/indent]")
text_preview.append_bbcode(content) TextPreview.append_bbcode(content)
text_preview.show()
func print_html(content : String) -> void: func print_html(content : String):
content = content.replace("<i>","[i]") content = content.replace("<i>","[i]")
content = content.replace("</i>","[/i]") content = content.replace("</i>","[/i]")
content = content.replace("<b>","[b]") content = content.replace("<b>","[b]")
content = content.replace("</b>","[/b]") content = content.replace("</b>","[/b]")
content = content.replace("<u>","[u]") content = content.replace("<u>","[u]")
content = content.replace("</u>","[/u]") content = content.replace("</u>","[/u]")
content = content.replace("<ins>","[u]")
content = content.replace("</ins>","[/u]")
content = content.replace("<del>","[s]")
content = content.replace("</del>","[/s]")
content = content.replace('<a href="',"[url=") content = content.replace('<a href="',"[url=")
content = content.replace('">',"]") content = content.replace('">',"]")
content = content.replace("</a>","[/url]") content = content.replace("</a>","[/url]")
@ -175,24 +109,8 @@ func print_html(content : String) -> void:
content = content.replace("</pre>","[/code]") content = content.replace("</pre>","[/code]")
content = content.replace("<center>","[center]") content = content.replace("<center>","[center]")
content = content.replace("</center>","[/center]") content = content.replace("</center>","[/center]")
content = content.replace("<right>","[right]")
content = content.replace("</right>","[/right]")
text_preview.append_bbcode(content) TextPreview.append_bbcode(content)
text_preview.show()
func print_csv(rows : Array) -> void: func _on_Preview_popup_hide():
table_preview.columns = rows[0].size()
for item in rows:
for string in item:
var label = Label.new()
label.text = str(string)
label.set_h_size_flags(SIZE_EXPAND)
label.set_align(1)
label.set_valign(1)
table_preview.add_child(label)
table_preview.show()
func _on_Preview_popup_hide() -> void:
queue_free() queue_free()

View File

@ -1,374 +0,0 @@
tool
extends VBoxContainer
var LastOpenedFiles : Reference = null
var text_editor : TextEdit = null
var file_list : FileDialog = null
var search_box : HBoxContainer = null
var search_box_line_edit : LineEdit = null
var search_box_match_case_cb : CheckBox = null
var search_box_whole_words_cb : CheckBox = null
var search_box_close_button : Button = null
var replace_box : HBoxContainer = null
var replace_box_replace_le : LineEdit = null
var replace_box_with : LineEdit = null
var replace_box_button : Button = null
var replace_box_close : Button = null
var file_info_last_modified_icon : TextureRect = null
var file_info_last_modified : Label = null
var file_info_c_counter : Label = null
var file_info_read_only : CheckBox = null
var current_path : String = ""
var current_filename : String = ""
var search_flag : int = 0
signal text_changed()
func _init() -> void:
size_flags_vertical = SIZE_EXPAND_FILL
set_anchors_and_margins_preset(Control.PRESET_WIDE)
text_editor = TextEdit.new()
add_child(text_editor)
text_editor.highlight_current_line = true
text_editor.syntax_highlighting = true
text_editor.show_line_numbers = true
text_editor.breakpoint_gutter = true
text_editor.highlight_all_occurrences = true
text_editor.override_selected_font_color = true
text_editor.smooth_scrolling = true
text_editor.hiding_enabled = true
#todo look this up from the editor settings
#text_editor.caret_blink = true
#text_editor.caret_blink_speed = 1
text_editor.caret_moving_by_right_click = false
text_editor.minimap_draw = true
text_editor.size_flags_vertical = SIZE_EXPAND_FILL
text_editor.set("custom_colors/member_variable_color", Color(0.737255, 0.882353, 1))
text_editor.set("custom_colors/code_folding_color", Color(1, 1, 1, 0.701961))
text_editor.set("custom_colors/function_color", Color(0.341176, 0.701961, 1))
text_editor.set("custom_colors/safe_line_number_color", Color(0.8, 0.968627, 0.827451, 0.74902))
text_editor.set("custom_colors/symbol_color", Color(0.670588, 0.788235, 1))
text_editor.set("custom_colors/caret_background_color", Color(0, 0, 0))
text_editor.set("custom_colors/selection_color", Color(0.411765, 0.611765, 0.909804, 0.34902))
text_editor.set("custom_colors/caret_color", Color(1, 1, 1))
text_editor.set("custom_colors/breakpoint_color", Color(1, 0.470588, 0.419608))
text_editor.set("custom_colors/font_color_selected", Color(0, 0, 0))
text_editor.set("custom_colors/font_color", Color(1, 1, 1))
text_editor.set("custom_colors/completion_font_color", Color(1, 1, 1, 0.392157))
text_editor.set("custom_colors/completion_scroll_color", Color(1, 1, 1, 0.070588))
text_editor.set("custom_colors/background_color", Color(0.121569, 0.145098, 0.192157))
text_editor.set("custom_colors/number_color", Color(0.631373, 1, 0.882353))
text_editor.set("custom_colors/completion_background_color", Color(0.196078, 0.231373, 0.309804))
text_editor.set("custom_colors/brace_mismatch_color", Color(1, 0.470588, 0.419608))
text_editor.set("custom_colors/current_line_color", Color(1, 1, 1, 0.070588))
text_editor.set("custom_colors/completion_selected_color", Color(1, 1, 1, 0.070588))
text_editor.set("custom_colors/mark_color", Color(1, 0.470588, 0.419608, 0.301961))
text_editor.set("custom_colors/word_highlighted_color", Color(1, 1, 1, 0.392157))
text_editor.set("custom_colors/completion_existing_color", Color(1, 1, 1, 0.392157))
text_editor.set("custom_constants/completion_lines", 20)
text_editor.set("custom_constants/completion_max_width", 20)
text_editor.set("custom_constants/completion_scroll_width", 20)
#text_editor.owner = self
search_box = HBoxContainer.new()
add_child(search_box)
search_box.hide()
var selabel : Label = Label.new()
search_box.add_child(selabel)
selabel.text = "Search:"
search_box_line_edit = LineEdit.new()
search_box.add_child(search_box_line_edit)
search_box_line_edit.size_flags_horizontal = SIZE_EXPAND_FILL
search_box_line_edit.connect("text_changed", self, "_on_LineEdit_text_changed")
search_box_line_edit.connect("focus_entered", self, "_on_LineEdit_focus_entered")
search_box_match_case_cb = CheckBox.new()
search_box.add_child(search_box_match_case_cb)
search_box_match_case_cb.text = "Match Case"
search_box_match_case_cb.connect("toggled", self, "_on_matchcase_toggled")
search_box_whole_words_cb = CheckBox.new()
search_box.add_child(search_box_whole_words_cb)
search_box_whole_words_cb.text = "Whole Words"
search_box_whole_words_cb.connect("toggled", self, "_on_wholewords_toggled")
search_box_close_button = Button.new()
search_box.add_child(search_box_close_button)
search_box_close_button.text = "x"
search_box_close_button.flat = true
search_box_whole_words_cb.connect("pressed", self, "_on_close_pressed")
replace_box = HBoxContainer.new()
add_child(replace_box)
replace_box.hide()
var rblabel : Label = Label.new()
replace_box.add_child(rblabel)
rblabel.text = "Replace:"
replace_box_replace_le = LineEdit.new()
replace_box.add_child(replace_box_replace_le)
replace_box_replace_le.size_flags_horizontal = SIZE_EXPAND_FILL
var rb2label : Label = Label.new()
replace_box.add_child(rb2label)
rb2label.text = "With:"
replace_box_with = LineEdit.new()
replace_box.add_child(replace_box_with)
replace_box_with.size_flags_horizontal = SIZE_EXPAND_FILL
replace_box_button = Button.new()
replace_box.add_child(replace_box_button)
replace_box_button.text = "Replace"
replace_box_button.connect("pressed", self, "_on_Button_pressed")
replace_box_close = Button.new()
replace_box.add_child(replace_box_close)
replace_box_close.text = "x"
replace_box_close.flat = true
replace_box_button.connect("pressed", self, "_on_close2_pressed")
var file_info : HBoxContainer = HBoxContainer.new()
add_child(file_info)
file_info_last_modified_icon = TextureRect.new()
file_info.add_child(file_info_last_modified_icon)
file_info_last_modified_icon.stretch_mode = TextureRect.STRETCH_KEEP_CENTERED
var filabel : Label = Label.new()
file_info.add_child(filabel)
filabel.text = "Last modified time:"
file_info_last_modified = Label.new()
file_info.add_child(file_info_last_modified)
var fi2label : Label = Label.new()
file_info.add_child(fi2label)
fi2label.text = "Characters counter:"
fi2label.align = Label.ALIGN_RIGHT
fi2label.size_flags_horizontal = SIZE_EXPAND | SIZE_FILL | SIZE_SHRINK_CENTER | SIZE_SHRINK_END
file_info_c_counter = Label.new()
file_info.add_child(file_info_c_counter)
file_info_c_counter.size_flags_horizontal = SIZE_EXPAND
file_info_read_only = CheckBox.new()
file_info.add_child(file_info_read_only)
file_info_read_only.text = "Can Edit"
file_info_read_only.flat = true
file_info_read_only.size_flags_horizontal = SIZE_EXPAND | SIZE_SHRINK_END
func _ready() -> void:
text_editor.connect("text_changed", self, "_on_text_editor_text_changed")
#FileList = get_parent().get_parent().get_parent().get_parent().get_node("FileList")
file_info_read_only.connect("toggled",self,"_on_Readonly_toggled")
#file_info_read_only.set("custom_icons/checked",IconLoader.load_icon_from_name("read"))
#file_info_read_only.set("custom_icons/unchecked",IconLoader.load_icon_from_name("edit"))
add_to_group("vanilla_editor")
load_default_font()
func set_font(font_path : String) -> void:
var dynamic_font : DynamicFont = DynamicFont.new()
var dynamic_font_data : DynamicFontData = DynamicFontData.new()
dynamic_font_data.set_font_path(font_path)
dynamic_font.set_font_data(dynamic_font_data)
text_editor.set("custom_fonts/font",dynamic_font)
func load_default_font() -> void:
var default_font : String = LastOpenedFiles.get_editor_font()
if default_font != "":
set_font(default_font)
func set_wrap_enabled(enabled:bool) -> void:
text_editor.set_wrap_enabled(enabled)
text_editor.update()
func draw_minimap(value:bool) -> void:
text_editor.draw_minimap(value)
text_editor.update()
func color_region(filextension : String) -> void:
match(filextension):
"bbs":
text_editor.add_color_region("[b]","[/b]",Color8(153,153,255,255),false)
text_editor.add_color_region("[i]","[/i]",Color8(153,255,153,255),false)
text_editor.add_color_region("[s]","[/s]",Color8(255,153,153,255),false)
text_editor.add_color_region("[u]","[/u]",Color8(255,255,102,255),false)
text_editor.add_color_region("[url","[/url]",Color8(153,204,255,255),false)
text_editor.add_color_region("[code]","[/code]",Color8(192,192,192,255),false)
text_editor.add_color_region("[img]","[/img]",Color8(255,204,153,255),false)
text_editor.add_color_region("[center]","[/center]",Color8(175,238,238,255),false)
text_editor.add_color_region("[right]","[/right]",Color8(135,206,235,255),false)
"html":
text_editor.add_color_region("<b>","</b>",Color8(153,153,255,255),false)
text_editor.add_color_region("<i>","</i>",Color8(153,255,153,255),false)
text_editor.add_color_region("<del>","</del>",Color8(255,153,153,255),false)
text_editor.add_color_region("<ins>","</ins>",Color8(255,255,102,255),false)
text_editor.add_color_region("<a","</a>",Color8(153,204,255,255),false)
text_editor.add_color_region("<img","/>",Color8(255,204,153,255),true)
text_editor.add_color_region("<pre>","</pre>",Color8(192,192,192,255),false)
text_editor.add_color_region("<center>","</center>",Color8(175,238,238,255),false)
text_editor.add_color_region("<right>","</right>",Color8(135,206,235,255),false)
"md":
text_editor.add_color_region("***","***",Color8(126,186,181,255),false)
text_editor.add_color_region("**","**",Color8(153,153,255,255),false)
text_editor.add_color_region("*","*",Color8(153,255,153,255),false)
text_editor.add_color_region("+ ","",Color8(255,178,102,255),false)
text_editor.add_color_region("- ","",Color8(255,178,102,255),false)
text_editor.add_color_region("~~","~~",Color8(255,153,153,255),false)
text_editor.add_color_region("__","__",Color8(255,255,102,255),false)
text_editor.add_color_region("[",")",Color8(153,204,255,255),false)
text_editor.add_color_region("`","`",Color8(192,192,192,255),false)
text_editor.add_color_region('"*.','"',Color8(255,255,255,255),true)
text_editor.add_color_region("# ","",Color8(105,105,105,255),true)
text_editor.add_color_region("## ","",Color8(128,128,128,255),true)
text_editor.add_color_region("### ","",Color8(169,169,169,255),true)
text_editor.add_color_region("#### ","",Color8(192,192,192,255),true)
text_editor.add_color_region("##### ","",Color8(211,211,211,255),true)
text_editor.add_color_region("###### ","",Color8(255,255,255,255),true)
text_editor.add_color_region("> ","",Color8(172,138,79,255),true)
"cfg":
text_editor.add_color_region("[","]",Color8(153,204,255,255),false)
text_editor.add_color_region('"','"',Color8(255,255,102,255),false)
text_editor.add_color_region(';','',Color8(128,128,128,255),true)
"ini":
text_editor.add_color_region("[","]",Color8(153,204,255,255),false)
text_editor.add_color_region('"','"',Color8(255,255,102,255),false)
text_editor.add_color_region(';','',Color8(128,128,128,255),true)
_:
pass
func clean_editor() -> void:
text_editor.set_text("")
#file_info_last_modified_icon.texture = IconLoader.load_icon_from_name("save")
file_info_last_modified.set_text("")
file_list.invalidate()
current_filename = ""
current_path = ""
func new_file_open(file_content : String, last_modified : Dictionary, current_file_path : String) -> void:
current_path = current_file_path
current_filename = current_file_path.get_file()
color_region(current_filename.get_extension())
text_editor.set_text(file_content)
update_lastmodified(last_modified,"save")
file_list.invalidate()
count_characters()
func update_lastmodified(last_modified : Dictionary, icon : String) -> void:
file_info_last_modified.set_text(str(last_modified.hour)+":"+str(last_modified.minute)+" "+str(last_modified.day)+"/"+str(last_modified.month)+"/"+str(last_modified.year))
#file_info_last_modified_icon.texture = IconLoader.load_icon_from_name(icon)
func new_file_create(file_name : String) -> void:
text_editor.set_text("")
file_list.invalidate()
func _on_Readonly_toggled(button_pressed : bool) -> void:
if button_pressed:
file_info_read_only.set_text("Read Only")
text_editor.readonly = (true)
else:
file_info_read_only.set_text("Can Edit")
text_editor.readonly = (false)
func _on_text_editor_text_changed() -> void:
#file_info_last_modified_icon.texture = IconLoader.load_icon_from_name("saveas")
count_characters()
emit_signal("text_changed")
func count_characters() -> void:
var counted : int = 0
for line in range(text_editor.get_line_count()):
counted += text_editor.get_line(line).length()
file_info_c_counter.set_text(str(counted))
func _on_LineEdit_text_changed(new_text : String) -> void:
var linecount : int = text_editor.get_line_count()
if new_text != "":
var found : PoolIntArray
var find : bool = false
for line in range(linecount):
for column in range(text_editor.get_line(line).length()):
found = text_editor.search( new_text, search_flag, line , column )
if found.size():
if found[1] == line:
# if not find:
text_editor.select(line,found[0],found[1],found[0]+new_text.length())
# find = true
else:
text_editor.select(0,0,0,0)
else:
text_editor.select(0,0,0,0)
func _on_matchcase_toggled(button_pressed : bool) -> void:
if button_pressed:
search_flag = 1
else:
if search_box_whole_words_cb.is_pressed():
search_flag = 2
else:
search_flag = 0
_on_LineEdit_text_changed(search_box_line_edit.get_text())
func _on_wholewords_toggled(button_pressed : bool) -> void:
if button_pressed:
search_flag = 2
else:
if search_box_match_case_cb.is_pressed():
search_flag = 1
else:
search_flag = 0
_on_LineEdit_text_changed(search_box_line_edit.get_text())
func _on_close_pressed() -> void:
search_box.hide()
func open_search_box() -> void:
if search_box.visible:
search_box.hide()
else:
search_box.show()
search_box.get_node("LineEdit").grab_focus()
func _on_Button_pressed() -> void:
var linecount : int = text_editor.get_line_count()-1
var old_text : String = replace_box_replace_le.get_text()
var new_text : String = replace_box_with.get_text()
var text : String = text_editor.get_text()
text_editor.set_text(text.replace(old_text,new_text))
func open_replace_box() -> void:
if replace_box.visible:
replace_box.hide()
else:
replace_box.show()
replace_box.get_node("replace").grab_focus()
func _on_close2_pressed() -> void:
replace_box.hide()
func _on_LineEdit_focus_entered() -> void:
_on_LineEdit_text_changed(search_box_line_edit.get_text())

View File

@ -1,22 +1,20 @@
tool tool
extends EditorPlugin extends EditorPlugin
var IconLoader = preload("res://addons/file-editor/scripts/IconLoader.gd").new() var doc = preload("../scenes/FileEditor.tscn").instance()
var LastOpenedFiles = preload("res://addons/file-editor/scripts/LastOpenedFiles.gd").new() var plugin_version
var toolbar
var FileEditor var fileditorbutton
var IconLoader = preload("res://addons/file-editor/scripts/IconLoader.gd")
func _enter_tree(): func _enter_tree():
LastOpenedFiles.editor_plugin = self add_autoload_singleton("IconLoader","res://addons/file-editor/scripts/IconLoader.gd")
LastOpenedFiles.editor_settings = get_editor_interface().get_editor_settings() get_editor_interface().get_editor_viewport().add_child(doc)
doc.hide()
FileEditor = preload("res://addons/file-editor/scripts/FileEditor.gd").new()
FileEditor.LastOpenedFiles = LastOpenedFiles
get_editor_interface().get_editor_viewport().add_child(FileEditor)
FileEditor.hide()
func _exit_tree(): func _exit_tree():
get_editor_interface().get_editor_viewport().remove_child(FileEditor) get_editor_interface().get_editor_viewport().remove_child(doc)
remove_autoload_singleton("IconLoader")
func has_main_screen(): func has_main_screen():
return true return true
@ -28,4 +26,4 @@ func get_plugin_icon():
return IconLoader.load_icon_from_name("file") return IconLoader.load_icon_from_name("file")
func make_visible(visible): func make_visible(visible):
FileEditor.visible = visible doc.visible = visible

View File

@ -1,28 +0,0 @@
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters
config_version=4
[application]
config/name="fileed"
config/icon="res://icon.png"
[editor_plugins]
enabled=PoolStringArray( "res://addons/file-editor/plugin.cfg" )
[physics]
common/enable_pause_aware_picking=true
[rendering]
vram_compression/import_etc=true
vram_compression/import_etc2=false
environment/default_environment="res://default_env.tres"