// Update is called once per frame void OnGUI() { if (isActive) { if (counter == 0) { Play play = GameInit.playButton; float y = XCI.GetAxis(XboxAxis.LeftStickY, playerNum); if (y < -0.4) { if (selected == CurElement.L) { selected = CurElement.R; left.selected = false; right.selected = true; right.background.color = new Color(right.background.color.r + modifier, right.background.color.g + modifier, right.background.color.b + modifier); left.background.color = new Color(left.background.color.r - modifier, left.background.color.g - modifier, left.background.color.b - modifier); // right.background.color.r = right.background.color.r + 10; counter = time; } else if (selected == CurElement.R) { selected = CurElement.P; play.select[playerNum - 1] = true; right.selected = false; right.background.color = new Color(right.background.color.r - modifier, right.background.color.g - modifier, right.background.color.b - modifier); counter = time; } } else if (y > 0.4) { if (selected == CurElement.R) { selected = CurElement.L; right.selected = false; left.selected = true; left.background.color = new Color(left.background.color.r + modifier, left.background.color.g + modifier, left.background.color.b + modifier); right.background.color = new Color(right.background.color.r - modifier, right.background.color.g - modifier, right.background.color.b - modifier); counter = time; } else if (selected == CurElement.P) { selected = CurElement.R; play.select[playerNum - 1] = false; right.selected = true; right.background.color = new Color(right.background.color.r + modifier, right.background.color.g + modifier, right.background.color.b + modifier); counter = time; } } } else { counter--; } } }
public WorkSpace() { Undo = new UndoData(); Curent = new CurElement(); Add(new SmartFiled("Раздел1")); Add(new SmartFiled("Раздел2")); Add(new SmartFiled("Раздел3")); ActiveField = this[0]; iconGroupGroup = IconRepo.CoreGroup; }