private void DrawKeyOption(int idx, string value, string propertyName, SpriteBatch b) { var setButtonSizeX = 21 * Game1.pixelZoom; var setButtonSizeY = 11 * Game1.pixelZoom; var xPos = this.xPositionOnScreen + this.width - (2 * BorderWidth) - setButtonSizeX; var yPos = this.yPositionOnScreen + BorderWidth + (idx * OptionHeight) + (OptionHeight / 2) - (setButtonSizeY / 2); var src = new Rectangle(294, 428, 21, 11); var setButton = new ClickableTextureComponent(propertyName, new Rectangle(xPos, yPos, setButtonSizeX, setButtonSizeY), "", "", Game1.mouseCursors, src, Game1.pixelZoom, true); SetButtons.Add(setButton); setButton.draw(b); }
void Awake() { m_setButtons = GetComponent<SetButtons>(); m_window = GetComponent<ZinWindow>(); }