Skip to content

Commit

Permalink
Fixed SelectedScene in inspector
Browse files Browse the repository at this point in the history
  • Loading branch information
dinkelspiel committed Aug 2, 2023
1 parent 84267b8 commit 8d91f34
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/Debug/InspectorScene.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@ namespace Fjord.Scenes;
public class InspectorScene : Scene
{
float yOffset = 0;
public string SelectedScene = "";

public string SelectedScene {
get;
internal set;
} = "";

public void SetSelectedScene<T>()
{
SelectedScene = typeof(T).Name;
}

public InspectorScene(int width, int height) : base(width, height)
{
Expand All @@ -22,7 +31,7 @@ public override void Update()
{
if(SelectedScene == "")
{
SelectedScene = SceneHandler.Scenes.First(e => e.Key != "Inspector" && e.Key != "Console" && e.Key != "Performance").Key;
SelectedScene = SceneHandler.Scenes.First(e => e.Key != "InspectorScene" && e.Key != "ConsoleScene" && e.Key != "PerformanceScene").Key;
}

if(MouseInsideScene)
Expand Down

0 comments on commit 8d91f34

Please sign in to comment.