From 6528e5d75af92cc1975bd3034125b2be36ac30f9 Mon Sep 17 00:00:00 2001 From: stephena Date: Tue, 19 Jul 2005 18:21:28 +0000 Subject: [PATCH] Some experimentation with mouse tracking in the TIA widget. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@679 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- stella/src/debugger/TiaOutputWidget.cxx | 8 +++++++- stella/src/debugger/TiaOutputWidget.hxx | 8 +++++--- stella/src/emucore/FrameBuffer.cxx | 4 +--- stella/src/emucore/FrameBuffer.hxx | 10 ++-------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/stella/src/debugger/TiaOutputWidget.cxx b/stella/src/debugger/TiaOutputWidget.cxx index 86920c0d5..090a64961 100644 --- a/stella/src/debugger/TiaOutputWidget.cxx +++ b/stella/src/debugger/TiaOutputWidget.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: TiaOutputWidget.cxx,v 1.1 2005-07-19 17:59:58 stephena Exp $ +// $Id: TiaOutputWidget.cxx,v 1.2 2005-07-19 18:21:27 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -61,6 +61,12 @@ void TiaOutputWidget::advance(int frames) _dirty = true; } +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +void TiaOutputWidget::handleMouseDown(int x, int y, int button, int clickCount) +{ +cerr << "TiaOutputWidget button press: x = " << x << ", y = " << y << endl; +} + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void TiaOutputWidget::drawWidget(bool hilite) { diff --git a/stella/src/debugger/TiaOutputWidget.hxx b/stella/src/debugger/TiaOutputWidget.hxx index fd4ace163..357f7b743 100644 --- a/stella/src/debugger/TiaOutputWidget.hxx +++ b/stella/src/debugger/TiaOutputWidget.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: TiaOutputWidget.hxx,v 1.1 2005-07-19 17:59:58 stephena Exp $ +// $Id: TiaOutputWidget.hxx,v 1.2 2005-07-19 18:21:27 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -34,24 +34,26 @@ class TiaOutputWidget : public Widget, public CommandSender TiaOutputWidget(GuiObject *boss, int x, int y, int w, int h); virtual ~TiaOutputWidget(); + // Eventually, these methods will enable access to the onscreen TIA image // For example, clicking an area may cause an action // (fill to this scanline, etc). /* - virtual void handleMouseDown(int x, int y, int button, int clickCount); virtual void handleMouseUp(int x, int y, int button, int clickCount); virtual void handleMouseWheel(int x, int y, int direction); virtual bool handleKeyDown(int ascii, int keycode, int modifiers); virtual bool handleKeyUp(int ascii, int keycode, int modifiers); virtual void handleCommand(CommandSender* sender, int cmd, int data, int id); */ - virtual bool wantsFocus() { return false; } void advanceScanline(int lines); void advance(int frames); protected: void drawWidget(bool hilite); + bool wantsFocus() { return false; } + + void handleMouseDown(int x, int y, int button, int clickCount); private: bool _dirty; diff --git a/stella/src/emucore/FrameBuffer.cxx b/stella/src/emucore/FrameBuffer.cxx index c3b86f964..85eb2ebcb 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.53 2005-07-19 17:59:58 stephena Exp $ +// $Id: FrameBuffer.cxx,v 1.54 2005-07-19 18:21:27 stephena Exp $ //============================================================================ #include @@ -45,8 +45,6 @@ FrameBuffer::FrameBuffer(OSystem* osystem) myPauseStatus(false), theRedrawOverlayIndicator(false), myOverlayRedraws(2), - theScanlineAdvanceIndicator(0), - theFrameAdvanceIndicator(0), myMessageTime(0), myMessageText(""), myNumRedraws(0) diff --git a/stella/src/emucore/FrameBuffer.hxx b/stella/src/emucore/FrameBuffer.hxx index d97c73ac2..9e082dc66 100644 --- a/stella/src/emucore/FrameBuffer.hxx +++ b/stella/src/emucore/FrameBuffer.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: FrameBuffer.hxx,v 1.48 2005-07-19 17:59:59 stephena Exp $ +// $Id: FrameBuffer.hxx,v 1.49 2005-07-19 18:21:28 stephena Exp $ //============================================================================ #ifndef FRAMEBUFFER_HXX @@ -52,7 +52,7 @@ enum FrameStyle { All GUI elements (ala ScummVM) are drawn here as well. @author Stephen Anthony - @version $Id: FrameBuffer.hxx,v 1.48 2005-07-19 17:59:59 stephena Exp $ + @version $Id: FrameBuffer.hxx,v 1.49 2005-07-19 18:21:28 stephena Exp $ */ class FrameBuffer { @@ -454,12 +454,6 @@ class FrameBuffer // Number of times menu have been drawn int myOverlayRedraws; - // Indicates how many scanlines the emulation should advance - int theScanlineAdvanceIndicator; - - // Indicates how many frames the emulation should advance - int theFrameAdvanceIndicator; - // Message timer Int32 myMessageTime;