Add a few more tabs (not complete.)

This commit is contained in:
Unknown W. Brackets 2013-09-30 01:13:06 -07:00
parent 37d94b041e
commit d0abc03be4
4 changed files with 54 additions and 2 deletions

View File

@ -134,8 +134,16 @@ CGEDebugger::CGEDebugger(HINSTANCE _hInstance, HWND _hParent)
flags = new TabStateFlags(_hInstance, m_hDlg);
tabs->AddTabDialog(flags, L"Flags");
lists = new TabDisplayLists(_hInstance,m_hDlg);
tabs->AddTabDialog(lists,L"Lists");
lighting = new TabStateLighting(_hInstance, m_hDlg);
tabs->AddTabDialog(lighting, L"Lighting");
settings = new TabStateSettings(_hInstance, m_hDlg);
tabs->AddTabDialog(settings, L"Settings");
lists = new TabDisplayLists(_hInstance, m_hDlg);
tabs->AddTabDialog(lists, L"Lists");
tabs->ShowTab(0, true);
// set window position
int x = g_Config.iGEWindowX == -1 ? windowRect.left : g_Config.iGEWindowX;
@ -150,6 +158,8 @@ CGEDebugger::~CGEDebugger() {
delete texWindow;
delete flags;
delete lighting;
delete settings;
delete lists;
delete tabs;
}
@ -200,6 +210,8 @@ void CGEDebugger::UpdatePreviews() {
}
flags->Update();
lighting->Update();
settings->Update();
lists->Update();
}

View File

@ -33,6 +33,8 @@ enum {
class CtrlDisplayListView;
class TabDisplayLists;
class TabStateFlags;
class TabStateLighting;
class TabStateSettings;
class CGEDebugger : public Dialog {
public:
@ -52,6 +54,8 @@ private:
CtrlDisplayListView *displayList;
TabDisplayLists *lists;
TabStateFlags *flags;
TabStateLighting *lighting;
TabStateSettings *settings;
SimpleGLWindow *frameWindow;
SimpleGLWindow *texWindow;
TabControl *tabs;

View File

@ -35,6 +35,7 @@ struct TabStateRow {
const TCHAR *title;
u8 cmd;
u8 enableCmd;
// TODO: Format type?
};
static const TabStateRow stateFlagsRows[] = {
@ -58,6 +59,23 @@ static const TabStateRow stateFlagsRows[] = {
{ L"Logic Op Enable", GE_CMD_LOGICOPENABLE },
};
static const TabStateRow stateLightingRows[] = {
{ L"Light mode", GE_CMD_LIGHTMODE, GE_CMD_LIGHTINGENABLE },
{ L"Light type 0", GE_CMD_LIGHTTYPE0, GE_CMD_LIGHTENABLE0 },
{ L"Light type 1", GE_CMD_LIGHTTYPE1, GE_CMD_LIGHTENABLE1 },
{ L"Light type 2", GE_CMD_LIGHTTYPE2, GE_CMD_LIGHTENABLE2 },
{ L"Light type 3", GE_CMD_LIGHTTYPE3, GE_CMD_LIGHTENABLE3 },
// TODO: Others...
};
static const TabStateRow stateSettingsRows[] = {
{ L"Region TL", GE_CMD_REGION1 },
{ L"Region BR", GE_CMD_REGION2 },
// TODO: Right place?
{ L"Morph Weight 0", GE_CMD_MORPHWEIGHT0 },
// TODO: Others...
};
CtrlStateValues::CtrlStateValues(const TabStateRow *rows, int rowCount, HWND hwnd)
: GenericListControl(hwnd, stateValuesCols, ARRAY_SIZE(stateValuesCols)),
rows_(rows), rowCount_(rowCount) {
@ -145,3 +163,11 @@ BOOL TabStateValues::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) {
TabStateFlags::TabStateFlags(HINSTANCE _hInstance, HWND _hParent)
: TabStateValues(stateFlagsRows, ARRAY_SIZE(stateFlagsRows), (LPCSTR)IDD_GEDBG_TAB_VALUES, _hInstance, _hParent) {
}
TabStateLighting::TabStateLighting(HINSTANCE _hInstance, HWND _hParent)
: TabStateValues(stateLightingRows, ARRAY_SIZE(stateLightingRows), (LPCSTR)IDD_GEDBG_TAB_VALUES, _hInstance, _hParent) {
}
TabStateSettings::TabStateSettings(HINSTANCE _hInstance, HWND _hParent)
: TabStateValues(stateSettingsRows, ARRAY_SIZE(stateSettingsRows), (LPCSTR)IDD_GEDBG_TAB_VALUES, _hInstance, _hParent) {
}

View File

@ -57,4 +57,14 @@ private:
class TabStateFlags : public TabStateValues {
public:
TabStateFlags(HINSTANCE _hInstance, HWND _hParent);
};
class TabStateLighting : public TabStateValues {
public:
TabStateLighting(HINSTANCE _hInstance, HWND _hParent);
};
class TabStateSettings : public TabStateValues {
public:
TabStateSettings(HINSTANCE _hInstance, HWND _hParent);
};