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

Improve material and mesh preview buttons

This commit is contained in:
MewPurPur
2023-06-29 13:48:53 +02:00
parent a7583881af
commit 50f4c298e6
14 changed files with 123 additions and 117 deletions

View File

@@ -41,7 +41,7 @@
#include "scene/resources/material.h"
class SubViewport;
class TextureButton;
class Button;
class MeshEditor : public SubViewportContainer {
GDCLASS(MeshEditor, SubViewportContainer);
@@ -59,17 +59,16 @@ class MeshEditor : public SubViewportContainer {
Ref<Mesh> mesh;
TextureButton *light_1_switch = nullptr;
TextureButton *light_2_switch = nullptr;
Button *light_1_switch = nullptr;
Button *light_2_switch = nullptr;
struct ThemeCache {
Ref<Texture2D> light_1_on;
Ref<Texture2D> light_1_off;
Ref<Texture2D> light_2_on;
Ref<Texture2D> light_2_off;
Ref<Texture2D> light_1_icon;
Ref<Texture2D> light_2_icon;
} theme_cache;
void _button_pressed(Node *p_button);
void _on_light_1_switch_pressed();
void _on_light_2_switch_pressed();
void _update_rotation();
protected: