|
|
|
@ -52,6 +52,21 @@ namespace MWScript
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class OpGetButtonPressed : public Interpreter::Opcode0
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
virtual void execute (Interpreter::Runtime& runtime)
|
|
|
|
|
{
|
|
|
|
|
InterpreterContext& context =
|
|
|
|
|
static_cast<InterpreterContext&> (runtime.getContext());
|
|
|
|
|
|
|
|
|
|
MWWorld::Ptr ptr = context.getReference();
|
|
|
|
|
|
|
|
|
|
runtime.push (context.getWindowManager().readPressedButton());
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const int opcodeEnableBirthMenu = 0x200000e;
|
|
|
|
|
const int opcodeEnableClassMenu = 0x200000f;
|
|
|
|
|
const int opcodeEnableNameMenu = 0x2000010;
|
|
|
|
@ -63,6 +78,7 @@ namespace MWScript
|
|
|
|
|
const int opcodeEnableStatsMenu = 0x2000016;
|
|
|
|
|
const int opcodeEnableRest = 0x2000017;
|
|
|
|
|
const int opcodeShowRestMenu = 0x2000018;
|
|
|
|
|
const int opcodeGetButtonPressed = 0x2000137;
|
|
|
|
|
|
|
|
|
|
void registerExtensions (Compiler::Extensions& extensions)
|
|
|
|
|
{
|
|
|
|
@ -82,6 +98,8 @@ namespace MWScript
|
|
|
|
|
extensions.registerInstruction ("enablelevelupmenu", "", opcodeEnableRest);
|
|
|
|
|
|
|
|
|
|
extensions.registerInstruction ("showrestmenu", "", opcodeShowRestMenu);
|
|
|
|
|
|
|
|
|
|
extensions.registerFunction ("getbuttonpressed", 'l', "", opcodeGetButtonPressed);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void installOpcodes (Interpreter::Interpreter& interpreter)
|
|
|
|
@ -115,6 +133,8 @@ namespace MWScript
|
|
|
|
|
|
|
|
|
|
interpreter.installSegment5 (opcodeShowRestMenu,
|
|
|
|
|
new OpShowDialogue (MWGui::GM_Rest));
|
|
|
|
|
|
|
|
|
|
interpreter.installSegment5 (opcodeGetButtonPressed, new OpGetButtonPressed);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|