public void Select() { CheatSheet.instance.paintToolsUI.infoPanel.Visible = false; CheatSheet.instance.paintToolsUI.submitPanel.Visible = false; CheatSheet.instance.paintToolsUI.submitInput.Text = ""; if (CurrentSelect != null) { CurrentSelect.isSelect = false; } if (CurrentSelect == this) { CurrentSelect = null; CheatSheet.instance.paintToolsHotbar.StampTiles = new Tile[0, 0]; CheatSheet.instance.paintToolsHotbar.stampInfo = null; } else { isSelect = true; CurrentSelect = this; CheatSheet.instance.paintToolsHotbar.StampTiles = stampInfo.Tiles; CheatSheet.instance.paintToolsHotbar.stampInfo = stampInfo; // Update UI; if (CurrentSelect.browserID > 0) { CheatSheet.instance.paintToolsUI.infoPanel.Visible = true; CheatSheet.instance.paintToolsUI.infoMessage.Text = browserName + ": " + rating; CheatSheet.instance.paintToolsUI.upVoteButton.ForegroundColor = Color.White; CheatSheet.instance.paintToolsUI.downVoteButton.ForegroundColor = Color.White; if (CurrentSelect.vote == 1) { CheatSheet.instance.paintToolsUI.upVoteButton.ForegroundColor = Color.Gray; } if (CurrentSelect.vote == -1) { CheatSheet.instance.paintToolsUI.downVoteButton.ForegroundColor = Color.Gray; } } else if (CurrentSelect.browserID == 0) { CheatSheet.instance.paintToolsUI.submitPanel.Visible = true; } } }
public void ReorderSlots() { base.ScrollPosition = 0f; base.ClearContent(); for (int i = 0; i < slotList.Count; i++) { int num = i; PaintToolsSlot slot = this.slotList[num]; int num2 = i % this.slotColumns; int num3 = i / this.slotColumns; float x = (float)this.slotSpace + (float)num2 * (slot.Width + (float)this.slotSpace); float y = (float)this.slotSpace + (float)num3 * (slot.Height + (float)this.slotSpace); slot.Position = new Vector2(x, y); slot.Offset = Vector2.Zero; this.AddChild(slot); } base.ContentHeight = base.GetLastChild().Y + base.GetLastChild().Height + this.spacing; }
public void Select() { if (CurrentSelect != null) { CurrentSelect.isSelect = false; } if (CurrentSelect == this) { CurrentSelect = null; CheatSheet.instance.paintToolsHotbar.StampTiles = new Tile[0, 0]; CheatSheet.instance.paintToolsHotbar.stampInfo = null; } else { isSelect = true; CurrentSelect = this; CheatSheet.instance.paintToolsHotbar.StampTiles = stampInfo.Tiles; CheatSheet.instance.paintToolsHotbar.stampInfo = stampInfo; } }
public void Add(PaintToolsSlot slot) { slotList.Insert(0, slot); slot.Select(); ReorderSlots(); }
public void AddEndDontSelect(PaintToolsSlot slot) { slotList.Add(slot); //slot.Select(); ReorderSlots(); }