1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Improve the editor native shader source visualizer

- Use CodeEdit to enable features such as line numbers and minimap.
- Enable syntax highlighting.
- Use a fixed-width font.
- Use the script editor settings.
This commit is contained in:
Hugo Locurcio
2021-05-16 01:36:01 +02:00
parent fe01776f05
commit 44de95e18f
3 changed files with 94 additions and 8 deletions

View File

@@ -33,11 +33,14 @@
#include "scene/gui/dialogs.h"
#include "scene/gui/tab_container.h"
#include "scene/resources/syntax_highlighter.h"
class EditorNativeShaderSourceVisualizer : public AcceptDialog {
GDCLASS(EditorNativeShaderSourceVisualizer, AcceptDialog)
TabContainer *versions = nullptr;
Ref<CodeHighlighter> syntax_highlighter;
void _load_theme_settings();
void _inspect_shader(RID p_shader);
protected: