aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Frontend/GUI
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-07-13 08:40:47 -0400
committerMichael <[email protected]>2017-07-13 08:40:47 -0400
commite92af1bc7fe5cd5860206061f4ff261b3339cc51 (patch)
tree14b571e2495731d7302b61c56d18ae5e4988587e /ShiftOS.Frontend/GUI
parentaf01804c0fb4286f5975e973aec2b4eaf9752c08 (diff)
downloadshiftos_thereturn-e92af1bc7fe5cd5860206061f4ff261b3339cc51.tar.gz
shiftos_thereturn-e92af1bc7fe5cd5860206061f4ff261b3339cc51.tar.bz2
shiftos_thereturn-e92af1bc7fe5cd5860206061f4ff261b3339cc51.zip
SidePanel system, system status, crapton of other neat things
Diffstat (limited to 'ShiftOS.Frontend/GUI')
-rw-r--r--ShiftOS.Frontend/GUI/Control.cs13
-rw-r--r--ShiftOS.Frontend/GUI/ListBox.cs8
2 files changed, 17 insertions, 4 deletions
diff --git a/ShiftOS.Frontend/GUI/Control.cs b/ShiftOS.Frontend/GUI/Control.cs
index c16792b..f253903 100644
--- a/ShiftOS.Frontend/GUI/Control.cs
+++ b/ShiftOS.Frontend/GUI/Control.cs
@@ -38,6 +38,19 @@ namespace ShiftOS.Frontend.GUI
private int _mouseY = 0;
private bool _captureMouse = false;
+ public void BringToFront()
+ {
+ if(_parent != null)
+ {
+ _parent._children.Remove(this);
+ _parent.AddControl(this);
+ }
+ else
+ {
+ UIManager.BringToFront(this);
+ }
+ }
+
public bool RequiresPaint
{
get
diff --git a/ShiftOS.Frontend/GUI/ListBox.cs b/ShiftOS.Frontend/GUI/ListBox.cs
index f9354e0..29d3712 100644
--- a/ShiftOS.Frontend/GUI/ListBox.cs
+++ b/ShiftOS.Frontend/GUI/ListBox.cs
@@ -135,13 +135,13 @@ namespace ShiftOS.Frontend.GUI
if(i == selectedIndex)
{
//draw the string as selected
- gfx.DrawRectangle(x, y, width, height, UIManager.SkinTextures["ControlTextColor"]);
- gfx.DrawString(items[i].ToString(), x, y, LoadedSkin.ControlColor.ToMonoColor(), LoadedSkin.MainFont);
+ gfx.DrawRectangle(x, y+2, width, height, UIManager.SkinTextures["ControlTextColor"]);
+ gfx.DrawString(items[i].ToString(), x, y+2, LoadedSkin.ControlColor.ToMonoColor(), LoadedSkin.MainFont);
}
else
{
- gfx.DrawRectangle(x, y, width, height, UIManager.SkinTextures["ControlColor"]);
- gfx.DrawString(items[i].ToString(), x, y, LoadedSkin.ControlTextColor.ToMonoColor(), LoadedSkin.MainFont);
+ gfx.DrawRectangle(x, y+2, width, height, UIManager.SkinTextures["ControlColor"]);
+ gfx.DrawString(items[i].ToString(), x, y+2, LoadedSkin.ControlTextColor.ToMonoColor(), LoadedSkin.MainFont);
}
}