Almanach 👍
This commit is contained in:
parent
a5322daa53
commit
0a7950e17a
9 changed files with 74 additions and 79 deletions
|
|
@ -11,11 +11,12 @@ public partial class Previewport : SubViewport
|
|||
|
||||
[Export] private Label title;
|
||||
[Export] private RichTextLabel description;
|
||||
[Export] private Sprite2D _frameField;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
GetParent().GetViewport().GuiFocusChanged += OnFocusChanged;
|
||||
start_Field = GetNode<Sprite2D>("FrameField").Texture;
|
||||
start_Field = _frameField.Texture;
|
||||
}
|
||||
|
||||
public void OnFocusChanged(Control node)
|
||||
|
|
@ -36,10 +37,10 @@ public partial class Previewport : SubViewport
|
|||
}
|
||||
if (resource.customFrame != null && resource.customFrame.almanachField != null)
|
||||
{
|
||||
GetNode<Sprite2D>("FrameField").Texture = resource.customFrame.almanachField;
|
||||
_frameField.Texture = resource.customFrame.almanachField;
|
||||
}
|
||||
else
|
||||
GetNode<Sprite2D>("FrameField").Texture = start_Field;
|
||||
_frameField.Texture = start_Field;
|
||||
current_display = resource.Scene.Instantiate();
|
||||
title.Text = Tr(resource.name_key);
|
||||
description.Text = Tr(resource.description_key);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue