Added data fields sprite viewer.
This commit is contained in:
parent
ad5c666268
commit
369459ba63
|
@ -2529,9 +2529,11 @@ spriteViewerDialog_t::spriteViewerDialog_t(QWidget *parent)
|
||||||
: QDialog(parent)
|
: QDialog(parent)
|
||||||
{
|
{
|
||||||
QMenuBar *menuBar;
|
QMenuBar *menuBar;
|
||||||
QVBoxLayout *mainLayout, *vbox;
|
QVBoxLayout *mainLayout, *vbox, *vbox1;
|
||||||
QHBoxLayout *hbox, *hbox1;
|
QHBoxLayout *hbox, *hbox1;
|
||||||
QGridLayout *grid;
|
QGridLayout *infoGrid, *grid;
|
||||||
|
QGroupBox *frame;
|
||||||
|
QLabel *lbl;
|
||||||
QActionGroup *group;
|
QActionGroup *group;
|
||||||
QMenu *fileMenu, *viewMenu, *colorMenu, *optMenu, *subMenu;
|
QMenu *fileMenu, *viewMenu, *colorMenu, *optMenu, *subMenu;
|
||||||
QAction *act;
|
QAction *act;
|
||||||
|
@ -2562,6 +2564,73 @@ spriteViewerDialog_t::spriteViewerDialog_t(QWidget *parent)
|
||||||
|
|
||||||
mainLayout->addLayout( hbox1 );
|
mainLayout->addLayout( hbox1 );
|
||||||
|
|
||||||
|
vbox1 = new QVBoxLayout();
|
||||||
|
hbox1->addLayout( vbox1 );
|
||||||
|
|
||||||
|
hbox = new QHBoxLayout();
|
||||||
|
vbox1->addLayout( hbox );
|
||||||
|
|
||||||
|
useSprRam = new QRadioButton( tr("Sprite RAM") );
|
||||||
|
useCpuPag = new QRadioButton( tr("CPU Page #") );
|
||||||
|
|
||||||
|
hbox->addWidget( new QLabel( tr("Data Source:") ) );
|
||||||
|
hbox->addWidget( useSprRam );
|
||||||
|
hbox->addWidget( useCpuPag );
|
||||||
|
|
||||||
|
frame = new QGroupBox( tr("Sprite Info") );
|
||||||
|
infoGrid = new QGridLayout();
|
||||||
|
vbox1->addWidget( frame );
|
||||||
|
frame->setLayout( infoGrid );
|
||||||
|
|
||||||
|
lbl = new QLabel( tr("Sprite Index:") );
|
||||||
|
spriteIndexBox = new QLineEdit();
|
||||||
|
infoGrid->addWidget( lbl, 0, 0 );
|
||||||
|
infoGrid->addWidget( spriteIndexBox, 0, 1 );
|
||||||
|
|
||||||
|
lbl = new QLabel( tr("Tile Address:") );
|
||||||
|
tileAddrBox = new QLineEdit();
|
||||||
|
infoGrid->addWidget( lbl, 0, 2 );
|
||||||
|
infoGrid->addWidget( tileAddrBox, 0, 3 );
|
||||||
|
|
||||||
|
lbl = new QLabel( tr("Tile Index:") );
|
||||||
|
tileIndexBox = new QLineEdit();
|
||||||
|
infoGrid->addWidget( lbl, 1, 0 );
|
||||||
|
infoGrid->addWidget( tileIndexBox, 1, 1 );
|
||||||
|
|
||||||
|
lbl = new QLabel( tr("Palette Address:") );
|
||||||
|
palAddrBox = new QLineEdit();
|
||||||
|
infoGrid->addWidget( lbl, 1, 2 );
|
||||||
|
infoGrid->addWidget( palAddrBox, 1, 3 );
|
||||||
|
|
||||||
|
lbl = new QLabel( tr("Tile:") );
|
||||||
|
//tileIndexBox = new QLineEdit();
|
||||||
|
infoGrid->addWidget( lbl, 2, 0, 5, 1, Qt::AlignTop );
|
||||||
|
//infoGrid->addWidget( tileIndexBox, 2, 1 );
|
||||||
|
|
||||||
|
lbl = new QLabel( tr("Palette:") );
|
||||||
|
//tileIndexBox = new QLineEdit();
|
||||||
|
infoGrid->addWidget( lbl, 2, 2, Qt::AlignTop );
|
||||||
|
//infoGrid->addWidget( tileIndexBox, 2, 1 );
|
||||||
|
|
||||||
|
lbl = new QLabel( tr("Position (X,Y):") );
|
||||||
|
//tileIndexBox = new QLineEdit();
|
||||||
|
infoGrid->addWidget( lbl, 3, 2, Qt::AlignTop );
|
||||||
|
//infoGrid->addWidget( tileIndexBox, 2, 1 );
|
||||||
|
|
||||||
|
hFlipBox = new QCheckBox( tr("Horizontal Flip") );
|
||||||
|
infoGrid->addWidget( hFlipBox, 4, 2, 1, 2 );
|
||||||
|
|
||||||
|
vFlipBox = new QCheckBox( tr("Vertical Flip") );
|
||||||
|
infoGrid->addWidget( vFlipBox, 5, 2, 1, 2 );
|
||||||
|
|
||||||
|
bgPrioBox = new QCheckBox( tr("Background Priority") );
|
||||||
|
infoGrid->addWidget( bgPrioBox, 6, 2, 1, 2 );
|
||||||
|
|
||||||
|
lbl = new QLabel( tr("Preview:") );
|
||||||
|
//tileIndexBox = new QLineEdit();
|
||||||
|
infoGrid->addWidget( lbl, 7, 0 );
|
||||||
|
//infoGrid->addWidget( tileIndexBox, 2, 1 );
|
||||||
|
|
||||||
updateTimer = new QTimer( this );
|
updateTimer = new QTimer( this );
|
||||||
|
|
||||||
connect( updateTimer, &QTimer::timeout, this, &spriteViewerDialog_t::periodicUpdate );
|
connect( updateTimer, &QTimer::timeout, this, &spriteViewerDialog_t::periodicUpdate );
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
|
#include <QRadioButton>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QFrame>
|
#include <QFrame>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
@ -356,6 +357,15 @@ class spriteViewerDialog_t : public QDialog
|
||||||
void closeEvent(QCloseEvent *bar);
|
void closeEvent(QCloseEvent *bar);
|
||||||
private:
|
private:
|
||||||
QTimer *updateTimer;
|
QTimer *updateTimer;
|
||||||
|
QRadioButton *useSprRam;
|
||||||
|
QRadioButton *useCpuPag;
|
||||||
|
QLineEdit *spriteIndexBox;
|
||||||
|
QLineEdit *tileIndexBox;
|
||||||
|
QLineEdit *tileAddrBox;
|
||||||
|
QLineEdit *palAddrBox;
|
||||||
|
QCheckBox *hFlipBox;
|
||||||
|
QCheckBox *vFlipBox;
|
||||||
|
QCheckBox *bgPrioBox;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void closeWindow(void);
|
void closeWindow(void);
|
||||||
|
|
Loading…
Reference in New Issue