Added a close window button to the Qt game genie window.

This commit is contained in:
mjbudd77 2021-02-21 18:29:09 -05:00
parent 0bff7b7608
commit 9175eabf76
1 changed files with 11 additions and 0 deletions

View File

@ -102,6 +102,7 @@ GameGenieDialog_t::GameGenieDialog_t(QWidget *parent)
QTreeWidgetItem *item; QTreeWidgetItem *item;
QGroupBox *frame; QGroupBox *frame;
QFont font; QFont font;
QPushButton *closeButton;
fceuGGCodeValidtor *ggCodeValidator; fceuGGCodeValidtor *ggCodeValidator;
font.setFamily("Courier New"); font.setFamily("Courier New");
@ -173,6 +174,16 @@ GameGenieDialog_t::GameGenieDialog_t(QWidget *parent)
mainLayout->addWidget( tree ); mainLayout->addWidget( tree );
closeButton = new QPushButton( tr("Close") );
closeButton->setIcon(style()->standardIcon(QStyle::SP_DialogCloseButton));
connect(closeButton, SIGNAL(clicked(void)), this, SLOT(closeWindow(void)));
hbox = new QHBoxLayout();
hbox->addStretch(5);
hbox->addWidget( closeButton, 1 );
mainLayout->addLayout( hbox );
setLayout( mainLayout ); setLayout( mainLayout );
addrValidator = new fceuHexIntValidtor( 0, 0xFFFF, this ); addrValidator = new fceuHexIntValidtor( 0, 0xFFFF, this );