UI Changes
This commit is contained in:
89
Scripts/CharacterSelectUpdateService.cs
Normal file
89
Scripts/CharacterSelectUpdateService.cs
Normal file
@@ -0,0 +1,89 @@
|
||||
using Godot;
|
||||
using System.Linq;
|
||||
|
||||
public partial class CharacterSelectUpdateService : Control
|
||||
{
|
||||
public override void _Ready()
|
||||
{
|
||||
base._Ready();
|
||||
}
|
||||
public void OnCapricornP1Selected()
|
||||
{
|
||||
var allPortraits = GetNode<Control>("P1").GetChildren().OfType<TextureRect>();
|
||||
foreach (var bg in allPortraits)
|
||||
bg.Hide();
|
||||
|
||||
var node = GetNode<TextureRect>("P1/CapBG");
|
||||
node.Show();
|
||||
}
|
||||
|
||||
public void OnPiscesP1Selected()
|
||||
{
|
||||
var allPortraits = GetNode<Control>("P1").GetChildren().OfType<TextureRect>();
|
||||
foreach (var bg in allPortraits)
|
||||
bg.Hide();
|
||||
|
||||
var node = GetNode<TextureRect>("P1/PiscesBG");
|
||||
node.Show();
|
||||
}
|
||||
|
||||
public void OnSagP1Selected()
|
||||
{
|
||||
var allPortraits = GetNode<Control>("P1").GetChildren().OfType<TextureRect>();
|
||||
foreach (var bg in allPortraits)
|
||||
bg.Hide();
|
||||
|
||||
var node = GetNode<TextureRect>("P1/SagBG");
|
||||
node.Show();
|
||||
}
|
||||
|
||||
public void OnScorpioP1Selected()
|
||||
{
|
||||
var allPortraits = GetNode<Control>("P1").GetChildren().OfType<TextureRect>();
|
||||
foreach (var bg in allPortraits)
|
||||
bg.Hide();
|
||||
|
||||
var node = GetNode<TextureRect>("P1/ScorpioBG");
|
||||
node.Show();
|
||||
}
|
||||
|
||||
public void OnCapricornP2Selected()
|
||||
{
|
||||
var allPortraits = GetNode<Control>("P2").GetChildren().OfType<TextureRect>();
|
||||
foreach (var bg in allPortraits)
|
||||
bg.Hide();
|
||||
|
||||
var node = GetNode<TextureRect>("P2/CapBG");
|
||||
node.Show();
|
||||
}
|
||||
|
||||
public void OnPiscesP2Selected()
|
||||
{
|
||||
var allPortraits = GetNode<Control>("P2").GetChildren().OfType<TextureRect>();
|
||||
foreach (var bg in allPortraits)
|
||||
bg.Hide();
|
||||
|
||||
var node = GetNode<TextureRect>("P2/PiscesBG");
|
||||
node.Show();
|
||||
}
|
||||
|
||||
public void OnSagP2Selected()
|
||||
{
|
||||
var allPortraits = GetNode<Control>("P2").GetChildren().OfType<TextureRect>();
|
||||
foreach (var bg in allPortraits)
|
||||
bg.Hide();
|
||||
|
||||
var node = GetNode<TextureRect>("P2/SagBG");
|
||||
node.Show();
|
||||
}
|
||||
|
||||
public void OnScorpioP2Selected()
|
||||
{
|
||||
var allPortraits = GetNode<Control>("P2").GetChildren().OfType<TextureRect>();
|
||||
foreach (var bg in allPortraits)
|
||||
bg.Hide();
|
||||
|
||||
var node = GetNode<TextureRect>("P2/ScorpioBG");
|
||||
node.Show();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user