mirror of https://github.com/stella-emu/stella.git
Implemented BrowserDialog functionality. That means we can now browse
for the correct ROM folder, and the folders contents will be shown in the listview. Still TODO is modify GameList so that it contains all relevant info for a ROM. Then, the listview will contain the actual names of the ROMS (as specified in stella.pro) instead of their on-disk filenames. And at that point, we can actually start a game directly from that listview. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@417 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
011588bbb1
commit
781f8b8d2e
|
@ -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: makefile,v 1.76 2005-05-09 18:58:17 stephena Exp $
|
## $Id: makefile,v 1.77 2005-05-10 19:20:38 stephena Exp $
|
||||||
##============================================================================
|
##============================================================================
|
||||||
|
|
||||||
##============================================================================
|
##============================================================================
|
||||||
|
@ -159,7 +159,7 @@ GUI_OBJS = StellaFont.o Menu.o Launcher.o \
|
||||||
Widget.o PopUpWidget.o ScrollBarWidget.o ListWidget.o \
|
Widget.o PopUpWidget.o ScrollBarWidget.o ListWidget.o \
|
||||||
Dialog.o DialogContainer.o OptionsDialog.o VideoDialog.o AudioDialog.o \
|
Dialog.o DialogContainer.o OptionsDialog.o VideoDialog.o AudioDialog.o \
|
||||||
EventMappingDialog.o GameInfoDialog.o HelpDialog.o \
|
EventMappingDialog.o GameInfoDialog.o HelpDialog.o \
|
||||||
LauncherDialog.o BrowserDialog.o
|
LauncherDialog.o BrowserDialog.o GameList.o
|
||||||
|
|
||||||
CORE_OBJS = Booster.o Cart.o Cart2K.o Cart3F.o Cart4K.o CartAR.o CartDPC.o \
|
CORE_OBJS = Booster.o Cart.o Cart2K.o Cart3F.o Cart4K.o CartAR.o CartDPC.o \
|
||||||
CartE0.o CartE7.o CartF4.o CartF4SC.o CartF6.o CartF6SC.o \
|
CartE0.o CartE7.o CartF4.o CartF4SC.o CartF6.o CartF6SC.o \
|
||||||
|
@ -426,3 +426,6 @@ LauncherDialog.o: $(GUI)/LauncherDialog.cxx $(GUI)/LauncherDialog.hxx
|
||||||
|
|
||||||
BrowserDialog.o: $(GUI)/BrowserDialog.cxx $(GUI)/BrowserDialog.hxx
|
BrowserDialog.o: $(GUI)/BrowserDialog.cxx $(GUI)/BrowserDialog.hxx
|
||||||
$(CXX) -c $(FLAGS) $(OPTIONS) $(LDFLAGS) $(GUI)/BrowserDialog.cxx
|
$(CXX) -c $(FLAGS) $(OPTIONS) $(LDFLAGS) $(GUI)/BrowserDialog.cxx
|
||||||
|
|
||||||
|
GameList.o: $(GUI)/GameList.cxx $(GUI)/GameList.hxx
|
||||||
|
$(CXX) -c $(FLAGS) $(OPTIONS) $(LDFLAGS) $(GUI)/GameList.cxx
|
||||||
|
|
|
@ -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: FSNode.cxx,v 1.1 2005-05-09 18:58:18 stephena Exp $
|
// $Id: FSNode.cxx,v 1.2 2005-05-10 19:20:40 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
|
||||||
|
@ -64,13 +64,11 @@ FilesystemNode::FilesystemNode(const FilesystemNode &node)
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
#ifdef MACOSX
|
|
||||||
FilesystemNode::FilesystemNode(const string& p)
|
FilesystemNode::FilesystemNode(const string& p)
|
||||||
{
|
{
|
||||||
_realNode = getNodeForPath(p);
|
_realNode = getNodeForPath(p);
|
||||||
_refCount = new int(1);
|
_refCount = new int(1);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
FilesystemNode::~FilesystemNode()
|
FilesystemNode::~FilesystemNode()
|
||||||
|
|
|
@ -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: FSNode.hxx,v 1.1 2005-05-09 18:58:18 stephena Exp $
|
// $Id: FSNode.hxx,v 1.2 2005-05-10 19:20:40 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
|
||||||
|
@ -161,9 +161,7 @@ class FilesystemNode : public AbstractFilesystemNode
|
||||||
public:
|
public:
|
||||||
FilesystemNode();
|
FilesystemNode();
|
||||||
FilesystemNode(const FilesystemNode& node);
|
FilesystemNode(const FilesystemNode& node);
|
||||||
#ifdef MACOSX
|
|
||||||
FilesystemNode(const string& path);
|
FilesystemNode(const string& path);
|
||||||
#endif
|
|
||||||
~FilesystemNode();
|
~FilesystemNode();
|
||||||
|
|
||||||
FilesystemNode &operator =(const FilesystemNode &node);
|
FilesystemNode &operator =(const FilesystemNode &node);
|
||||||
|
@ -195,7 +193,6 @@ class FilesystemNode : public AbstractFilesystemNode
|
||||||
*/
|
*/
|
||||||
static AbstractFilesystemNode* getRoot();
|
static AbstractFilesystemNode* getRoot();
|
||||||
|
|
||||||
#ifdef MACOSX
|
|
||||||
/*
|
/*
|
||||||
* Construct a node based on a path; the path is in the same format as it
|
* Construct a node based on a path; the path is in the same format as it
|
||||||
* would be for calls to fopen().
|
* would be for calls to fopen().
|
||||||
|
@ -203,7 +200,6 @@ class FilesystemNode : public AbstractFilesystemNode
|
||||||
* I.e. getNodeForPath(oldNode.path()) should create a new node identical to oldNode.
|
* I.e. getNodeForPath(oldNode.path()) should create a new node identical to oldNode.
|
||||||
*/
|
*/
|
||||||
static AbstractFilesystemNode* getNodeForPath(const string& path);
|
static AbstractFilesystemNode* getNodeForPath(const string& path);
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -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.30 2005-05-08 17:38:23 stephena Exp $
|
// $Id: FrameBuffer.hxx,v 1.31 2005-05-10 19:20:40 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifndef FRAMEBUFFER_HXX
|
#ifndef FRAMEBUFFER_HXX
|
||||||
|
@ -41,7 +41,7 @@ class OSystem;
|
||||||
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.30 2005-05-08 17:38:23 stephena Exp $
|
@version $Id: FrameBuffer.hxx,v 1.31 2005-05-10 19:20:40 stephena Exp $
|
||||||
*/
|
*/
|
||||||
class FrameBuffer
|
class FrameBuffer
|
||||||
{
|
{
|
||||||
|
@ -135,7 +135,7 @@ class FrameBuffer
|
||||||
*/
|
*/
|
||||||
void refresh(bool now = false)
|
void refresh(bool now = false)
|
||||||
{
|
{
|
||||||
//cerr << "refresh() " << myNumRedraws++ << endl;
|
// cerr << "refresh() " << myNumRedraws++ << endl;
|
||||||
theRedrawEntireFrameIndicator = true;
|
theRedrawEntireFrameIndicator = true;
|
||||||
myMenuRedraws = 2;
|
myMenuRedraws = 2;
|
||||||
if(now) drawMediaSource();
|
if(now) drawMediaSource();
|
||||||
|
|
|
@ -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: Settings.cxx,v 1.38 2005-05-06 18:38:59 stephena Exp $
|
// $Id: Settings.cxx,v 1.39 2005-05-10 19:20:41 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
@ -59,6 +59,7 @@ Settings::Settings(OSystem* osystem)
|
||||||
set("ssdir", ".");
|
set("ssdir", ".");
|
||||||
set("ssname", "romname");
|
set("ssname", "romname");
|
||||||
set("sssingle", "false");
|
set("sssingle", "false");
|
||||||
|
set("romdir", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -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: AudioDialog.cxx,v 1.3 2005-04-28 19:28:33 stephena Exp $
|
// $Id: AudioDialog.cxx,v 1.4 2005-05-10 19:20:42 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
|
||||||
|
@ -41,8 +41,9 @@ enum {
|
||||||
};
|
};
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
AudioDialog::AudioDialog(OSystem* osystem, uInt16 x, uInt16 y, uInt16 w, uInt16 h)
|
AudioDialog::AudioDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
: Dialog(osystem, x, y, w, h)
|
uInt16 x, uInt16 y, uInt16 w, uInt16 h)
|
||||||
|
: Dialog(osystem, parent, x, y, w, h)
|
||||||
{
|
{
|
||||||
int yoff = 10,
|
int yoff = 10,
|
||||||
xoff = 30,
|
xoff = 30,
|
||||||
|
|
|
@ -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: AudioDialog.hxx,v 1.1 2005-03-26 19:26:47 stephena Exp $
|
// $Id: AudioDialog.hxx,v 1.2 2005-05-10 19:20:43 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
|
||||||
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
class CommandSender;
|
class CommandSender;
|
||||||
class Dialog;
|
class Dialog;
|
||||||
|
class DialogContainer;
|
||||||
class PopUpWidget;
|
class PopUpWidget;
|
||||||
class SliderWidget;
|
class SliderWidget;
|
||||||
class StaticTextWidget;
|
class StaticTextWidget;
|
||||||
|
@ -35,7 +36,8 @@ class CheckboxWidget;
|
||||||
class AudioDialog : public Dialog
|
class AudioDialog : public Dialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AudioDialog(OSystem* osystem, uInt16 x, uInt16 y, uInt16 w, uInt16 h);
|
AudioDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
|
uInt16 x, uInt16 y, uInt16 w, uInt16 h);
|
||||||
~AudioDialog();
|
~AudioDialog();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -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: BrowserDialog.cxx,v 1.1 2005-05-06 18:39:00 stephena Exp $
|
// $Id: BrowserDialog.cxx,v 1.2 2005-05-10 19:20:43 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
|
||||||
|
@ -23,31 +23,125 @@
|
||||||
#include "Widget.hxx"
|
#include "Widget.hxx"
|
||||||
#include "ListWidget.hxx"
|
#include "ListWidget.hxx"
|
||||||
#include "Dialog.hxx"
|
#include "Dialog.hxx"
|
||||||
|
#include "FSNode.hxx"
|
||||||
#include "GuiUtils.hxx"
|
#include "GuiUtils.hxx"
|
||||||
#include "Event.hxx"
|
|
||||||
#include "EventHandler.hxx"
|
|
||||||
#include "BrowserDialog.hxx"
|
#include "BrowserDialog.hxx"
|
||||||
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
|
|
||||||
|
enum {
|
||||||
|
kChooseCmd = 'CHOS',
|
||||||
|
kGoUpCmd = 'GOUP'
|
||||||
|
};
|
||||||
|
|
||||||
|
/* We want to use this as a general directory selector at some point... possible uses
|
||||||
|
* - to select the data dir for a game
|
||||||
|
* - to select the place where save games are stored
|
||||||
|
* - others???
|
||||||
|
*/
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
BrowserDialog::BrowserDialog(OSystem* osystem, uInt16 x, uInt16 y,
|
BrowserDialog::BrowserDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
uInt16 w, uInt16 h)
|
const string& title, const string& startpath,
|
||||||
: Dialog(osystem, x, y, w, h)
|
uInt16 x, uInt16 y, uInt16 w, uInt16 h)
|
||||||
|
: Dialog(osystem, parent, x, y, w, h),
|
||||||
|
_fileList(NULL),
|
||||||
|
_currentPath(NULL),
|
||||||
|
_startPath(startpath)
|
||||||
{
|
{
|
||||||
|
// Headline - TODO: should be customizable during creation time
|
||||||
|
new StaticTextWidget(this, 10, 8, _w - 2 * 10, kLineHeight, title, kTextAlignCenter);
|
||||||
|
|
||||||
|
// Current path - TODO: handle long paths ?
|
||||||
|
_currentPath = new StaticTextWidget(this, 10, 20, _w - 2 * 10, kLineHeight,
|
||||||
|
"DUMMY", kTextAlignLeft);
|
||||||
|
|
||||||
|
// Add file list
|
||||||
|
_fileList = new ListWidget(this, 10, 34, _w - 2 * 10, _h - 34 - 24 - 10);
|
||||||
|
_fileList->setNumberingMode(kListNumberingOff);
|
||||||
|
_fileList->setEditable(false);
|
||||||
|
|
||||||
|
// Buttons
|
||||||
|
addButton(10, _h - 24, "Go up", kGoUpCmd, 0);
|
||||||
|
addButton(_w - 2 * (kButtonWidth + 10), _h - 24, "Cancel", kCloseCmd, 0);
|
||||||
|
addButton(_w - (kButtonWidth+10), _h - 24, "Choose", kChooseCmd, 0);
|
||||||
|
|
||||||
|
// If no node has been set, or the last used one is now invalid,
|
||||||
|
// go back to the root/default dir.
|
||||||
|
if (_startPath != "")
|
||||||
|
_choice = FilesystemNode(_startPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
BrowserDialog::~BrowserDialog()
|
void BrowserDialog::loadConfig()
|
||||||
{
|
{
|
||||||
}
|
// If no node has been set, or the last used one is now invalid,
|
||||||
|
// go back to the root/default dir.
|
||||||
|
if (_choice.isValid())
|
||||||
|
_node = _choice;
|
||||||
|
else if (!_node.isValid())
|
||||||
|
_node = FilesystemNode();
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// Alway refresh file list
|
||||||
void BrowserDialog::handleKeyDown(uInt16 ascii, Int32 keycode, Int32 modifiers)
|
updateListing();
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void BrowserDialog::handleCommand(CommandSender* sender, uInt32 cmd, uInt32 data)
|
void BrowserDialog::handleCommand(CommandSender* sender, uInt32 cmd, uInt32 data)
|
||||||
{
|
{
|
||||||
|
switch (cmd)
|
||||||
|
{
|
||||||
|
case kChooseCmd:
|
||||||
|
{
|
||||||
|
// If nothing is selected in the list widget, choose the current dir.
|
||||||
|
// Else, choose the dir that is selected.
|
||||||
|
Int32 selection = _fileList->getSelected();
|
||||||
|
if (selection >= 0)
|
||||||
|
_choice = _nodeContent[selection];
|
||||||
|
else
|
||||||
|
_choice = _node;
|
||||||
|
|
||||||
|
setResult(1);
|
||||||
|
close();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case kGoUpCmd:
|
||||||
|
_node = _node.getParent();
|
||||||
|
updateListing();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case kListItemActivatedCmd:
|
||||||
|
case kListItemDoubleClickedCmd:
|
||||||
|
_node = _nodeContent[data];
|
||||||
|
updateListing();
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
Dialog::handleCommand(sender, cmd, data);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
void BrowserDialog::updateListing()
|
||||||
|
{
|
||||||
|
// Update the path display
|
||||||
|
_currentPath->setLabel(_node.path());
|
||||||
|
|
||||||
|
// Read in the data from the file system
|
||||||
|
_nodeContent = _node.listDir();
|
||||||
|
_nodeContent.sort();
|
||||||
|
|
||||||
|
// Populate the ListWidget
|
||||||
|
StringList list;
|
||||||
|
Int32 size = _nodeContent.size();
|
||||||
|
for (Int32 i = 0; i < size; i++)
|
||||||
|
list.push_back(_nodeContent[i].displayName());
|
||||||
|
|
||||||
|
_fileList->setList(list);
|
||||||
|
_fileList->scrollTo(0);
|
||||||
|
|
||||||
|
// Finally, redraw
|
||||||
|
draw();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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: BrowserDialog.hxx,v 1.1 2005-05-06 18:39:00 stephena Exp $
|
// $Id: BrowserDialog.hxx,v 1.2 2005-05-10 19:20:43 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
|
||||||
|
@ -22,6 +22,7 @@
|
||||||
#ifndef BROWSER_DIALOG_HXX
|
#ifndef BROWSER_DIALOG_HXX
|
||||||
#define BROWSER_DIALOG_HXX
|
#define BROWSER_DIALOG_HXX
|
||||||
|
|
||||||
|
class DialogContainer;
|
||||||
class CommandSender;
|
class CommandSender;
|
||||||
class ButtonWidget;
|
class ButtonWidget;
|
||||||
class StaticTextWidget;
|
class StaticTextWidget;
|
||||||
|
@ -29,28 +30,30 @@ class ListWidget;
|
||||||
|
|
||||||
#include "Dialog.hxx"
|
#include "Dialog.hxx"
|
||||||
#include "OSystem.hxx"
|
#include "OSystem.hxx"
|
||||||
|
#include "FSNode.hxx"
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
|
|
||||||
class BrowserDialog : public Dialog
|
class BrowserDialog : public Dialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BrowserDialog(OSystem* osystem, uInt16 x, uInt16 y, uInt16 w, uInt16 h);
|
BrowserDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
~BrowserDialog();
|
const string& title, const string& startpath,
|
||||||
|
uInt16 x, uInt16 y, uInt16 w, uInt16 h);
|
||||||
virtual void handleKeyDown(uInt16 ascii, Int32 keycode, Int32 modifiers);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
private:
|
|
||||||
enum {
|
|
||||||
kStartMapCmd = 'map ',
|
|
||||||
kEraseCmd = 'eras',
|
|
||||||
kStopMapCmd = 'smap'
|
|
||||||
};
|
|
||||||
|
|
||||||
|
virtual void loadConfig();
|
||||||
virtual void handleCommand(CommandSender* sender, uInt32 cmd, uInt32 data);
|
virtual void handleCommand(CommandSender* sender, uInt32 cmd, uInt32 data);
|
||||||
|
|
||||||
private:
|
const FilesystemNode& getResult() { return _choice; }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
ListWidget* _fileList;
|
||||||
|
StaticTextWidget* _currentPath;
|
||||||
|
FilesystemNode _node;
|
||||||
|
FSList _nodeContent;
|
||||||
|
FilesystemNode _choice;
|
||||||
|
string _startPath;
|
||||||
|
|
||||||
|
void updateListing();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -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: Dialog.cxx,v 1.11 2005-04-24 20:36:36 stephena Exp $
|
// $Id: Dialog.cxx,v 1.12 2005-05-10 19:20:43 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
|
||||||
|
@ -36,8 +36,9 @@
|
||||||
* ...
|
* ...
|
||||||
*/
|
*/
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
Dialog::Dialog(OSystem* instance, uInt16 x, uInt16 y, uInt16 w, uInt16 h)
|
Dialog::Dialog(OSystem* instance, DialogContainer* parent,
|
||||||
: GuiObject(instance, x, y, w, h),
|
uInt16 x, uInt16 y, uInt16 w, uInt16 h)
|
||||||
|
: GuiObject(instance, parent, x, y, w, h),
|
||||||
_mouseWidget(0),
|
_mouseWidget(0),
|
||||||
_focusedWidget(0),
|
_focusedWidget(0),
|
||||||
_dragWidget(0),
|
_dragWidget(0),
|
||||||
|
@ -99,7 +100,7 @@ void Dialog::close()
|
||||||
}
|
}
|
||||||
|
|
||||||
releaseFocus();
|
releaseFocus();
|
||||||
instance()->menu().removeDialog();
|
parent()->removeDialog();
|
||||||
|
|
||||||
_openCount = 0;
|
_openCount = 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: Dialog.hxx,v 1.9 2005-05-04 19:04:46 stephena Exp $
|
// $Id: Dialog.hxx,v 1.10 2005-05-10 19:20:43 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
|
||||||
|
@ -35,14 +35,15 @@ class DialogContainer;
|
||||||
This is the base class for all dialog boxes.
|
This is the base class for all dialog boxes.
|
||||||
|
|
||||||
@author Stephen Anthony
|
@author Stephen Anthony
|
||||||
@version $Id: Dialog.hxx,v 1.9 2005-05-04 19:04:46 stephena Exp $
|
@version $Id: Dialog.hxx,v 1.10 2005-05-10 19:20:43 stephena Exp $
|
||||||
*/
|
*/
|
||||||
class Dialog : public GuiObject
|
class Dialog : public GuiObject
|
||||||
{
|
{
|
||||||
friend class DialogContainer;
|
friend class DialogContainer;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Dialog(OSystem* instance, uInt16 x, uInt16 y, uInt16 w, uInt16 h);
|
Dialog(OSystem* instance, DialogContainer* parent,
|
||||||
|
uInt16 x, uInt16 y, uInt16 w, uInt16 h);
|
||||||
|
|
||||||
virtual ~Dialog();
|
virtual ~Dialog();
|
||||||
|
|
||||||
|
|
|
@ -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: EventMappingDialog.cxx,v 1.7 2005-05-06 22:50:15 stephena Exp $
|
// $Id: EventMappingDialog.cxx,v 1.8 2005-05-10 19:20:43 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
|
||||||
|
@ -31,9 +31,9 @@
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
EventMappingDialog::EventMappingDialog(OSystem* osystem, uInt16 x, uInt16 y,
|
EventMappingDialog::EventMappingDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
uInt16 w, uInt16 h)
|
uInt16 x, uInt16 y, uInt16 w, uInt16 h)
|
||||||
: Dialog(osystem, x, y, w, h),
|
: Dialog(osystem, parent, x, y, w, h),
|
||||||
myActionSelected(-1),
|
myActionSelected(-1),
|
||||||
myRemapStatus(false)
|
myRemapStatus(false)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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: EventMappingDialog.hxx,v 1.4 2005-04-06 23:47:08 stephena Exp $
|
// $Id: EventMappingDialog.hxx,v 1.5 2005-05-10 19:20:43 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
|
||||||
|
@ -22,6 +22,7 @@
|
||||||
#ifndef EVENT_MAPPING_DIALOG_HXX
|
#ifndef EVENT_MAPPING_DIALOG_HXX
|
||||||
#define EVENT_MAPPING_DIALOG_HXX
|
#define EVENT_MAPPING_DIALOG_HXX
|
||||||
|
|
||||||
|
class DialogContainer;
|
||||||
class CommandSender;
|
class CommandSender;
|
||||||
class ButtonWidget;
|
class ButtonWidget;
|
||||||
class StaticTextWidget;
|
class StaticTextWidget;
|
||||||
|
@ -33,7 +34,8 @@ class ListWidget;
|
||||||
class EventMappingDialog : public Dialog
|
class EventMappingDialog : public Dialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
EventMappingDialog(OSystem* osystem, uInt16 x, uInt16 y, uInt16 w, uInt16 h);
|
EventMappingDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
|
uInt16 x, uInt16 y, uInt16 w, uInt16 h);
|
||||||
~EventMappingDialog();
|
~EventMappingDialog();
|
||||||
|
|
||||||
virtual void handleKeyDown(uInt16 ascii, Int32 keycode, Int32 modifiers);
|
virtual void handleKeyDown(uInt16 ascii, Int32 keycode, Int32 modifiers);
|
||||||
|
|
|
@ -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: GameInfoDialog.cxx,v 1.3 2005-05-02 22:18:13 stephena Exp $
|
// $Id: GameInfoDialog.cxx,v 1.4 2005-05-10 19:20:43 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
|
||||||
|
@ -29,8 +29,9 @@
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
GameInfoDialog::GameInfoDialog(OSystem* osystem, uInt16 x, uInt16 y, uInt16 w, uInt16 h)
|
GameInfoDialog::GameInfoDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
: Dialog(osystem, x, y, w, h),
|
uInt16 x, uInt16 y, uInt16 w, uInt16 h)
|
||||||
|
: Dialog(osystem, parent, x, y, w, h),
|
||||||
myPage(1),
|
myPage(1),
|
||||||
myNumPages(2),
|
myNumPages(2),
|
||||||
myGameProperties(NULL)
|
myGameProperties(NULL)
|
||||||
|
|
|
@ -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: GameInfoDialog.hxx,v 1.2 2005-05-02 19:36:05 stephena Exp $
|
// $Id: GameInfoDialog.hxx,v 1.3 2005-05-10 19:20:43 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
|
||||||
|
@ -22,6 +22,7 @@
|
||||||
#ifndef GAME_INFO_DIALOG_HXX
|
#ifndef GAME_INFO_DIALOG_HXX
|
||||||
#define GAME_INFO_DIALOG_HXX
|
#define GAME_INFO_DIALOG_HXX
|
||||||
|
|
||||||
|
class DialogContainer;
|
||||||
class CommandSender;
|
class CommandSender;
|
||||||
class ButtonWidget;
|
class ButtonWidget;
|
||||||
class StaticTextWidget;
|
class StaticTextWidget;
|
||||||
|
@ -39,7 +40,8 @@ class StaticTextWidget;
|
||||||
class GameInfoDialog : public Dialog
|
class GameInfoDialog : public Dialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GameInfoDialog(OSystem* osystem, uInt16 x, uInt16 y, uInt16 w, uInt16 h);
|
GameInfoDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
|
uInt16 x, uInt16 y, uInt16 w, uInt16 h);
|
||||||
~GameInfoDialog();
|
~GameInfoDialog();
|
||||||
|
|
||||||
void setGameProfile(Properties& props) { myGameProperties = &props; }
|
void setGameProfile(Properties& props) { myGameProperties = &props; }
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
//============================================================================
|
||||||
|
//
|
||||||
|
// 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
|
||||||
|
//
|
||||||
|
// See the file "license" for information on usage and redistribution of
|
||||||
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
|
//
|
||||||
|
// $Id: GameList.cxx,v 1.1 2005-05-10 19:20:43 stephena Exp $
|
||||||
|
//
|
||||||
|
// Copyright (C) 2005 by Stephen Anthony
|
||||||
|
// @author Stephen Anthony
|
||||||
|
//============================================================================
|
||||||
|
|
||||||
|
#include "GameList.hxx"
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
GameList::GameList()
|
||||||
|
{
|
||||||
|
cerr << "GameList::GameList()\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
GameList::~GameList()
|
||||||
|
{
|
||||||
|
cerr << "GameList::~GameList()\n";
|
||||||
|
myArray.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
void GameList::sortByName()
|
||||||
|
{
|
||||||
|
cerr << "GameList::sortByName()\n";
|
||||||
|
}
|
|
@ -0,0 +1,53 @@
|
||||||
|
//============================================================================
|
||||||
|
//
|
||||||
|
// 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
|
||||||
|
//
|
||||||
|
// See the file "license" for information on usage and redistribution of
|
||||||
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
|
//
|
||||||
|
// $Id: GameList.hxx,v 1.1 2005-05-10 19:20:43 stephena Exp $
|
||||||
|
//
|
||||||
|
// Based on code from KStella - Stella frontend
|
||||||
|
// Copyright (C) 2003-2005 Stephen Anthony
|
||||||
|
//============================================================================
|
||||||
|
|
||||||
|
#ifndef GAME_LIST_HXX
|
||||||
|
#define GAME_LIST_HXX
|
||||||
|
|
||||||
|
#include "Array.hxx"
|
||||||
|
#include "bspf.hxx"
|
||||||
|
|
||||||
|
/**
|
||||||
|
Holds the list of game info for the ROM launcher.
|
||||||
|
*/
|
||||||
|
class GameList
|
||||||
|
{
|
||||||
|
struct Entry {
|
||||||
|
string _rom;
|
||||||
|
string _md5;
|
||||||
|
string _name;
|
||||||
|
string _note;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef Array<Entry> GameArray;
|
||||||
|
|
||||||
|
public:
|
||||||
|
GameList();
|
||||||
|
~GameList();
|
||||||
|
|
||||||
|
void sortByName();
|
||||||
|
GameArray& getList() { return myArray; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
GameArray myArray;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -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: GuiObject.hxx,v 1.4 2005-03-14 04:08:15 stephena Exp $
|
// $Id: GuiObject.hxx,v 1.5 2005-05-10 19:20:43 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
|
||||||
|
@ -23,6 +23,7 @@
|
||||||
#define GUI_OBJECT_HXX
|
#define GUI_OBJECT_HXX
|
||||||
|
|
||||||
class OSystem;
|
class OSystem;
|
||||||
|
class DialogContainer;
|
||||||
class Widget;
|
class Widget;
|
||||||
class Menu;
|
class Menu;
|
||||||
|
|
||||||
|
@ -33,7 +34,7 @@ class Menu;
|
||||||
This is the base class for all GUI objects/widgets.
|
This is the base class for all GUI objects/widgets.
|
||||||
|
|
||||||
@author Stephen Anthony
|
@author Stephen Anthony
|
||||||
@version $Id: GuiObject.hxx,v 1.4 2005-03-14 04:08:15 stephena Exp $
|
@version $Id: GuiObject.hxx,v 1.5 2005-05-10 19:20:43 stephena Exp $
|
||||||
*/
|
*/
|
||||||
class GuiObject : public CommandReceiver
|
class GuiObject : public CommandReceiver
|
||||||
{
|
{
|
||||||
|
@ -41,8 +42,9 @@ class GuiObject : public CommandReceiver
|
||||||
friend class Menu;
|
friend class Menu;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GuiObject(OSystem* osystem, int x, int y, int w, int h)
|
GuiObject(OSystem* osystem, DialogContainer* parent, int x, int y, int w, int h)
|
||||||
: myOSystem(osystem),
|
: myOSystem(osystem),
|
||||||
|
myParent(parent),
|
||||||
_x(x),
|
_x(x),
|
||||||
_y(y),
|
_y(y),
|
||||||
_w(w),
|
_w(w),
|
||||||
|
@ -50,6 +52,7 @@ class GuiObject : public CommandReceiver
|
||||||
_firstWidget(0) { }
|
_firstWidget(0) { }
|
||||||
|
|
||||||
OSystem* instance() { return myOSystem; }
|
OSystem* instance() { return myOSystem; }
|
||||||
|
DialogContainer* parent() { return myParent; }
|
||||||
|
|
||||||
virtual Int16 getAbsX() const { return _x; }
|
virtual Int16 getAbsX() const { return _x; }
|
||||||
virtual Int16 getAbsY() const { return _y; }
|
virtual Int16 getAbsY() const { return _y; }
|
||||||
|
@ -62,7 +65,8 @@ class GuiObject : public CommandReceiver
|
||||||
virtual void draw() = 0;
|
virtual void draw() = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
OSystem* myOSystem;
|
OSystem* myOSystem;
|
||||||
|
DialogContainer* myParent;
|
||||||
|
|
||||||
Int16 _x, _y;
|
Int16 _x, _y;
|
||||||
uInt16 _w, _h;
|
uInt16 _w, _h;
|
||||||
|
|
|
@ -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: HelpDialog.cxx,v 1.3 2005-05-02 22:18:14 stephena Exp $
|
// $Id: HelpDialog.cxx,v 1.4 2005-05-10 19:20:43 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
|
||||||
|
@ -28,8 +28,9 @@
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
HelpDialog::HelpDialog(OSystem* osystem, uInt16 x, uInt16 y, uInt16 w, uInt16 h)
|
HelpDialog::HelpDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
: Dialog(osystem, x, y, w, h),
|
uInt16 x, uInt16 y, uInt16 w, uInt16 h)
|
||||||
|
: Dialog(osystem, parent, x, y, w, h),
|
||||||
myPage(1),
|
myPage(1),
|
||||||
myNumPages(4)
|
myNumPages(4)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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: HelpDialog.hxx,v 1.1 2005-03-27 03:07:34 stephena Exp $
|
// $Id: HelpDialog.hxx,v 1.2 2005-05-10 19:20:43 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
|
||||||
|
@ -22,6 +22,7 @@
|
||||||
#ifndef HELP_DIALOG_HXX
|
#ifndef HELP_DIALOG_HXX
|
||||||
#define HELP_DIALOG_HXX
|
#define HELP_DIALOG_HXX
|
||||||
|
|
||||||
|
class DialogContainer;
|
||||||
class CommandSender;
|
class CommandSender;
|
||||||
class ButtonWidget;
|
class ButtonWidget;
|
||||||
class StaticTextWidget;
|
class StaticTextWidget;
|
||||||
|
@ -39,7 +40,8 @@ class StaticTextWidget;
|
||||||
class HelpDialog : public Dialog
|
class HelpDialog : public Dialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HelpDialog(OSystem* osystem, uInt16 x, uInt16 y, uInt16 w, uInt16 h);
|
HelpDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
|
uInt16 x, uInt16 y, uInt16 w, uInt16 h);
|
||||||
~HelpDialog();
|
~HelpDialog();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -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: Launcher.cxx,v 1.3 2005-05-09 18:58:19 stephena Exp $
|
// $Id: Launcher.cxx,v 1.4 2005-05-10 19:20:43 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include "OSystem.hxx"
|
#include "OSystem.hxx"
|
||||||
|
@ -39,7 +39,8 @@ void Launcher::initialize()
|
||||||
// We only create one instance of this dialog, since each time we do so,
|
// We only create one instance of this dialog, since each time we do so,
|
||||||
// the ROM listing is read from disk. This can be very expensive.
|
// the ROM listing is read from disk. This can be very expensive.
|
||||||
if(myBaseDialog == NULL)
|
if(myBaseDialog == NULL)
|
||||||
myBaseDialog = new LauncherDialog(myOSystem, 0, 0, kLauncherWidth, kLauncherHeight);
|
myBaseDialog = new LauncherDialog(myOSystem, this,
|
||||||
|
0, 0, kLauncherWidth, kLauncherHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -13,20 +13,20 @@
|
||||||
// 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: LauncherDialog.cxx,v 1.5 2005-05-10 01:12:59 stephena Exp $
|
// $Id: LauncherDialog.cxx,v 1.6 2005-05-10 19:20:44 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
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include "OSystem.hxx"
|
#include "OSystem.hxx"
|
||||||
|
#include "Settings.hxx"
|
||||||
#include "FSNode.hxx"
|
#include "FSNode.hxx"
|
||||||
#include "Widget.hxx"
|
#include "Widget.hxx"
|
||||||
#include "ListWidget.hxx"
|
#include "ListWidget.hxx"
|
||||||
#include "Dialog.hxx"
|
#include "Dialog.hxx"
|
||||||
|
#include "DialogContainer.hxx"
|
||||||
#include "GuiUtils.hxx"
|
#include "GuiUtils.hxx"
|
||||||
#include "Event.hxx"
|
|
||||||
#include "EventHandler.hxx"
|
|
||||||
#include "BrowserDialog.hxx"
|
#include "BrowserDialog.hxx"
|
||||||
#include "LauncherDialog.hxx"
|
#include "LauncherDialog.hxx"
|
||||||
|
|
||||||
|
@ -48,11 +48,12 @@ enum {
|
||||||
};
|
};
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
LauncherDialog::LauncherDialog(OSystem* osystem, uInt16 x, uInt16 y,
|
LauncherDialog::LauncherDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
uInt16 w, uInt16 h)
|
uInt16 x, uInt16 y, uInt16 w, uInt16 h)
|
||||||
: Dialog(osystem, x, y, w, h),
|
: Dialog(osystem, parent, x, y, w, h),
|
||||||
myList(NULL),
|
myList(NULL),
|
||||||
myBrowser(NULL)
|
myBrowser(NULL),
|
||||||
|
myGameList(NULL)
|
||||||
{
|
{
|
||||||
// Show game name
|
// Show game name
|
||||||
new StaticTextWidget(this, 10, 8, _w - 20, kLineHeight,
|
new StaticTextWidget(this, 10, 8, _w - 20, kLineHeight,
|
||||||
|
@ -100,17 +101,22 @@ LauncherDialog::LauncherDialog(OSystem* osystem, uInt16 x, uInt16 y,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
// En-/Disable the buttons depending on the list selection
|
|
||||||
updateButtons();
|
|
||||||
|
|
||||||
// Create file browser dialog
|
// Create file browser dialog
|
||||||
//FIXME myBrowser = new BrowserDialog("Select directory with game data");
|
string romdir = instance()->settings().getString("romdir");
|
||||||
|
myBrowser = new BrowserDialog(osystem, parent, "Select ROM directory", romdir,
|
||||||
|
20, 20, _w - 40, _h - 40);
|
||||||
|
|
||||||
|
// Create a game list, which contains all the information about a ROM that
|
||||||
|
// the launcher needs
|
||||||
|
myGameList = new GameList();
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
LauncherDialog::~LauncherDialog()
|
LauncherDialog::~LauncherDialog()
|
||||||
{
|
{
|
||||||
delete myBrowser;
|
delete myBrowser;
|
||||||
|
delete myGameList;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -125,6 +131,9 @@ void LauncherDialog::loadConfig()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void LauncherDialog::close()
|
void LauncherDialog::close()
|
||||||
{
|
{
|
||||||
|
// Save romdir specified by the browser
|
||||||
|
FilesystemNode dir(myBrowser->getResult());
|
||||||
|
instance()->settings().setString("romdir", dir.path());
|
||||||
/*
|
/*
|
||||||
// Save last selection
|
// Save last selection
|
||||||
const int sel = _list->getSelected();
|
const int sel = _list->getSelected();
|
||||||
|
@ -139,7 +148,7 @@ void LauncherDialog::close()
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void LauncherDialog::updateListing()
|
void LauncherDialog::updateListing(bool full_reload)
|
||||||
{
|
{
|
||||||
cerr << "LauncherDialog::updateListing()\n";
|
cerr << "LauncherDialog::updateListing()\n";
|
||||||
|
|
||||||
|
@ -147,19 +156,18 @@ cerr << "LauncherDialog::updateListing()\n";
|
||||||
// If so, we do a full reload from disk (takes quite some time).
|
// If so, we do a full reload from disk (takes quite some time).
|
||||||
// Otherwise, we can use the cache file (which is much faster).
|
// Otherwise, we can use the cache file (which is much faster).
|
||||||
// FIXME - actually implement the following code
|
// FIXME - actually implement the following code
|
||||||
/*
|
bool ROM_DIR_CHANGED = true;
|
||||||
if(... ROM_DIR_CHANGED ...)
|
|
||||||
|
if(ROM_DIR_CHANGED)
|
||||||
loadListFromDisk();
|
loadListFromDisk();
|
||||||
else if( ... CACHE_FILE_EXISTS)
|
// else if( ... CACHE_FILE_EXISTS)
|
||||||
loadListFromCache();
|
// loadListFromCache();
|
||||||
else // we have no other choice
|
else // we have no other choice
|
||||||
loadListFromDisk();
|
loadListFromDisk();
|
||||||
*/
|
|
||||||
|
|
||||||
StringList l;
|
StringList l;
|
||||||
|
|
||||||
FilesystemNode t;
|
FilesystemNode dir(myBrowser->getResult());
|
||||||
FilesystemNode dir(t);//"/local/emulators/atari/roms"); // FIXME
|
|
||||||
FSList files = dir.listDir(FilesystemNode::kListAll);
|
FSList files = dir.listDir(FilesystemNode::kListAll);
|
||||||
files.sort();
|
files.sort();
|
||||||
|
|
||||||
|
@ -199,14 +207,6 @@ cerr << "LauncherDialog::updateListing()\n";
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
myList->setList(l);
|
myList->setList(l);
|
||||||
updateButtons();
|
|
||||||
}
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
||||||
void LauncherDialog::reloadListing()
|
|
||||||
{
|
|
||||||
// FIXME - add bulk of KStella code here wrt loading from disk
|
|
||||||
cerr << "LauncherDialog::reloadListing()\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -331,7 +331,6 @@ void LauncherDialog::handleCommand(CommandSender* sender, uInt32 cmd, uInt32 dat
|
||||||
if(myList->getSelected() >= 0)
|
if(myList->getSelected() >= 0)
|
||||||
{
|
{
|
||||||
string item = myList->getSelectedString();
|
string item = myList->getSelectedString();
|
||||||
cerr << "Game selected: " << item << endl;
|
|
||||||
instance()->createConsole(item);
|
instance()->createConsole(item);
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
@ -339,16 +338,15 @@ void LauncherDialog::handleCommand(CommandSender* sender, uInt32 cmd, uInt32 dat
|
||||||
}
|
}
|
||||||
|
|
||||||
case kLocationCmd:
|
case kLocationCmd:
|
||||||
cerr << "kLocationCmd from LauncherDialog\n";
|
parent()->addDialog(myBrowser);
|
||||||
// instance()->launcher().addDialog(myLocationDialog);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kReloadCmd:
|
case kReloadCmd:
|
||||||
reloadListing();
|
updateListing(true); // force a reload from disk
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kListSelectionChangedCmd:
|
case kListSelectionChangedCmd:
|
||||||
cerr << "change note\n";
|
// cerr << "change note\n";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kQuitCmd:
|
case kQuitCmd:
|
||||||
|
@ -362,13 +360,11 @@ void LauncherDialog::handleCommand(CommandSender* sender, uInt32 cmd, uInt32 dat
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void LauncherDialog::updateButtons()
|
void LauncherDialog::loadListFromDisk()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
void LauncherDialog::loadListFromCache()
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
bool enable = (myList->getSelected() >= 0);
|
|
||||||
if (enable != _startButton->isEnabled()) {
|
|
||||||
_startButton->setEnabled(enable);
|
|
||||||
_startButton->draw();
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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: LauncherDialog.hxx,v 1.2 2005-05-10 01:12:59 stephena Exp $
|
// $Id: LauncherDialog.hxx,v 1.3 2005-05-10 19:20:44 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
|
||||||
|
@ -22,12 +22,14 @@
|
||||||
#ifndef LAUNCHER_DIALOG_HXX
|
#ifndef LAUNCHER_DIALOG_HXX
|
||||||
#define LAUNCHER_DIALOG_HXX
|
#define LAUNCHER_DIALOG_HXX
|
||||||
|
|
||||||
|
class DialogContainer;
|
||||||
class CommandSender;
|
class CommandSender;
|
||||||
class ButtonWidget;
|
class ButtonWidget;
|
||||||
class StaticTextWidget;
|
class StaticTextWidget;
|
||||||
class ListWidget;
|
class ListWidget;
|
||||||
class BrowserDialog;
|
class BrowserDialog;
|
||||||
|
|
||||||
|
#include "GameList.hxx"
|
||||||
#include "Dialog.hxx"
|
#include "Dialog.hxx"
|
||||||
#include "Launcher.hxx"
|
#include "Launcher.hxx"
|
||||||
#include "OSystem.hxx"
|
#include "OSystem.hxx"
|
||||||
|
@ -36,15 +38,14 @@ class BrowserDialog;
|
||||||
class LauncherDialog : public Dialog
|
class LauncherDialog : public Dialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LauncherDialog(OSystem* osystem, uInt16 x, uInt16 y, uInt16 w, uInt16 h);
|
LauncherDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
|
uInt16 x, uInt16 y, uInt16 w, uInt16 h);
|
||||||
~LauncherDialog();
|
~LauncherDialog();
|
||||||
|
|
||||||
virtual void handleCommand(CommandSender* sender, uInt32 cmd, uInt32 data);
|
virtual void handleCommand(CommandSender* sender, uInt32 cmd, uInt32 data);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void updateListing();
|
void updateListing(bool full_reload = false);
|
||||||
void reloadListing();
|
|
||||||
void updateButtons();
|
|
||||||
|
|
||||||
void close();
|
void close();
|
||||||
virtual void addGame();
|
virtual void addGame();
|
||||||
|
@ -56,6 +57,11 @@ class LauncherDialog : public Dialog
|
||||||
ListWidget* myList;
|
ListWidget* myList;
|
||||||
BrowserDialog* myBrowser;
|
BrowserDialog* myBrowser;
|
||||||
StaticTextWidget* myNote;
|
StaticTextWidget* myNote;
|
||||||
|
GameList* myGameList;
|
||||||
|
|
||||||
|
private:
|
||||||
|
void loadListFromDisk();
|
||||||
|
void loadListFromCache();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -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: ListWidget.cxx,v 1.5 2005-05-04 19:04:46 stephena Exp $
|
// $Id: ListWidget.cxx,v 1.6 2005-05-10 19:20:44 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
|
||||||
|
@ -165,9 +165,9 @@ void ListWidget::handleMouseDown(Int32 x, Int32 y, Int32 button, Int32 clickCoun
|
||||||
drawCaret(true);
|
drawCaret(true);
|
||||||
}
|
}
|
||||||
sendCommand(kListSelectionChangedCmd, _selectedItem);
|
sendCommand(kListSelectionChangedCmd, _selectedItem);
|
||||||
|
_boss->instance()->frameBuffer().refresh();
|
||||||
}
|
}
|
||||||
draw();
|
draw();
|
||||||
_boss->instance()->frameBuffer().refresh();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,7 +184,6 @@ void ListWidget::handleMouseUp(Int32 x, Int32 y, Int32 button, Int32 clickCount)
|
||||||
void ListWidget::handleMouseWheel(Int32 x, Int32 y, Int32 direction)
|
void ListWidget::handleMouseWheel(Int32 x, Int32 y, Int32 direction)
|
||||||
{
|
{
|
||||||
_scrollBar->handleMouseWheel(x, y, direction);
|
_scrollBar->handleMouseWheel(x, y, direction);
|
||||||
_boss->instance()->frameBuffer().refresh();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -336,6 +335,8 @@ bool ListWidget::handleKeyDown(uInt16 ascii, Int32 keycode, Int32 modifiers)
|
||||||
sendCommand(kListSelectionChangedCmd, _selectedItem);
|
sendCommand(kListSelectionChangedCmd, _selectedItem);
|
||||||
// also draw scrollbar
|
// also draw scrollbar
|
||||||
_scrollBar->draw();
|
_scrollBar->draw();
|
||||||
|
|
||||||
|
_boss->instance()->frameBuffer().refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
return handled;
|
return handled;
|
||||||
|
|
|
@ -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: ListWidget.hxx,v 1.1 2005-04-04 02:19:22 stephena Exp $
|
// $Id: ListWidget.hxx,v 1.2 2005-05-10 19:20:44 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
|
||||||
|
@ -64,8 +64,8 @@ class ListWidget : public Widget, public CommandSender
|
||||||
virtual void handleMouseDown(Int32 x, Int32 y, Int32 button, Int32 clickCount);
|
virtual void handleMouseDown(Int32 x, Int32 y, Int32 button, Int32 clickCount);
|
||||||
virtual void handleMouseUp(Int32 x, Int32 y, Int32 button, Int32 clickCount);
|
virtual void handleMouseUp(Int32 x, Int32 y, Int32 button, Int32 clickCount);
|
||||||
virtual void handleMouseWheel(Int32 x, Int32 y, Int32 direction);
|
virtual void handleMouseWheel(Int32 x, Int32 y, Int32 direction);
|
||||||
virtual void handleMouseEntered(Int32 button) { _scrollBar->handleMouseLeft(button); }
|
virtual void handleMouseEntered(Int32 button) {};
|
||||||
virtual void handleMouseLeft(Int32 button) { _scrollBar->handleMouseLeft(button); }
|
virtual void handleMouseLeft(Int32 button) {};
|
||||||
virtual bool handleKeyDown(uInt16 ascii, Int32 keycode, Int32 modifiers);
|
virtual bool handleKeyDown(uInt16 ascii, Int32 keycode, Int32 modifiers);
|
||||||
virtual bool handleKeyUp(uInt16 ascii, Int32 keycode, Int32 modifiers);
|
virtual bool handleKeyUp(uInt16 ascii, Int32 keycode, Int32 modifiers);
|
||||||
virtual void handleCommand(CommandSender* sender, uInt32 cmd, uInt32 data);
|
virtual void handleCommand(CommandSender* sender, uInt32 cmd, uInt32 data);
|
||||||
|
|
|
@ -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: Menu.cxx,v 1.8 2005-05-04 21:32:25 stephena Exp $
|
// $Id: Menu.cxx,v 1.9 2005-05-10 19:20:44 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include "Dialog.hxx"
|
#include "Dialog.hxx"
|
||||||
|
@ -38,7 +38,7 @@ Menu::~Menu()
|
||||||
void Menu::initialize()
|
void Menu::initialize()
|
||||||
{
|
{
|
||||||
delete myBaseDialog;
|
delete myBaseDialog;
|
||||||
myBaseDialog = new OptionsDialog(myOSystem);
|
myBaseDialog = new OptionsDialog(myOSystem, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -13,15 +13,15 @@
|
||||||
// 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: OptionsDialog.cxx,v 1.13 2005-05-01 18:57:21 stephena Exp $
|
// $Id: OptionsDialog.cxx,v 1.14 2005-05-10 19:20:44 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
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include "OSystem.hxx"
|
#include "OSystem.hxx"
|
||||||
#include "Menu.hxx"
|
|
||||||
#include "Dialog.hxx"
|
#include "Dialog.hxx"
|
||||||
|
#include "DialogContainer.hxx"
|
||||||
#include "Widget.hxx"
|
#include "Widget.hxx"
|
||||||
#include "Control.hxx"
|
#include "Control.hxx"
|
||||||
#include "VideoDialog.hxx"
|
#include "VideoDialog.hxx"
|
||||||
|
@ -53,13 +53,14 @@ enum {
|
||||||
new ButtonWidget(this, xoffset, yoffset, kBigButtonWidth, 18, label, cmd, hotkey); yoffset += kRowHeight
|
new ButtonWidget(this, xoffset, yoffset, kBigButtonWidth, 18, label, cmd, hotkey); yoffset += kRowHeight
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
OptionsDialog::OptionsDialog(OSystem* osystem)
|
OptionsDialog::OptionsDialog(OSystem* osystem, DialogContainer* parent)
|
||||||
// FIXME - we have to initialize the video system at least once *before*
|
// FIXME - we have to initialize the video system at least once *before*
|
||||||
// creating a new console. For now, just use predefined values.
|
// creating a new console. For now, just use predefined values.
|
||||||
// Eventually, this subsystem will have to take into account screen size changes
|
// Eventually, this subsystem will have to take into account screen size changes
|
||||||
: Dialog(osystem, (osystem->frameBuffer().baseWidth() - kMainMenuWidth) / 2,
|
: Dialog(osystem, parent,
|
||||||
(osystem->frameBuffer().baseHeight() - kMainMenuHeight)/2,
|
(osystem->frameBuffer().baseWidth() - kMainMenuWidth) / 2,
|
||||||
kMainMenuWidth, kMainMenuHeight),
|
(osystem->frameBuffer().baseHeight() - kMainMenuHeight)/2,
|
||||||
|
kMainMenuWidth, kMainMenuHeight),
|
||||||
myVideoDialog(NULL)
|
myVideoDialog(NULL)
|
||||||
{
|
{
|
||||||
int yoffset = 7;
|
int yoffset = 7;
|
||||||
|
@ -85,27 +86,27 @@ OptionsDialog::OptionsDialog(OSystem* osystem)
|
||||||
// Now create all the dialogs attached to each menu button
|
// Now create all the dialogs attached to each menu button
|
||||||
w = 230; h = 130;
|
w = 230; h = 130;
|
||||||
checkBounds(fbWidth, fbHeight, &x, &y, &w, &h);
|
checkBounds(fbWidth, fbHeight, &x, &y, &w, &h);
|
||||||
myVideoDialog = new VideoDialog(myOSystem, x, y, w, h);
|
myVideoDialog = new VideoDialog(myOSystem, parent, x, y, w, h);
|
||||||
|
|
||||||
w = 200; h = 100;
|
w = 200; h = 100;
|
||||||
checkBounds(fbWidth, fbHeight, &x, &y, &w, &h);
|
checkBounds(fbWidth, fbHeight, &x, &y, &w, &h);
|
||||||
myAudioDialog = new AudioDialog(myOSystem, x, y, w, h);
|
myAudioDialog = new AudioDialog(myOSystem, parent, x, y, w, h);
|
||||||
|
|
||||||
w = 280; h = 170;
|
w = 280; h = 170;
|
||||||
checkBounds(fbWidth, fbHeight, &x, &y, &w, &h);
|
checkBounds(fbWidth, fbHeight, &x, &y, &w, &h);
|
||||||
myEventMappingDialog = new EventMappingDialog(myOSystem, x, y, w, h);
|
myEventMappingDialog = new EventMappingDialog(myOSystem, parent, x, y, w, h);
|
||||||
|
|
||||||
// w = 250; h = 150;
|
// w = 250; h = 150;
|
||||||
// checkBounds(fbWidth, fbHeight, &x, &y, &w, &h);
|
// checkBounds(fbWidth, fbHeight, &x, &y, &w, &h);
|
||||||
// myMiscDialog = new MiscDialog(myOSystem, x, y, w, h);
|
// myMiscDialog = new MiscDialog(myOSystem, parent, x, y, w, h);
|
||||||
|
|
||||||
w = 255; h = 150;
|
w = 255; h = 150;
|
||||||
checkBounds(fbWidth, fbHeight, &x, &y, &w, &h);
|
checkBounds(fbWidth, fbHeight, &x, &y, &w, &h);
|
||||||
myGameInfoDialog = new GameInfoDialog(myOSystem, x, y, w, h);
|
myGameInfoDialog = new GameInfoDialog(myOSystem, parent, x, y, w, h);
|
||||||
|
|
||||||
w = 255; h = 150;
|
w = 255; h = 150;
|
||||||
checkBounds(fbWidth, fbHeight, &x, &y, &w, &h);
|
checkBounds(fbWidth, fbHeight, &x, &y, &w, &h);
|
||||||
myHelpDialog = new HelpDialog(myOSystem, x, y, w, h);
|
myHelpDialog = new HelpDialog(myOSystem, parent, x, y, w, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -135,28 +136,28 @@ void OptionsDialog::handleCommand(CommandSender* sender, uInt32 cmd, uInt32 data
|
||||||
switch(cmd)
|
switch(cmd)
|
||||||
{
|
{
|
||||||
case kVidCmd:
|
case kVidCmd:
|
||||||
instance()->menu().addDialog(myVideoDialog);
|
parent()->addDialog(myVideoDialog);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kAudCmd:
|
case kAudCmd:
|
||||||
instance()->menu().addDialog(myAudioDialog);
|
parent()->addDialog(myAudioDialog);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kEMapCmd:
|
case kEMapCmd:
|
||||||
instance()->menu().addDialog(myEventMappingDialog);
|
parent()->addDialog(myEventMappingDialog);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kMiscCmd:
|
case kMiscCmd:
|
||||||
// instance()->menu().addDialog(myMiscDialog);
|
// parent()->addDialog(myMiscDialog);
|
||||||
cerr << "push MiscDialog to top of stack\n";
|
cerr << "push MiscDialog to top of stack\n";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kInfoCmd:
|
case kInfoCmd:
|
||||||
instance()->menu().addDialog(myGameInfoDialog);
|
parent()->addDialog(myGameInfoDialog);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kHelpCmd:
|
case kHelpCmd:
|
||||||
instance()->menu().addDialog(myHelpDialog);
|
parent()->addDialog(myHelpDialog);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -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: OptionsDialog.hxx,v 1.4 2005-03-28 00:04:54 stephena Exp $
|
// $Id: OptionsDialog.hxx,v 1.5 2005-05-10 19:20:44 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
|
||||||
|
@ -25,6 +25,7 @@
|
||||||
class Properties;
|
class Properties;
|
||||||
class CommandSender;
|
class CommandSender;
|
||||||
class Dialog;
|
class Dialog;
|
||||||
|
class DialogContainer;
|
||||||
class VideoDialog;
|
class VideoDialog;
|
||||||
class AudioDialog;
|
class AudioDialog;
|
||||||
class EventMappingDialog;
|
class EventMappingDialog;
|
||||||
|
@ -38,7 +39,7 @@ class HelpDialog;
|
||||||
class OptionsDialog : public Dialog
|
class OptionsDialog : public Dialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
OptionsDialog(OSystem* osystem);
|
OptionsDialog(OSystem* osystem, DialogContainer* parent);
|
||||||
~OptionsDialog();
|
~OptionsDialog();
|
||||||
|
|
||||||
virtual void handleCommand(CommandSender* sender, uInt32 cmd, uInt32 data);
|
virtual void handleCommand(CommandSender* sender, uInt32 cmd, uInt32 data);
|
||||||
|
|
|
@ -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: PopUpWidget.cxx,v 1.4 2005-04-04 02:19:22 stephena Exp $
|
// $Id: PopUpWidget.cxx,v 1.5 2005-05-10 19:20:44 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
|
||||||
|
@ -44,7 +44,7 @@ static uInt32 up_down_arrows[8] = {
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
PopUpDialog::PopUpDialog(PopUpWidget* boss, Int32 clickX, Int32 clickY)
|
PopUpDialog::PopUpDialog(PopUpWidget* boss, Int32 clickX, Int32 clickY)
|
||||||
: Dialog(boss->instance(), 0, 0, 16, 16),
|
: Dialog(boss->instance(), boss->parent(), 0, 0, 16, 16),
|
||||||
_popUpBoss(boss)
|
_popUpBoss(boss)
|
||||||
{
|
{
|
||||||
// Copy the selection index
|
// Copy the selection index
|
||||||
|
|
|
@ -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: ScrollBarWidget.cxx,v 1.2 2005-04-24 20:36:36 stephena Exp $
|
// $Id: ScrollBarWidget.cxx,v 1.3 2005-05-10 19:20:44 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
|
||||||
|
@ -118,8 +118,6 @@ void ScrollBarWidget::handleMouseDown(Int32 x, Int32 y, Int32 button,
|
||||||
|
|
||||||
// Make sure that _currentPos is still inside the bounds
|
// Make sure that _currentPos is still inside the bounds
|
||||||
checkBounds(old_pos);
|
checkBounds(old_pos);
|
||||||
|
|
||||||
_boss->instance()->frameBuffer().refresh();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -127,7 +125,6 @@ void ScrollBarWidget::handleMouseUp(Int32 x, Int32 y, Int32 button,
|
||||||
Int32 clickCount)
|
Int32 clickCount)
|
||||||
{
|
{
|
||||||
_draggingPart = kNoPart;
|
_draggingPart = kNoPart;
|
||||||
_boss->instance()->frameBuffer().refresh();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -145,7 +142,6 @@ void ScrollBarWidget::handleMouseWheel(Int32 x, Int32 y, Int32 direction)
|
||||||
|
|
||||||
// Make sure that _currentPos is still inside the bounds
|
// Make sure that _currentPos is still inside the bounds
|
||||||
checkBounds(old_pos);
|
checkBounds(old_pos);
|
||||||
_boss->instance()->frameBuffer().refresh();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -186,9 +182,13 @@ void ScrollBarWidget::handleMouseMoved(Int32 x, Int32 y, Int32 button)
|
||||||
_part = kSliderPart;
|
_part = kSliderPart;
|
||||||
|
|
||||||
if (old_part != _part)
|
if (old_part != _part)
|
||||||
|
{
|
||||||
draw();
|
draw();
|
||||||
|
|
||||||
|
// Refresh the FB, since the selected part has changed
|
||||||
|
_boss->instance()->frameBuffer().refresh();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_boss->instance()->frameBuffer().refresh();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -222,7 +222,7 @@ void ScrollBarWidget::checkBounds(Int32 old_pos)
|
||||||
|
|
||||||
if (old_pos != _currentPos)
|
if (old_pos != _currentPos)
|
||||||
{
|
{
|
||||||
recalc();
|
recalc(); // This takes care of the required refresh
|
||||||
draw();
|
draw();
|
||||||
sendCommand(kSetPositionCmd, _currentPos);
|
sendCommand(kSetPositionCmd, _currentPos);
|
||||||
}
|
}
|
||||||
|
@ -247,6 +247,8 @@ void ScrollBarWidget::recalc()
|
||||||
_sliderHeight = _h - 2 * UP_DOWN_BOX_HEIGHT;
|
_sliderHeight = _h - 2 * UP_DOWN_BOX_HEIGHT;
|
||||||
_sliderPos = UP_DOWN_BOX_HEIGHT;
|
_sliderPos = UP_DOWN_BOX_HEIGHT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_boss->instance()->frameBuffer().refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -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: VideoDialog.cxx,v 1.9 2005-05-05 00:10:49 stephena Exp $
|
// $Id: VideoDialog.cxx,v 1.10 2005-05-10 19:20:44 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
|
||||||
|
@ -40,8 +40,9 @@ enum {
|
||||||
};
|
};
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
VideoDialog::VideoDialog(OSystem* osystem, uInt16 x, uInt16 y, uInt16 w, uInt16 h)
|
VideoDialog::VideoDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
: Dialog(osystem, x, y, w, h)
|
uInt16 x, uInt16 y, uInt16 w, uInt16 h)
|
||||||
|
: Dialog(osystem, parent, x, y, w, h)
|
||||||
{
|
{
|
||||||
int yoff = 10,
|
int yoff = 10,
|
||||||
xoff = 2,
|
xoff = 2,
|
||||||
|
|
|
@ -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: VideoDialog.hxx,v 1.3 2005-03-26 19:26:48 stephena Exp $
|
// $Id: VideoDialog.hxx,v 1.4 2005-05-10 19:20:44 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
|
||||||
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
class CommandSender;
|
class CommandSender;
|
||||||
class Dialog;
|
class Dialog;
|
||||||
|
class DialogContainer;
|
||||||
class PopUpWidget;
|
class PopUpWidget;
|
||||||
class SliderWidget;
|
class SliderWidget;
|
||||||
class StaticTextWidget;
|
class StaticTextWidget;
|
||||||
|
@ -35,7 +36,8 @@ class CheckboxWidget;
|
||||||
class VideoDialog : public Dialog
|
class VideoDialog : public Dialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
VideoDialog(OSystem* osystem, uInt16 x, uInt16 y, uInt16 w, uInt16 h);
|
VideoDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
|
uInt16 x, uInt16 y, uInt16 w, uInt16 h);
|
||||||
~VideoDialog();
|
~VideoDialog();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -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: Widget.cxx,v 1.7 2005-04-04 02:19:22 stephena Exp $
|
// $Id: Widget.cxx,v 1.8 2005-05-10 19:20:44 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
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
Widget::Widget(GuiObject* boss, Int32 x, Int32 y, Int32 w, Int32 h)
|
Widget::Widget(GuiObject* boss, Int32 x, Int32 y, Int32 w, Int32 h)
|
||||||
: GuiObject(boss->instance(), x, y, w, h),
|
: GuiObject(boss->instance(), boss->parent(), x, y, w, h),
|
||||||
_type(0),
|
_type(0),
|
||||||
_boss(boss),
|
_boss(boss),
|
||||||
_id(0),
|
_id(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: FSNodePOSIX.cxx,v 1.1 2005-05-09 18:58:19 stephena Exp $
|
// $Id: FSNodePOSIX.cxx,v 1.2 2005-05-10 19:20:44 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
|
||||||
|
@ -78,12 +78,10 @@ AbstractFilesystemNode* FilesystemNode::getRoot()
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
#ifdef MACOSX
|
|
||||||
AbstractFilesystemNode* FilesystemNode::getNodeForPath(const string& path)
|
AbstractFilesystemNode* FilesystemNode::getNodeForPath(const string& path)
|
||||||
{
|
{
|
||||||
return new POSIXFilesystemNode(path);
|
return new POSIXFilesystemNode(path);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
POSIXFilesystemNode::POSIXFilesystemNode()
|
POSIXFilesystemNode::POSIXFilesystemNode()
|
||||||
|
|
|
@ -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: SettingsUNIX.cxx,v 1.11 2005-05-02 19:36:05 stephena Exp $
|
// $Id: SettingsUNIX.cxx,v 1.12 2005-05-10 19:20:45 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
@ -48,8 +48,7 @@ SettingsUNIX::SettingsUNIX(OSystem* osystem)
|
||||||
string systemConfigFile = "/etc/stellarc";
|
string systemConfigFile = "/etc/stellarc";
|
||||||
myOSystem->setConfigFiles(userConfigFile, systemConfigFile);
|
myOSystem->setConfigFiles(userConfigFile, systemConfigFile);
|
||||||
|
|
||||||
// This argument is only valid for Linux/UNIX, and will eventually
|
// This argument is only valid for Linux/UNIX, and will eventually be removed
|
||||||
// be removed
|
|
||||||
set("accurate", "false");
|
set("accurate", "false");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue