mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-04-05 22:35:38 +00:00
PowerControl: Move Menu.cs into Menu/
This commit is contained in:
parent
c2ea59d253
commit
bbc4cf8200
5 changed files with 476 additions and 480 deletions
38
PowerControl/Menu/MenuItem.cs
Normal file
38
PowerControl/Menu/MenuItem.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
namespace PowerControl.Menu
|
||||
{
|
||||
public abstract class MenuItem
|
||||
{
|
||||
public static readonly String[] Helpers =
|
||||
{
|
||||
"<C0=008040><C1=0080C0><C2=C08080><C3=FF0000><C4=FFFFFF><C250=FF8000>",
|
||||
"<A0=-4><A1=5><A2=-2><A5=-5><S0=-50><S1=50>",
|
||||
};
|
||||
|
||||
public enum Colors : int
|
||||
{
|
||||
Green,
|
||||
Blue,
|
||||
Redish,
|
||||
Red,
|
||||
White
|
||||
}
|
||||
|
||||
public String Name { get; set; }
|
||||
public bool Visible { get; set; } = true;
|
||||
public bool Selectable { get; set; }
|
||||
|
||||
protected string Color(String text, Colors index)
|
||||
{
|
||||
return String.Format("<C{1}>{0}<C>", text, (int)index);
|
||||
}
|
||||
|
||||
public abstract string Render(MenuItem selected);
|
||||
|
||||
public abstract void CreateMenu(ToolStripItemCollection collection);
|
||||
public abstract void Update();
|
||||
public abstract void Reset();
|
||||
|
||||
public abstract void SelectNext();
|
||||
public abstract void SelectPrev();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue