mirror of https://github.com/stella-emu/stella.git
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
This commit is contained in:
parent
570d8735ed
commit
6528e5d75a
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 <sstream>
|
||||
|
@ -45,8 +45,6 @@ FrameBuffer::FrameBuffer(OSystem* osystem)
|
|||
myPauseStatus(false),
|
||||
theRedrawOverlayIndicator(false),
|
||||
myOverlayRedraws(2),
|
||||
theScanlineAdvanceIndicator(0),
|
||||
theFrameAdvanceIndicator(0),
|
||||
myMessageTime(0),
|
||||
myMessageText(""),
|
||||
myNumRedraws(0)
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue