//void HideAll() //{ // WaitTextureBox.Visible = FocusTextureBox.Visible = DownTextureBox.Visible = UpTextureBox.Visible = false; //} ///// <summary> ///// 转换到等待状态 ///// </summary> //public void Wait() //{ // HideAll(); // WaitTextureBox.Visible = true; //} ///// <summary> ///// 转换到选中状态 ///// </summary> //public void Focus() //{ // HideAll(); // FocusTextureBox.Visible = true; //} ///// <summary> ///// 转换到按下状态 ///// </summary> //public void Down() //{ // HideAll(); // DownTextureBox.Visible = true; //} ///// <summary> ///// 转换到抬起状态 ///// </summary> //public void Up() //{ // HideAll(); // UpTextureBox.Visible = true; //} public ButtonBox(Game g) : base(g) { WaitTextureBox = new TextureBox(g); UpTextureBox = new TextureBox(g); DownTextureBox = new TextureBox(g); FocusTextureBox = new TextureBox(g); WaitTextBox = new TextBox(g); UpTextBox = new TextBox(g); DownTextBox = new TextBox(g); FocusTextBox = new TextBox(g); OnButtonWait = new ButtonBoxEvent(OnButtonWaitCode); OnButtonFocus = new ButtonBoxEvent(OnButtonFocusCode); OnButtonDown = new ButtonBoxEvent(OnButtonDownCode); OnButtonUp = new ButtonBoxEvent(OnButtonUpCode); Visible = true; }