Ticket #8107: stump2.patch

File stump2.patch, 1.8 KB (added by SF/doren, 22 years ago)
Line 
1diff scumm/dialogs.cpp scumm/new/dialogs.cpp
2644a645,668
3> InfoDialog::InfoDialog(NewGui *gui, Scumm *scumm, int res)
4> : ScummDialog(gui, scumm, 0, 80, 0, 16) // dummy x and w
5> {
6> setInfoText (queryResString (res));
7> }
8>
9> InfoDialog::InfoDialog(NewGui *gui, Scumm *scumm, const String& message)
10> : ScummDialog(gui, scumm, 0, 80, 0, 16) // dummy x and w
11> {
12> setInfoText (message);
13> }
14>
15> void InfoDialog::setInfoText(const String& message)
16> {
17> int width = _gui -> getStringWidth (message.c_str ()) + 16;
18>
19> _x = _scumm -> (_realWidth - width) >> 1;
20> _w = width;
21>
22> new StaticTextWidget(this, 4, 4, _w-8, _h, message, kTextAlignCenter);
23> }
24>
25> #pragma mark -
26>
27646c670
28< : ScummDialog(gui, scumm, 35, 80, 250, 16)
29---
30> : InfoDialog(gui, scumm, 10)
31648d671
32< addResText(4, 4, 250-8, 16, 10);
33diff scumm/dialogs.h scumm/new/dialogs.h
34112c112
35< class PauseDialog : public ScummDialog {
36---
37> class InfoDialog : public ScummDialog {
38114c114,117
39< PauseDialog(NewGui *gui, Scumm *scumm);
40---
41> // arbitrary message
42> InfoDialog(NewGui *gui, Scumm *scumm, const String& message);
43> // from resources
44> InfoDialog(NewGui *gui, Scumm *scumm, int res);
45124a128,134
46> protected:
47> void setInfoText (const String& message);
48> };
49>
50> class PauseDialog : public InfoDialog {
51> public:
52> PauseDialog(NewGui *gui, Scumm *scumm);
53diff scumm/string.cpp scumm/new/string.cpp
5425a26
55> #include "dialogs.h"
56173,175c174,177
57< // TODO - it appears the this function should display the given message graphically
58< // to the user in a "dialog" looking like the pause dialog, i.e. a single line.
59< warning("unkMessage2(\"%s\")", buf);
60---
61> InfoDialog* dialog = new InfoDialog (_newgui, this, (char*) buf);
62> runDialog (dialog);
63> delete dialog;
64>