2005-11-13 22:25:47 +00:00
|
|
|
//============================================================================
|
|
|
|
//
|
2016-12-30 00:00:30 +00:00
|
|
|
// SSSS tt lll lll
|
|
|
|
// SS SS tt ll ll
|
|
|
|
// SS tttttt eeee ll ll aaaa
|
2005-11-13 22:25:47 +00:00
|
|
|
// 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
|
|
|
|
//
|
2017-12-29 20:40:37 +00:00
|
|
|
// Copyright (c) 1995-2018 by Bradford W. Mott, Stephen Anthony
|
2010-04-10 21:37:23 +00:00
|
|
|
// and the Stella Team
|
2005-11-13 22:25:47 +00:00
|
|
|
//
|
2010-01-10 03:23:32 +00:00
|
|
|
// See the file "License.txt" for information on usage and redistribution of
|
2005-11-13 22:25:47 +00:00
|
|
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
|
|
|
//============================================================================
|
|
|
|
|
|
|
|
#ifndef INPUT_DIALOG_HXX
|
|
|
|
#define INPUT_DIALOG_HXX
|
|
|
|
|
|
|
|
class OSystem;
|
|
|
|
class GuiObject;
|
|
|
|
class TabWidget;
|
|
|
|
class EventMappingWidget;
|
2009-08-05 20:33:40 +00:00
|
|
|
class CheckboxWidget;
|
2008-04-11 17:56:35 +00:00
|
|
|
class EditTextWidget;
|
2017-11-20 19:28:32 +00:00
|
|
|
class JoystickDialog;
|
2005-11-13 22:25:47 +00:00
|
|
|
class PopUpWidget;
|
2005-11-14 17:01:19 +00:00
|
|
|
class SliderWidget;
|
|
|
|
class StaticTextWidget;
|
2017-11-20 19:28:32 +00:00
|
|
|
namespace GUI {
|
|
|
|
class MessageBox;
|
|
|
|
}
|
2005-11-13 22:25:47 +00:00
|
|
|
|
|
|
|
#include "Dialog.hxx"
|
|
|
|
#include "bspf.hxx"
|
|
|
|
|
|
|
|
class InputDialog : public Dialog
|
|
|
|
{
|
|
|
|
public:
|
2014-10-26 17:45:42 +00:00
|
|
|
InputDialog(OSystem& osystem, DialogContainer& parent,
|
2010-08-03 21:04:58 +00:00
|
|
|
const GUI::Font& font, int max_w, int max_h);
|
2017-11-20 19:28:32 +00:00
|
|
|
virtual ~InputDialog();
|
2005-11-13 22:25:47 +00:00
|
|
|
|
2015-07-10 18:59:03 +00:00
|
|
|
private:
|
|
|
|
void handleKeyDown(StellaKey key, StellaMod mod) override;
|
|
|
|
void handleJoyDown(int stick, int button) override;
|
|
|
|
void handleJoyAxis(int stick, int axis, int value) override;
|
2017-12-15 00:34:19 +00:00
|
|
|
bool handleJoyHat(int stick, int hat, JoyHat value) override;
|
2015-07-10 18:59:03 +00:00
|
|
|
void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
|
2005-11-13 22:25:47 +00:00
|
|
|
|
2015-07-10 18:59:03 +00:00
|
|
|
void loadConfig() override;
|
|
|
|
void saveConfig() override;
|
|
|
|
void setDefaults() override;
|
2005-11-13 22:25:47 +00:00
|
|
|
|
2010-08-21 23:08:44 +00:00
|
|
|
void addDevicePortTab(const GUI::Font& font);
|
2005-11-14 17:01:19 +00:00
|
|
|
|
2017-10-02 22:27:21 +00:00
|
|
|
void eraseEEPROM();
|
|
|
|
|
2005-11-13 22:25:47 +00:00
|
|
|
private:
|
2006-11-19 00:48:55 +00:00
|
|
|
enum {
|
2017-10-05 06:26:11 +00:00
|
|
|
kDeadzoneChanged = 'DZch',
|
|
|
|
kDPSpeedChanged = 'PDch',
|
|
|
|
kMPSpeedChanged = 'PMch',
|
|
|
|
kTBSpeedChanged = 'TBch',
|
|
|
|
kDBButtonPressed = 'DBbp',
|
|
|
|
kEEButtonPressed = 'EEbp',
|
|
|
|
kConfirmEEEraseCmd = 'EEcf'
|
2006-11-19 00:48:55 +00:00
|
|
|
};
|
|
|
|
|
2005-11-13 22:25:47 +00:00
|
|
|
TabWidget* myTab;
|
|
|
|
|
2006-05-05 18:00:51 +00:00
|
|
|
EventMappingWidget* myEmulEventMapper;
|
|
|
|
EventMappingWidget* myMenuEventMapper;
|
2005-11-14 17:01:19 +00:00
|
|
|
|
2018-01-27 19:31:03 +00:00
|
|
|
CheckboxWidget* mySAPort;
|
2013-08-24 18:40:02 +00:00
|
|
|
PopUpWidget* myMouseControl;
|
2015-06-28 18:16:33 +00:00
|
|
|
PopUpWidget* myCursorState;
|
2005-11-14 17:01:19 +00:00
|
|
|
|
Some fixes for 'small screen' functionality. The lower bound of 320x240
is now enforced in more areas of the code, specifically, in BrowserDialog,
VideoDialog and InputDialog.
Rearranged some options in InputDialog (for spacing), and removed the
'mouse is paddle ...' option. It was never being saved to the config
file anyway, and is still selectable with Ctrl-0,1,2,3 keys.
Added 'maxres' commandline argument, which overrides the built-in
determination of desktop size normally done by SDL. This is not
documented, and is not meant to be used by anyone other than those
testing Stella on 'small' systems. It's basically a way to set the
desktop size without recompiling Stella each time.
Still TODO is look at all other dialogs, making sure they fit in the
minimum size. PopupDialog in particular needs to be fixed.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1942 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-02-13 18:34:24 +00:00
|
|
|
EditTextWidget* myAVoxPort;
|
|
|
|
|
2008-05-11 21:18:35 +00:00
|
|
|
SliderWidget* myDeadzone;
|
|
|
|
StaticTextWidget* myDeadzoneLabel;
|
2011-05-06 14:29:39 +00:00
|
|
|
SliderWidget* myDPaddleSpeed;
|
|
|
|
SliderWidget* myMPaddleSpeed;
|
2017-08-02 18:37:02 +00:00
|
|
|
SliderWidget* myTrackBallSpeed;
|
2011-05-06 14:29:39 +00:00
|
|
|
StaticTextWidget* myDPaddleLabel;
|
|
|
|
StaticTextWidget* myMPaddleLabel;
|
2017-08-02 18:37:02 +00:00
|
|
|
StaticTextWidget* myTrackBallLabel;
|
2009-08-05 20:33:40 +00:00
|
|
|
CheckboxWidget* myAllowAll4;
|
2011-06-02 20:53:01 +00:00
|
|
|
CheckboxWidget* myGrabMouse;
|
2014-12-24 18:49:26 +00:00
|
|
|
CheckboxWidget* myCtrlCombo;
|
2014-12-23 00:44:09 +00:00
|
|
|
|
|
|
|
ButtonWidget* myJoyDlgButton;
|
2017-10-02 22:27:21 +00:00
|
|
|
ButtonWidget* myEraseEEPROMButton;
|
2014-12-23 00:44:09 +00:00
|
|
|
|
|
|
|
// Show the list of joysticks that the eventhandler knows about
|
|
|
|
unique_ptr<JoystickDialog> myJoyDialog;
|
2015-04-26 19:02:42 +00:00
|
|
|
|
2017-10-05 06:26:11 +00:00
|
|
|
// Show a message about the dangers of using this function
|
|
|
|
unique_ptr<GUI::MessageBox> myConfirmMsg;
|
|
|
|
|
|
|
|
// Maximum width and height for this dialog
|
|
|
|
int myMaxWidth, myMaxHeight;
|
|
|
|
|
2015-04-26 19:02:42 +00:00
|
|
|
private:
|
|
|
|
// Following constructors and assignment operators not supported
|
|
|
|
InputDialog() = delete;
|
|
|
|
InputDialog(const InputDialog&) = delete;
|
|
|
|
InputDialog(InputDialog&&) = delete;
|
|
|
|
InputDialog& operator=(const InputDialog&) = delete;
|
|
|
|
InputDialog& operator=(InputDialog&&) = delete;
|
2005-11-13 22:25:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|