mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 22:58:09 +00:00
SHERLOCK: Fix Setup dialog button handling
This commit is contained in:
parent
6d2bde38ec
commit
a81686b0e1
@ -105,7 +105,6 @@ public:
|
||||
Common::Point _over; // Old map position
|
||||
bool _onChessboard;
|
||||
bool _slowChess;
|
||||
bool _joystick;
|
||||
int _keyPadSpeed;
|
||||
public:
|
||||
SherlockEngine(OSystem *syst, const SherlockGameDescription *gameDesc);
|
||||
|
@ -146,7 +146,8 @@ void Settings::drawInteface(bool flag) {
|
||||
SETUP_POINTS[4][3] - screen.stringWidth(tempStr) / 2, tempStr);
|
||||
screen.makeButton(Common::Rect(SETUP_POINTS[5][0], SETUP_POINTS[5][1], SETUP_POINTS[5][2], SETUP_POINTS[5][1] + 10),
|
||||
SETUP_POINTS[5][3] - screen.stringWidth("New Font Style") / 2, "New Font Style");
|
||||
tempStr = Common::String::format("Joystick %s", SETUP_STRS0[_vm->_joystick ? 1 : 0]);
|
||||
|
||||
tempStr = Common::String::format("Joystick %s", SETUP_STRS0[0]);
|
||||
screen.makeButton(Common::Rect(SETUP_POINTS[6][0], SETUP_POINTS[6][1], SETUP_POINTS[6][2], SETUP_POINTS[6][1] + 10),
|
||||
SETUP_POINTS[6][3] - screen.stringWidth(tempStr) / 2, tempStr);
|
||||
screen.makeButton(Common::Rect(SETUP_POINTS[7][0], SETUP_POINTS[7][1], SETUP_POINTS[7][2], SETUP_POINTS[7][1] + 10),
|
||||
@ -221,7 +222,7 @@ int Settings::drawButtons(const Common::Point &pt, int key) {
|
||||
screen.buttonPrint(Common::Point(SETUP_POINTS[idx][3], SETUP_POINTS[idx][1]), color, true, tempStr);
|
||||
break;
|
||||
case 6:
|
||||
tempStr = Common::String::format("Joystick %s", SETUP_STRS0[_vm->_joystick]);
|
||||
tempStr = Common::String::format("Joystick %s", SETUP_STRS0[0]);
|
||||
screen.buttonPrint(Common::Point(SETUP_POINTS[idx][3], SETUP_POINTS[idx][1]), color, true, tempStr);
|
||||
break;
|
||||
case 8:
|
||||
@ -1793,14 +1794,17 @@ void UserInterface::doControls() {
|
||||
|
||||
if ((found == 5 && events._released) || _key == 'N') {
|
||||
// New font style
|
||||
screen.setFont((screen.fontNumber() + 1) & 3);
|
||||
int fontNum = screen.fontNumber() + 1;
|
||||
if (fontNum == 3)
|
||||
fontNum = 0;
|
||||
|
||||
screen.setFont(fontNum);
|
||||
updateConfig = true;
|
||||
settings.drawInteface(true);
|
||||
}
|
||||
|
||||
if ((found == 6 && events._released) || _key == 'J') {
|
||||
// Toggle joystick
|
||||
_vm->_joystick = !_vm->_joystick;
|
||||
updateConfig = true;
|
||||
settings.drawInteface(true);
|
||||
// Toggle joystick - not implemented under ScummVM
|
||||
}
|
||||
|
||||
if ((found == 7 && events._released) || _key == 'C') {
|
||||
|
@ -67,7 +67,7 @@ class Settings {
|
||||
private:
|
||||
SherlockEngine *_vm;
|
||||
public:
|
||||
Settings(SherlockEngine *vm) : _vm() {}
|
||||
Settings(SherlockEngine *vm) : _vm(vm) {}
|
||||
|
||||
void drawInteface(bool flag);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user