From cb5dcc681f1f41322d3b649902e90133d277c857 Mon Sep 17 00:00:00 2001 From: Treeki Date: Sat, 15 Sep 2012 23:39:54 +0200 Subject: added unfinished PalaceDude --- src/msgbox.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 src/msgbox.h (limited to 'src/msgbox.h') diff --git a/src/msgbox.h b/src/msgbox.h new file mode 100644 index 0000000..032b5c8 --- /dev/null +++ b/src/msgbox.h @@ -0,0 +1,50 @@ +#ifndef MSGBOX_H +#define MSGBOX_H +#include +#include + +class dMsgBoxManager_c : public dStageActor_c { + public: + void showMessage(int id); + + dMsgBoxManager_c() : state(this, &StateID_LoadRes) { } + + int onCreate(); + int onDelete(); + int onExecute(); + int onDraw(); + + int beforeExecute() { return true; } + int afterExecute(int) { return true; } + + m2d::EmbedLayout_c layout; + dDvdLoader_c msgDataLoader; + + bool layoutLoaded; + bool visible; + + dStateWrapper_c state; + + USING_STATES(dMsgBoxManager_c); + DECLARE_STATE(LoadRes); + DECLARE_STATE(Wait); + DECLARE_STATE(BoxAppearWait); + DECLARE_STATE(ShownWait); + DECLARE_STATE(BoxDisappearWait); + + static dMsgBoxManager_c *instance; + static dMsgBoxManager_c *build(); + + private: + struct entry_s { + u32 id; + u32 titleOffset; + u32 msgOffset; + }; + + struct header_s { + u32 count; + entry_s entry[1]; + }; +}; +#endif /* MSGBOX_H */ -- cgit v1.2.3