refonte de l'inspecteur #61

This commit is contained in:
2025-09-12 10:48:51 +02:00
parent 6687235094
commit 655b875759
16 changed files with 263 additions and 143 deletions

View File

@@ -0,0 +1,35 @@
extends Control
class_name Inspector
var info : Info = null :
set(i):
info = i
update_info(i)
func _ready():
update_info(info)
func update_info(i : Info):
if i == null:
visible = false
else :
visible = true
if i.texture:
%Texture.texture = i.texture
%Texture.visible = i.texture != null
%Title.text = i.title
%Desc.text = i.description
class Info:
var title : String
var texture: Texture
var description : String
func _init(
_title : String = "",
_description : String = "",
_texture : Texture = null,
):
title = _title
description = _description
texture = _texture