DBG: added input boxes in script api
This commit is contained in:
parent
4a6c79ea46
commit
b2a3ef43ea
|
|
@ -1,4 +1,5 @@
|
|||
#include "_scriptapi_gui.h"
|
||||
#include "value.h"
|
||||
|
||||
SCRIPT_EXPORT bool Script::Gui::Disassembly::SelectionGet(duint* start, duint* end)
|
||||
{
|
||||
|
|
@ -115,4 +116,17 @@ SCRIPT_EXPORT void Script::Gui::Message(const char* message)
|
|||
SCRIPT_EXPORT bool Script::Gui::MessageYesNo(const char* message)
|
||||
{
|
||||
return !!GuiScriptMsgyn(message);
|
||||
}
|
||||
|
||||
SCRIPT_EXPORT bool Script::Gui::InputLine(const char* title, char* text)
|
||||
{
|
||||
return GuiGetLineWindow(title, text);
|
||||
}
|
||||
|
||||
SCRIPT_EXPORT bool Script::Gui::InputValue(const char* title, duint* value)
|
||||
{
|
||||
Memory<char*> line(GUI_MAX_LINE_SIZE);
|
||||
if(!GuiGetLineWindow(title, line()))
|
||||
return false;
|
||||
return valfromstring(line(), value);
|
||||
}
|
||||
|
|
@ -47,6 +47,8 @@ SCRIPT_EXPORT duint SelectionGetStart(Window window);
|
|||
SCRIPT_EXPORT duint SelectionGetEnd(Window window);
|
||||
SCRIPT_EXPORT void Message(const char* message);
|
||||
SCRIPT_EXPORT bool MessageYesNo(const char* message);
|
||||
SCRIPT_EXPORT bool InputLine(const char* title, char* text); //text[GUI_MAX_LINE_SIZE]
|
||||
SCRIPT_EXPORT bool InputValue(const char* title, duint* value);
|
||||
|
||||
}; //Gui
|
||||
}; //Script
|
||||
|
|
|
|||
Loading…
Reference in New Issue