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
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -61,6 +61,12 @@ void TiaOutputWidget::advance(int frames)
|
||||||
_dirty = true;
|
_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)
|
void TiaOutputWidget::drawWidget(bool hilite)
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// 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);
|
TiaOutputWidget(GuiObject *boss, int x, int y, int w, int h);
|
||||||
virtual ~TiaOutputWidget();
|
virtual ~TiaOutputWidget();
|
||||||
|
|
||||||
|
|
||||||
// Eventually, these methods will enable access to the onscreen TIA image
|
// Eventually, these methods will enable access to the onscreen TIA image
|
||||||
// For example, clicking an area may cause an action
|
// For example, clicking an area may cause an action
|
||||||
// (fill to this scanline, etc).
|
// (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 handleMouseUp(int x, int y, int button, int clickCount);
|
||||||
virtual void handleMouseWheel(int x, int y, int direction);
|
virtual void handleMouseWheel(int x, int y, int direction);
|
||||||
virtual bool handleKeyDown(int ascii, int keycode, int modifiers);
|
virtual bool handleKeyDown(int ascii, int keycode, int modifiers);
|
||||||
virtual bool handleKeyUp(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 void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
||||||
*/
|
*/
|
||||||
virtual bool wantsFocus() { return false; }
|
|
||||||
|
|
||||||
void advanceScanline(int lines);
|
void advanceScanline(int lines);
|
||||||
void advance(int frames);
|
void advance(int frames);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void drawWidget(bool hilite);
|
void drawWidget(bool hilite);
|
||||||
|
bool wantsFocus() { return false; }
|
||||||
|
|
||||||
|
void handleMouseDown(int x, int y, int button, int clickCount);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool _dirty;
|
bool _dirty;
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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>
|
#include <sstream>
|
||||||
|
@ -45,8 +45,6 @@ FrameBuffer::FrameBuffer(OSystem* osystem)
|
||||||
myPauseStatus(false),
|
myPauseStatus(false),
|
||||||
theRedrawOverlayIndicator(false),
|
theRedrawOverlayIndicator(false),
|
||||||
myOverlayRedraws(2),
|
myOverlayRedraws(2),
|
||||||
theScanlineAdvanceIndicator(0),
|
|
||||||
theFrameAdvanceIndicator(0),
|
|
||||||
myMessageTime(0),
|
myMessageTime(0),
|
||||||
myMessageText(""),
|
myMessageText(""),
|
||||||
myNumRedraws(0)
|
myNumRedraws(0)
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef FRAMEBUFFER_HXX
|
||||||
|
@ -52,7 +52,7 @@ enum FrameStyle {
|
||||||
All GUI elements (ala ScummVM) are drawn here as well.
|
All GUI elements (ala ScummVM) are drawn here as well.
|
||||||
|
|
||||||
@author Stephen Anthony
|
@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
|
class FrameBuffer
|
||||||
{
|
{
|
||||||
|
@ -454,12 +454,6 @@ class FrameBuffer
|
||||||
// Number of times menu have been drawn
|
// Number of times menu have been drawn
|
||||||
int myOverlayRedraws;
|
int myOverlayRedraws;
|
||||||
|
|
||||||
// Indicates how many scanlines the emulation should advance
|
|
||||||
int theScanlineAdvanceIndicator;
|
|
||||||
|
|
||||||
// Indicates how many frames the emulation should advance
|
|
||||||
int theFrameAdvanceIndicator;
|
|
||||||
|
|
||||||
// Message timer
|
// Message timer
|
||||||
Int32 myMessageTime;
|
Int32 myMessageTime;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue