mirror of https://github.com/stella-emu/stella.git
Add DelayQueue widget (mocked content).
This commit is contained in:
parent
157f25eba9
commit
8275b1a9d6
|
@ -5,7 +5,9 @@
|
||||||
"-I/home/cnspeckn/git/stella/src/common",
|
"-I/home/cnspeckn/git/stella/src/common",
|
||||||
"-I/home/cnspeckn/git/stella/src/emucore",
|
"-I/home/cnspeckn/git/stella/src/emucore",
|
||||||
"-I/home/cnspeckn/git/stella/src/emucore/tia",
|
"-I/home/cnspeckn/git/stella/src/emucore/tia",
|
||||||
"-I/home/cnspeckn/git/stella/src/emucore/debugger"
|
"-I/home/cnspeckn/git/stella/src/debugger",
|
||||||
|
"-I/home/cnspeckn/git/stella/src/debugger/gui",
|
||||||
|
"-I/home/cnspeckn/git/stella/src/gui"
|
||||||
],
|
],
|
||||||
"editor.tabSize": 2,
|
"editor.tabSize": 2,
|
||||||
"files.trimTrailingWhitespace": true,
|
"files.trimTrailingWhitespace": true,
|
||||||
|
|
|
@ -0,0 +1,60 @@
|
||||||
|
//============================================================================
|
||||||
|
//
|
||||||
|
// 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-2017 by Bradford W. Mott, Stephen Anthony
|
||||||
|
// and the Stella Team
|
||||||
|
//
|
||||||
|
// See the file "License.txt" for information on usage and redistribution of
|
||||||
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
|
//============================================================================
|
||||||
|
|
||||||
|
#include "DelayQueueWidget.hxx"
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
DelayQueueWidget::DelayQueueWidget(
|
||||||
|
GuiObject* boss,
|
||||||
|
const GUI::Font& font,
|
||||||
|
int x, int y
|
||||||
|
) : Widget(boss, font, x, y, 0, 0)
|
||||||
|
{
|
||||||
|
_textcolor = kTextColor;
|
||||||
|
|
||||||
|
_w = 300;
|
||||||
|
_h = 3 * font.getLineHeight() + 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
void DelayQueueWidget::drawWidget(bool hilite)
|
||||||
|
{
|
||||||
|
FBSurface& surface = _boss->dialog().surface();
|
||||||
|
|
||||||
|
int y = _y,
|
||||||
|
x = _x,
|
||||||
|
w = _w,
|
||||||
|
lineHeight = _font.getLineHeight();
|
||||||
|
|
||||||
|
surface.frameRect(x, y, w, _h, kShadowColor);
|
||||||
|
|
||||||
|
y += 1;
|
||||||
|
x += 1;
|
||||||
|
w -= 1;
|
||||||
|
surface.fillRect(x, y, w - 1, _h - 2, kWidColor);
|
||||||
|
|
||||||
|
y += 2;
|
||||||
|
x += 2;
|
||||||
|
w -= 3;
|
||||||
|
surface.drawString(_font, "1 clk, 40 -> GRP0", x, y, w, _textcolor);
|
||||||
|
|
||||||
|
y += lineHeight;
|
||||||
|
surface.drawString(_font, "3 clk, 02 -> VSYNC", x, y, w, _textcolor);
|
||||||
|
|
||||||
|
y += lineHeight;
|
||||||
|
surface.drawString(_font, "6 clk, 02 -> HMOVE", x, y, w, _textcolor);
|
||||||
|
}
|
|
@ -0,0 +1,49 @@
|
||||||
|
//============================================================================
|
||||||
|
//
|
||||||
|
// 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-2017 by Bradford W. Mott, Stephen Anthony
|
||||||
|
// and the Stella Team
|
||||||
|
//
|
||||||
|
// See the file "License.txt" for information on usage and redistribution of
|
||||||
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
|
//============================================================================
|
||||||
|
|
||||||
|
#ifndef DELAY_QUEUE_WIDGET_HXX
|
||||||
|
#define DELAY_QUEUE_WIDGET_HXX
|
||||||
|
|
||||||
|
#include "Widget.hxx"
|
||||||
|
|
||||||
|
class DelayQueueWidget : public Widget
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
DelayQueueWidget(
|
||||||
|
GuiObject* boss,
|
||||||
|
const GUI::Font& font,
|
||||||
|
int x, int y
|
||||||
|
);
|
||||||
|
|
||||||
|
virtual ~DelayQueueWidget() = default;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
void drawWidget(bool hilite) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
DelayQueueWidget() = delete;
|
||||||
|
DelayQueueWidget(const DelayQueueWidget&) = delete;
|
||||||
|
DelayQueueWidget(DelayQueueWidget&&) = delete;
|
||||||
|
DelayQueueWidget& operator=(const DelayQueueWidget&);
|
||||||
|
DelayQueueWidget& operator=(DelayQueueWidget&&);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // DELAY_QUEUE_WIDGET_HXX
|
|
@ -27,7 +27,7 @@
|
||||||
#include "ToggleBitWidget.hxx"
|
#include "ToggleBitWidget.hxx"
|
||||||
#include "TogglePixelWidget.hxx"
|
#include "TogglePixelWidget.hxx"
|
||||||
#include "Widget.hxx"
|
#include "Widget.hxx"
|
||||||
|
#include "DelayQueueWidget.hxx"
|
||||||
#include "TiaWidget.hxx"
|
#include "TiaWidget.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -529,6 +529,15 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
"Drive unused TIA pins randomly on a read/peek", kPPinCmd);
|
"Drive unused TIA pins randomly on a read/peek", kPPinCmd);
|
||||||
myUndrivenPins->setTarget(this);
|
myUndrivenPins->setTarget(this);
|
||||||
addFocusWidget(myUndrivenPins);
|
addFocusWidget(myUndrivenPins);
|
||||||
|
|
||||||
|
xpos = 10;
|
||||||
|
ypos += 2*lineHeight;
|
||||||
|
new StaticTextWidget(boss, lfont, xpos, ypos, 20*fontWidth, fontHeight,
|
||||||
|
"Queued Writes:", kTextAlignLeft);
|
||||||
|
|
||||||
|
ypos += 1.3*lineHeight;
|
||||||
|
xpos = 10;
|
||||||
|
myDelayQueueWidget = new DelayQueueWidget(boss, lfont, xpos, ypos);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -26,6 +26,7 @@ class ToggleBitWidget;
|
||||||
class TogglePixelWidget;
|
class TogglePixelWidget;
|
||||||
class EditTextWidget;
|
class EditTextWidget;
|
||||||
class ColorWidget;
|
class ColorWidget;
|
||||||
|
class DelayQueueWidget;
|
||||||
|
|
||||||
#include "Widget.hxx"
|
#include "Widget.hxx"
|
||||||
#include "Command.hxx"
|
#include "Command.hxx"
|
||||||
|
@ -91,6 +92,8 @@ class TiaWidget : public Widget, public CommandSender
|
||||||
|
|
||||||
CheckboxWidget* myUndrivenPins;
|
CheckboxWidget* myUndrivenPins;
|
||||||
|
|
||||||
|
DelayQueueWidget* myDelayQueueWidget;
|
||||||
|
|
||||||
// ID's for the various widgets
|
// ID's for the various widgets
|
||||||
// We need ID's, since there are more than one of several types of widgets
|
// We need ID's, since there are more than one of several types of widgets
|
||||||
enum {
|
enum {
|
||||||
|
|
|
@ -71,7 +71,8 @@ MODULE_OBJS := \
|
||||||
src/debugger/gui/KeyboardWidget.o \
|
src/debugger/gui/KeyboardWidget.o \
|
||||||
src/debugger/gui/GenesisWidget.o \
|
src/debugger/gui/GenesisWidget.o \
|
||||||
src/debugger/gui/AtariVoxWidget.o \
|
src/debugger/gui/AtariVoxWidget.o \
|
||||||
src/debugger/gui/SaveKeyWidget.o
|
src/debugger/gui/SaveKeyWidget.o \
|
||||||
|
src/debugger/gui/DelayQueueWidget.o
|
||||||
|
|
||||||
MODULE_DIRS += \
|
MODULE_DIRS += \
|
||||||
src/debugger/gui
|
src/debugger/gui
|
||||||
|
|
Loading…
Reference in New Issue