From 51c89930bf6f4a165c3ad60f09d05099733a49a7 Mon Sep 17 00:00:00 2001 From: stephena Date: Thu, 11 Aug 2005 21:57:30 +0000 Subject: [PATCH] Fixed Compare button in RamWidget. Changes highlighting of searched RAM from a framed rectangle to coloring the cell text. Removed CheatWidget, since its entire functionality is now handled by RamWidget buttons. Next up is the TIA tab (I really hate having to touch that one ...) git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@717 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- stella/src/debugger/CheatWidget.cxx | 343 ---------------------------- stella/src/debugger/CheatWidget.hxx | 76 ------ stella/src/debugger/RamWidget.cxx | 58 +++-- stella/src/debugger/RamWidget.hxx | 6 +- stella/src/debugger/module.mk | 1 - stella/src/emucore/FrameBuffer.cxx | 4 +- stella/src/gui/AboutDialog.cxx | 4 +- stella/src/gui/DataGridWidget.cxx | 22 +- stella/src/gui/DebuggerDialog.cxx | 13 +- stella/src/gui/GameInfoDialog.cxx | 4 +- stella/src/gui/HelpDialog.cxx | 4 +- 11 files changed, 55 insertions(+), 480 deletions(-) delete mode 100644 stella/src/debugger/CheatWidget.cxx delete mode 100644 stella/src/debugger/CheatWidget.hxx diff --git a/stella/src/debugger/CheatWidget.cxx b/stella/src/debugger/CheatWidget.cxx deleted file mode 100644 index ab3559484..000000000 --- a/stella/src/debugger/CheatWidget.cxx +++ /dev/null @@ -1,343 +0,0 @@ -//============================================================================ -// -// SSSS tt lll lll -// SS SS tt ll ll -// SS tttttt eeee ll ll aaaa -// SSSS tt ee ee ll ll aa -// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator" -// SS SS tt ee ll ll aa aa -// SSSS ttt eeeee llll llll aaaaa -// -// Copyright (c) 1995-2005 by Bradford W. Mott and the Stella team -// -// See the file "license" for information on usage and redistribution of -// this file, and for a DISCLAIMER OF ALL WARRANTIES. -// -// $Id: CheatWidget.cxx,v 1.4 2005-08-11 19:12:38 stephena Exp $ -// -// Based on code from ScummVM - Scumm Interpreter -// Copyright (C) 2002-2004 The ScummVM project -//============================================================================ - -#include - -#include "OSystem.hxx" -#include "FrameBuffer.hxx" -#include "GuiUtils.hxx" -#include "GuiObject.hxx" -#include "RamDebug.hxx" -#include "Widget.hxx" -#include "EditNumWidget.hxx" -#include "AddrValueWidget.hxx" -#include "InputTextDialog.hxx" - -#include "CheatWidget.hxx" - -enum { - kSearchCmd = 'CSEA', - kCmpCmd = 'CCMP', - kRestartCmd = 'CRST', - kSValEntered = 'CSVE', - kCValEntered = 'CCVE' -}; - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -CheatWidget::CheatWidget(GuiObject* boss, int x, int y, int w, int h) - : Widget(boss, x, y, w, h), - CommandSender(boss), - myInputBox(NULL) -{ - const int border = 20; - const int bwidth = 50; - const int charWidth = instance()->consoleFont().getMaxCharWidth(); - const int charHeight = instance()->consoleFont().getFontHeight() + 2; - int xpos = x + border; - int ypos = y + border; - - // Add the numedit label and box - new StaticTextWidget(boss, xpos, ypos, 70, kLineHeight, - "Enter a value:", kTextAlignLeft); - - myEditBox = new EditNumWidget(boss, 90, ypos - 2, charWidth*10, charHeight, ""); - myEditBox->setFont(instance()->consoleFont()); -// myEditBox->setTarget(this); - addFocusWidget(myEditBox); - ypos += border; - - // Add the result text string area - myResult = new StaticTextWidget(boss, border + 5, ypos, 175, kLineHeight, - "", kTextAlignLeft); - myResult->setColor(kTextColorEm); - - // Add the three search-related buttons - xpos = x + border; - ypos += border * 2; - mySearchButton = new ButtonWidget(boss, xpos, ypos, bwidth, 16, - "Search", kSearchCmd, 0); - mySearchButton->setTarget(this); - xpos += 8 + bwidth; - - myCompareButton = new ButtonWidget(boss, xpos, ypos, bwidth, 16, - "Compare", kCmpCmd, 0); - myCompareButton->setTarget(this); - xpos += 8 + bwidth; - - myRestartButton = new ButtonWidget(boss, xpos, ypos, bwidth, 16, - "Restart", kRestartCmd, 0); - myRestartButton->setTarget(this); - - // Add the list showing the results of a search/compare - xpos = 200; ypos = border/2; - new StaticTextWidget(boss, xpos + 5, ypos, 75, kLineHeight, - "Address Value", kTextAlignLeft); - ypos += kLineHeight; - - myResultsList = new AddrValueWidget(boss, xpos, ypos, 100, 75, 0xff); - myResultsList->setFont(instance()->consoleFont()); - myResultsList->setTarget(this); - addFocusWidget(myResultsList); - - myInputBox = new InputTextDialog(boss, instance()->consoleFont(), 20, 20); - myInputBox->setTarget(this); -} - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -CheatWidget::~CheatWidget() -{ - mySearchArray.clear(); - myCompareArray.clear(); - - delete myInputBox; -} - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void CheatWidget::handleCommand(CommandSender* sender, int cmd, int data, int id) -{ - switch(cmd) - { - case kSearchCmd: - myInputBox->setEditString(""); - myInputBox->setTitle(""); - myInputBox->setEmitSignal(kSValEntered); - parent()->addDialog(myInputBox); - break; - - case kCmpCmd: - myInputBox->setEditString(""); - myInputBox->setTitle(""); - myInputBox->setEmitSignal(kCValEntered); - parent()->addDialog(myInputBox); - break; - - case kRestartCmd: - doRestart(); - break; - - case kSValEntered: - { - const string& result = doSearch(myInputBox->getResult()); - if(result != "") - myInputBox->setTitle(result); - else - parent()->removeDialog(); - break; - } - - case kCValEntered: - { - const string& result = doCompare(myInputBox->getResult()); - if(result != "") - myInputBox->setTitle(result); - else - parent()->removeDialog(); - break; - } - - case kAVItemDataChangedCmd: - int addr = myResultsList->getSelectedAddr() - kRamStart; - int value = myResultsList->getSelectedValue(); - instance()->debugger().ramDebug().write(addr, value); - break; - } -} - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -const string CheatWidget::doSearch(const string& str) -{ - bool comparisonSearch = true; - - if(str.length() == 0) - { - // An empty field means return all memory locations - comparisonSearch = false; - } - else if(str.find_first_of("+-", 0) != string::npos) - { - // Don't accept these characters here, only in compare - return "Invalid input +|-"; - } - - int searchVal = instance()->debugger().stringToValue(str); - - // Clear the search array of previous items - mySearchArray.clear(); - - // Now, search all memory locations for this value, and add it to the - // search array - RamDebug& dbg = instance()->debugger().ramDebug(); - AddrValue av; - int searchCount = 0; - for(int addr = 0; addr < kRamSize; ++addr) - { - if(comparisonSearch) - { - av.addr = addr; - av.value = searchVal; - - if(dbg.read(av.addr) == av.value) - { - mySearchArray.push_back(av); - ++searchCount; - } - } - else // match all memory locations - { - av.addr = addr; - av.value = dbg.read(av.addr); - mySearchArray.push_back(av); - ++searchCount; - } - } - - // If we have some hits, enable the comparison methods - if(searchCount) - { - mySearchButton->setEnabled(false); - myCompareButton->setEnabled(true); - myRestartButton->setEnabled(true); - } - - // Show number of hits - ostringstream buf; - buf << "Search found " << searchCount << " result(s)"; - myResult->setLabel(buf.str()); - - // Finally, show the search results in the list - fillResultsList(); - - return ""; -} - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -const string CheatWidget::doCompare(const string& str) -{ - bool comparitiveSearch = false; - int searchVal = 0; - - if(str.length() == 0) - return "Enter an absolute or comparitive value"; - - // Do some pre-processing on the string - string::size_type pos = str.find_first_of("+-", 0); - if(pos > 0 && pos != string::npos) - { - // Only accept '+' or '-' at the start of the string - return "Input must be [+|-]NUM"; - } - - if(str[0] == '+' || str[0] == '-') - { - bool negative = false; - if(str[0] == '-') - negative = true; - - string tmp = str; - tmp.erase(0, 1); // remove the operator - searchVal = instance()->debugger().stringToValue(tmp); - if(negative) - searchVal = -searchVal; - - comparitiveSearch = true; - } - else - searchVal = instance()->debugger().stringToValue(str); - - AddrValueList tempList; - - // Now, search all memory locations specified in mySearchArray for this value - RamDebug& dbg = instance()->debugger().ramDebug(); - AddrValue av; - int searchCount = 0; - - // A comparitive search searches memory for locations that have changed by - // the specified amount, vs. for exact values - for(unsigned int i = 0; i < mySearchArray.size(); i++) - { - av.addr = mySearchArray[i].addr; - if(comparitiveSearch) - { - int temp = mySearchArray[i].value + searchVal; - if(temp < 0 || temp > 255) // skip values which are out of range - continue; - av.value = temp; - } - else - av.value = searchVal; - - if(dbg.read(av.addr) == av.value) - { - tempList.push_back(av); - ++searchCount; - } - } - - // Update the searchArray to the new results - mySearchArray = tempList; - - // If we have some hits, enable the comparison methods - if(searchCount) - { - myCompareButton->setEnabled(true); - myRestartButton->setEnabled(true); - } - - // Show number of hits - ostringstream buf; - buf << "Compare found " << searchCount << " result(s)"; - myResult->setLabel(buf.str()); - - // Finally, show the search results in the list - fillResultsList(); - - return ""; -} - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void CheatWidget::doRestart() -{ - // Erase all search buffers, reset to start mode - mySearchArray.clear(); - myCompareArray.clear(); - myEditBox->setEditString(""); - myResult->setLabel(""); - fillResultsList(); - - mySearchButton->setEnabled(true); - myCompareButton->setEnabled(false); - myRestartButton->setEnabled(false); -} - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void CheatWidget::fillResultsList() -{ - AddrList alist; - ValueList vlist; - - for(unsigned int i = 0; i < mySearchArray.size(); i++) - { - alist.push_back(kRamStart + mySearchArray[i].addr); - vlist.push_back(mySearchArray[i].value); - } - - myResultsList->setList(alist, vlist); -} diff --git a/stella/src/debugger/CheatWidget.hxx b/stella/src/debugger/CheatWidget.hxx deleted file mode 100644 index cc729be84..000000000 --- a/stella/src/debugger/CheatWidget.hxx +++ /dev/null @@ -1,76 +0,0 @@ -//============================================================================ -// -// SSSS tt lll lll -// SS SS tt ll ll -// SS tttttt eeee ll ll aaaa -// SSSS tt ee ee ll ll aa -// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator" -// SS SS tt ee ll ll aa aa -// SSSS ttt eeeee llll llll aaaaa -// -// Copyright (c) 1995-2005 by Bradford W. Mott and the Stella team -// -// See the file "license" for information on usage and redistribution of -// this file, and for a DISCLAIMER OF ALL WARRANTIES. -// -// $Id: CheatWidget.hxx,v 1.3 2005-08-10 12:23:42 stephena Exp $ -// -// Based on code from ScummVM - Scumm Interpreter -// Copyright (C) 2002-2004 The ScummVM project -//============================================================================ - -#ifndef CHEAT_WIDGET_HXX -#define CHEAT_WIDGET_HXX - -class GuiObject; -class ButtonWidget; -class StaticTextWidget; -class EditNumWidget; -class AddrValueWidget; -class InputTextDialog; - -#include "Array.hxx" -#include "Widget.hxx" -#include "Command.hxx" - - -class CheatWidget : public Widget, public CommandSender -{ - private: - struct AddrValue { - uInt16 addr; - uInt8 value; - }; - - typedef GUI::Array AddrValueList; - - AddrValueList mySearchArray; - AddrValueList myCompareArray; - - public: - CheatWidget(GuiObject *boss, int x, int y, int w, int h); - virtual ~CheatWidget(); - - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - private: - const string doSearch(const string& str); - const string doCompare(const string& str); - void doRestart(); - - void fillResultsList(); - - private: - EditNumWidget* myEditBox; - StaticTextWidget* myResult; - - ButtonWidget* mySearchButton; - ButtonWidget* myCompareButton; - ButtonWidget* myRestartButton; - - AddrValueWidget* myResultsList; - - InputTextDialog* myInputBox; -}; - -#endif diff --git a/stella/src/debugger/RamWidget.cxx b/stella/src/debugger/RamWidget.cxx index 62eb3d4e0..365110947 100644 --- a/stella/src/debugger/RamWidget.cxx +++ b/stella/src/debugger/RamWidget.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: RamWidget.cxx,v 1.7 2005-08-11 19:12:38 stephena Exp $ +// $Id: RamWidget.cxx,v 1.8 2005-08-11 21:57:30 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -47,8 +47,7 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& font, int x, int y) : Widget(boss, x, y, 16, 16), CommandSender(boss), myUndoAddress(-1), - myUndoValue(-1), - mySearchValue(-1) + myUndoValue(-1) { const int fontWidth = font.getMaxCharWidth(), fontHeight = font.getFontHeight(), @@ -253,7 +252,7 @@ void RamWidget::handleCommand(CommandSender* sender, int cmd, int data, int id) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void RamWidget::loadConfig() { -cerr << "RamWidget::loadConfig()\n"; +//cerr << "RamWidget::loadConfig()\n"; fillGrid(true); } @@ -304,27 +303,28 @@ const string RamWidget::doSearch(const string& str) return "Invalid input +|-"; } - mySearchValue = instance()->debugger().stringToValue(str); + int searchVal = instance()->debugger().stringToValue(str); // Clear the search array of previous items - mySearchResults.clear(); + mySearchAddr.clear(); + mySearchValue.clear(); // Now, search all memory locations for this value, and add it to the // search array RamDebug& dbg = instance()->debugger().ramDebug(); for(int addr = 0; addr < kRamSize; ++addr) { - if(comparisonSearch) - { - if(dbg.read(addr) == mySearchValue) - mySearchResults.push_back(addr); - } - else // match all memory locations - mySearchResults.push_back(addr); + int value = dbg.read(addr); + + if(comparisonSearch && searchVal != value) + continue; + + mySearchAddr.push_back(addr); + mySearchValue.push_back(value); } // If we have some hits, enable the comparison methods - if(mySearchResults.size() > 0) + if(mySearchAddr.size() > 0) { mySearchButton->setEnabled(false); myCompareButton->setEnabled(true); @@ -332,7 +332,7 @@ const string RamWidget::doSearch(const string& str) } // Finally, show the search results in the list - myRamGrid->setHiliteList(mySearchResults); + myRamGrid->setHiliteList(mySearchAddr); return ""; } @@ -341,7 +341,7 @@ const string RamWidget::doSearch(const string& str) const string RamWidget::doCompare(const string& str) { bool comparitiveSearch = false; - int searchVal = 0; + int searchVal = 0, offset = 0; if(str.length() == 0) return "Enter an absolute or comparitive value"; @@ -365,44 +365,42 @@ const string RamWidget::doCompare(const string& str) string tmp = str; tmp.erase(0, 1); // remove the operator - searchVal = instance()->debugger().stringToValue(tmp); + offset = instance()->debugger().stringToValue(tmp); if(negative) - searchVal = -searchVal; + offset = -offset; } else searchVal = instance()->debugger().stringToValue(str); -cerr << " ==> searching for " << searchVal << endl; - // Now, search all memory locations specified in mySearchArray for this value RamDebug& dbg = instance()->debugger().ramDebug(); IntArray tempList; - for(unsigned int i = 0; i < mySearchResults.size(); ++i) + for(unsigned int i = 0; i < mySearchAddr.size(); ++i) { if(comparitiveSearch) { - searchVal += mySearchValue; - if(searchVal >= 0 && searchVal <= 255) + searchVal = mySearchValue[i] + offset; + if(searchVal < 0 || searchVal > 255) continue; } - int addr = mySearchResults[i]; + int addr = mySearchAddr[i]; if(dbg.read(addr) == searchVal) tempList.push_back(addr); } // Update the searchArray to the new results - mySearchResults = tempList; + mySearchAddr = tempList; // If we have some hits, enable the comparison methods - if(mySearchResults.size() > 0) + if(mySearchAddr.size() > 0) { myCompareButton->setEnabled(true); myRestartButton->setEnabled(true); } // Finally, show the search results in the list - myRamGrid->setHiliteList(mySearchResults); + myRamGrid->setHiliteList(mySearchAddr); return ""; } @@ -411,9 +409,9 @@ cerr << " ==> searching for " << searchVal << endl; void RamWidget::doRestart() { // Erase all search buffers, reset to start mode - mySearchValue = -1; - mySearchResults.clear(); - myRamGrid->setHiliteList(mySearchResults); + mySearchAddr.clear(); + mySearchValue.clear(); + myRamGrid->setHiliteList(mySearchAddr); mySearchButton->setEnabled(true); myCompareButton->setEnabled(false); diff --git a/stella/src/debugger/RamWidget.hxx b/stella/src/debugger/RamWidget.hxx index 8e2b97d65..4b92817de 100644 --- a/stella/src/debugger/RamWidget.hxx +++ b/stella/src/debugger/RamWidget.hxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: RamWidget.hxx,v 1.5 2005-08-11 19:12:38 stephena Exp $ +// $Id: RamWidget.hxx,v 1.6 2005-08-11 21:57:30 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -55,7 +55,6 @@ class RamWidget : public Widget, public CommandSender private: int myUndoAddress; int myUndoValue; - int mySearchValue; DataGridWidget* myRamGrid; EditTextWidget* myBinValue; @@ -71,7 +70,8 @@ class RamWidget : public Widget, public CommandSender InputTextDialog* myInputBox; IntArray myOldValueList; - IntArray mySearchResults; + IntArray mySearchAddr; + IntArray mySearchValue; }; #endif diff --git a/stella/src/debugger/module.mk b/stella/src/debugger/module.mk index e09095c0d..004433f6a 100644 --- a/stella/src/debugger/module.mk +++ b/stella/src/debugger/module.mk @@ -44,7 +44,6 @@ MODULE_OBJS := \ src/debugger/TIADebug.o \ src/debugger/TiaInfoWidget.o \ src/debugger/TiaOutputWidget.o \ - src/debugger/CheatWidget.o \ src/debugger/CpuWidget.o \ src/debugger/PromptWidget.o \ src/debugger/RamWidget.o \ diff --git a/stella/src/emucore/FrameBuffer.cxx b/stella/src/emucore/FrameBuffer.cxx index aea914d63..a8837190a 100644 --- a/stella/src/emucore/FrameBuffer.cxx +++ b/stella/src/emucore/FrameBuffer.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: FrameBuffer.cxx,v 1.59 2005-08-11 19:12:38 stephena Exp $ +// $Id: FrameBuffer.cxx,v 1.60 2005-08-11 21:57:30 stephena Exp $ //============================================================================ #include @@ -608,7 +608,7 @@ const uInt8 FrameBuffer::ourGUIColors[kNumColors-256][3] = { { 104, 104, 104 }, // kColor { 0, 0, 0 }, // kBGColor { 64, 64, 64 }, // kShadowColor - { 0, 0, 200 }, // kHiliteColor + { 200, 200, 255 }, // kHiliteColor { 32, 160, 32 }, // kTextColor { 0, 255, 0 }, // kTextColorHi { 200, 0, 0 } // kTextColorEm diff --git a/stella/src/gui/AboutDialog.cxx b/stella/src/gui/AboutDialog.cxx index 215e41fd3..ab36eaa78 100644 --- a/stella/src/gui/AboutDialog.cxx +++ b/stella/src/gui/AboutDialog.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: AboutDialog.cxx,v 1.5 2005-08-01 22:33:14 stephena Exp $ +// $Id: AboutDialog.cxx,v 1.6 2005-08-11 21:57:30 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -43,7 +43,7 @@ AboutDialog::AboutDialog(OSystem* osystem, DialogContainer* parent, addButton(w - (kButtonWidth + 10), h - 24, "Close", kCloseCmd, 'C'); myPrevButton->clearFlags(WIDGET_ENABLED); - myTitle = new StaticTextWidget(this, 0, 5, w, kFontHeight, "", kTextAlignCenter); + myTitle = new StaticTextWidget(this, 5, 5, w-10, kFontHeight, "", kTextAlignCenter); myTitle->setColor(kTextColorHi); for(int i = 0; i < LINES_PER_PAGE; i++) diff --git a/stella/src/gui/DataGridWidget.cxx b/stella/src/gui/DataGridWidget.cxx index c2a7558dd..14d222c4c 100644 --- a/stella/src/gui/DataGridWidget.cxx +++ b/stella/src/gui/DataGridWidget.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: DataGridWidget.cxx,v 1.20 2005-08-11 19:12:39 stephena Exp $ +// $Id: DataGridWidget.cxx,v 1.21 2005-08-11 21:57:30 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -503,18 +503,22 @@ void DataGridWidget::drawWidget(bool hilite) buffer = _valueStringList[pos]; deltax = 0; + OverlayColor color = kTextColor; + if(_changedList[pos]) { fb.fillRect(x - 3, y - 1, _colWidth-1, _rowHeight-1, kTextColorEm); - fb.drawString(_font, buffer, x, y, _colWidth, kTextColorHi); - } - else - fb.drawString(_font, buffer, x, y, _colWidth, kTextColor); - } - // Hilite special items by drawing a frame - if (_hiliteList[pos]) - fb.frameRect(x - 4, y - 2, _colWidth+1, _rowHeight+1, kHiliteColor); + if(_hiliteList[pos]) + color = kHiliteColor; + else + color = kTextColorHi; + } + else if(_hiliteList[pos]) + color = kHiliteColor; + + fb.drawString(_font, buffer, x, y, _colWidth, color); + } } } diff --git a/stella/src/gui/DebuggerDialog.cxx b/stella/src/gui/DebuggerDialog.cxx index 73857e2bd..e2535b066 100644 --- a/stella/src/gui/DebuggerDialog.cxx +++ b/stella/src/gui/DebuggerDialog.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: DebuggerDialog.cxx,v 1.33 2005-08-10 18:44:37 stephena Exp $ +// $Id: DebuggerDialog.cxx,v 1.34 2005-08-11 21:57:30 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -28,7 +28,6 @@ #include "CpuWidget.hxx" #include "RamWidget.hxx" #include "TiaWidget.hxx" -#include "CheatWidget.hxx" #include "DataGridOpsWidget.hxx" #include "Rect.hxx" #include "Debugger.hxx" @@ -119,7 +118,7 @@ void DebuggerDialog::handleCommand(CommandSender* sender, int cmd, break; default: - Dialog::handleCommand(sender, cmd, data, 0); + Dialog::handleCommand(sender, cmd, data, id); } } @@ -159,13 +158,7 @@ void DebuggerDialog::addTabArea() addToFocusList(tia->getFocusList(), tabID); // The input/output tab (part of RIOT) - tabID = myTab->addTab("I/O"); - - // The Cheat tab - tabID = myTab->addTab("Cheat"); - CheatWidget* cheat = new CheatWidget(myTab, 2, 2, widWidth, widHeight); - myTab->setParentWidget(tabID, cheat); - addToFocusList(cheat->getFocusList(), tabID); +// tabID = myTab->addTab("I/O"); myTab->setActiveTab(0); } diff --git a/stella/src/gui/GameInfoDialog.cxx b/stella/src/gui/GameInfoDialog.cxx index 58d78a177..7793d1e06 100644 --- a/stella/src/gui/GameInfoDialog.cxx +++ b/stella/src/gui/GameInfoDialog.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: GameInfoDialog.cxx,v 1.9 2005-08-01 22:33:15 stephena Exp $ +// $Id: GameInfoDialog.cxx,v 1.10 2005-08-11 21:57:30 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -43,7 +43,7 @@ GameInfoDialog::GameInfoDialog(OSystem* osystem, DialogContainer* parent, addButton(w - (kButtonWidth + 10), h - 24, "Close", kCloseCmd, 'C'); myPrevButton->clearFlags(WIDGET_ENABLED); - myTitle = new StaticTextWidget(this, 0, 5, w, kFontHeight, "", kTextAlignCenter); + myTitle = new StaticTextWidget(this, 5, 5, w-10, kFontHeight, "", kTextAlignCenter); for(uInt8 i = 0; i < LINES_PER_PAGE; i++) { myKey[i] = new StaticTextWidget(this, 10, 18 + (10 * i), 80, kFontHeight, diff --git a/stella/src/gui/HelpDialog.cxx b/stella/src/gui/HelpDialog.cxx index ac04164a1..a293093c0 100644 --- a/stella/src/gui/HelpDialog.cxx +++ b/stella/src/gui/HelpDialog.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: HelpDialog.cxx,v 1.11 2005-08-01 22:33:15 stephena Exp $ +// $Id: HelpDialog.cxx,v 1.12 2005-08-11 21:57:30 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -41,7 +41,7 @@ HelpDialog::HelpDialog(OSystem* osystem, DialogContainer* parent, addButton(w - (kButtonWidth + 10), h - 24, "Close", kCloseCmd, 'C'); myPrevButton->clearFlags(WIDGET_ENABLED); - myTitle = new StaticTextWidget(this, 0, 5, w, kFontHeight, "", kTextAlignCenter); + myTitle = new StaticTextWidget(this, 5, 5, w-10, kFontHeight, "", kTextAlignCenter); for(uInt8 i = 0; i < LINES_PER_PAGE; i++) { myKey[i] = new StaticTextWidget(this, 10, 18 + (10 * i), 80, kFontHeight,