mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-22 01:57:16 +00:00
ULTIMA4: Use to keybinder
This commit is contained in:
parent
5144447327
commit
aa04a30eb3
@ -68,6 +68,7 @@ Debugger::Debugger() : Shared::Debugger() {
|
||||
registerCmd("ready", WRAP_METHOD(Debugger, cmdReadyWeapon));
|
||||
registerCmd("search", WRAP_METHOD(Debugger, cmdSearch));
|
||||
registerCmd("talk", WRAP_METHOD(Debugger, cmdTalk));
|
||||
registerCmd("use", WRAP_METHOD(Debugger, cmdUse));
|
||||
|
||||
registerCmd("3d", WRAP_METHOD(Debugger, cmd3d));
|
||||
registerCmd("collisions", WRAP_METHOD(Debugger, cmdCollisions));
|
||||
@ -849,6 +850,20 @@ bool Debugger::cmdTalk(int argc, const char **argv) {
|
||||
return isDebuggerActive();
|
||||
}
|
||||
|
||||
bool Debugger::cmdUse(int argc, const char **argv) {
|
||||
print("Use which item:");
|
||||
|
||||
if (settings._enhancements) {
|
||||
// a little xu4 enhancement: show items in inventory when prompted for an item to use
|
||||
g_context->_stats->setView(STATS_ITEMS);
|
||||
}
|
||||
#ifdef IOS
|
||||
U4IOS::IOSConversationHelper::setIntroString("Use which item?");
|
||||
#endif
|
||||
itemUse(gameGetInput().c_str());
|
||||
return isDebuggerActive();
|
||||
}
|
||||
|
||||
|
||||
bool Debugger::cmd3d(int argc, const char **argv) {
|
||||
if (g_context->_location->_context == CTX_DUNGEON) {
|
||||
|
@ -184,6 +184,12 @@ private:
|
||||
* Talk
|
||||
*/
|
||||
bool cmdTalk(int argc, const char **argv);
|
||||
|
||||
/**
|
||||
* Use
|
||||
*/
|
||||
bool cmdUse(int argc, const char **argv);
|
||||
|
||||
private:
|
||||
/**
|
||||
* Collision detection on/off
|
||||
|
@ -683,19 +683,6 @@ bool GameController::keyPressed(int key) {
|
||||
break;
|
||||
}
|
||||
|
||||
case 'u': {
|
||||
screenMessage("Use which item:\n");
|
||||
if (settings._enhancements) {
|
||||
/* a little xu4 enhancement: show items in inventory when prompted for an item to use */
|
||||
g_context->_stats->setView(STATS_ITEMS);
|
||||
}
|
||||
#ifdef IOS
|
||||
U4IOS::IOSConversationHelper::setIntroString("Use which item?");
|
||||
#endif
|
||||
itemUse(gameGetInput().c_str());
|
||||
break;
|
||||
}
|
||||
|
||||
case 'v':
|
||||
if (g_music->toggle())
|
||||
screenMessage("Volume On!\n");
|
||||
|
@ -63,6 +63,7 @@ static const KeybindingRecord KEYS[] = {
|
||||
{ KEYBIND_READY_WEAPON, "READY-WEAPON", "Ready Weapon", "ready", nullptr },
|
||||
{ KEYBIND_SEARCH, "SEARCH", "Search", "search", "s", nullptr },
|
||||
{ KEYBIND_TALK, "TALK", "Talk", "talk", "t", nullptr },
|
||||
{ KEYBIND_USE, "USE", "Use", "use", "u", nullptr },
|
||||
|
||||
{ KEYBIND_NONE, nullptr, nullptr, nullptr, nullptr, nullptr }
|
||||
};
|
||||
|
@ -35,7 +35,7 @@ enum KeybindingAction {
|
||||
KEYBIND_IGNITE, KEYBIND_JIMMY, KEYBIND_LOCATE, KEYBIND_MIX,
|
||||
KEYBIND_NEW_ORDER, KEYBIND_OPEN_DOOR, KEYBIND_PASS,
|
||||
KEYBIND_PEER, KEYBIND_QUIT_SAVE, KEYBIND_READY_WEAPON,
|
||||
KEYBIND_SEARCH, KEYBIND_TALK,
|
||||
KEYBIND_SEARCH, KEYBIND_TALK, KEYBIND_USE,
|
||||
|
||||
KEYBIND_NONE
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user