aboutsummaryrefslogtreecommitdiff
path: root/engines/m4/dialogs.h
diff options
context:
space:
mode:
authorPaul Gilbert2010-01-30 09:21:07 +0000
committerPaul Gilbert2010-01-30 09:21:07 +0000
commit3285a4ba4d585739577176baddd8f48478d2f229 (patch)
tree86f8e10aab8e619116721398918bca88abf4ce5d /engines/m4/dialogs.h
parent28aee9c5f3462cd72db0b91b7f578649869738d5 (diff)
downloadscummvm-rg350-3285a4ba4d585739577176baddd8f48478d2f229.tar.gz
scummvm-rg350-3285a4ba4d585739577176baddd8f48478d2f229.tar.bz2
scummvm-rg350-3285a4ba4d585739577176baddd8f48478d2f229.zip
Beginnings of a separation of the MADS and M4 engines into separate classes. This will be cleaner then having checks everywhere for whether the game mode is MADS or M4.
svn-id: r47705
Diffstat (limited to 'engines/m4/dialogs.h')
-rw-r--r--engines/m4/dialogs.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/engines/m4/dialogs.h b/engines/m4/dialogs.h
index 057164fe62..190a06c267 100644
--- a/engines/m4/dialogs.h
+++ b/engines/m4/dialogs.h
@@ -42,6 +42,8 @@ public:
DialogLine() { data[0] = '\0'; xp = 0; underline = barLine = false; }
};
+typedef void (*GetValueFn)(MadsM4Engine *vm, int result);
+
class Dialog: public View {
private:
Common::Array<DialogLine> _lines;
@@ -63,13 +65,15 @@ private:
void addBarLine();
void getVocab(int vocabId, char **line);
bool handleNounSuffix(char *destP, int nounNum, const char *srcP);
+ void setupInputArea();
void draw();
public:
- Dialog(M4Engine *vm, const char *msgData, const char *title = NULL);
- Dialog(M4Engine *vm, int widthChars, const char **descEntries);
+ Dialog(MadsM4Engine *vm, const char *msgData, const char *title = NULL);
+ Dialog(MadsM4Engine *vm, int widthChars);
virtual ~Dialog();
- static void display(M4Engine *vm, int widthChars, const char **descEntries);
+ static void display(MadsM4Engine *vm, int widthChars, const char **descEntries);
+ static void getValue(MadsM4Engine *vm, const char *title, const char *text, int numChars, int currentValue);
bool onEvent(M4EventType eventType, int32 param1, int x, int y, bool &captureEvents);
};