aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage/ringworld2/ringworld2_dialogs.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2011-11-01 21:07:57 +1100
committerPaul Gilbert2011-11-01 21:07:57 +1100
commit5ae9c15cdc57ab1f3f07f6e6dcfbee6353d569dd (patch)
treebe4d3f9226ee727069f82a741ea2a8dfe48ebcd8 /engines/tsage/ringworld2/ringworld2_dialogs.cpp
parentacdeb1fb31021f0d563318639b4a261e3b370476 (diff)
downloadscummvm-rg350-5ae9c15cdc57ab1f3f07f6e6dcfbee6353d569dd.tar.gz
scummvm-rg350-5ae9c15cdc57ab1f3f07f6e6dcfbee6353d569dd.tar.bz2
scummvm-rg350-5ae9c15cdc57ab1f3f07f6e6dcfbee6353d569dd.zip
TSAGE: Added display logic for character selection dialog in R2RW
Diffstat (limited to 'engines/tsage/ringworld2/ringworld2_dialogs.cpp')
-rw-r--r--engines/tsage/ringworld2/ringworld2_dialogs.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_dialogs.cpp b/engines/tsage/ringworld2/ringworld2_dialogs.cpp
index 8d4863f332..562ca4cc65 100644
--- a/engines/tsage/ringworld2/ringworld2_dialogs.cpp
+++ b/engines/tsage/ringworld2/ringworld2_dialogs.cpp
@@ -176,6 +176,7 @@ void RightClickDialog::execute() {
break;
case 4:
// Change player
+ CharacterDialog::show();
break;
case 5:
// Options dialog
@@ -188,6 +189,43 @@ void RightClickDialog::execute() {
_gfxManager.deactivate();
}
+/*--------------------------------------------------------------------------*/
+
+void CharacterDialog::show() {
+ CharacterDialog *dlg = new CharacterDialog();
+ dlg->draw();
+
+ GfxButton *btn = dlg->execute(&dlg->_btnCancel);
+
+
+ dlg->remove();
+ delete dlg;
+}
+
+CharacterDialog::CharacterDialog() {
+ // Set the element text
+ _msgTitle.set(CHAR_TITLE, 140, ALIGN_LEFT);
+ _btnQuinn.setText(CHAR_QUINN_MSG);
+ _btnSeeker.setText(CHAR_SEEKER_MSG);
+ _btnMiranda.setText(CHAR_MIRANDA_MSG);
+ _btnCancel.setText(CHAR_CANCEL_MSG);
+
+ // Set position of the elements
+ _msgTitle._bounds.moveTo(5, 5);
+ _btnQuinn._bounds.moveTo(25, _msgTitle._bounds.bottom + 1);
+ _btnSeeker._bounds.moveTo(25, _btnQuinn._bounds.bottom + 1);
+ _btnMiranda._bounds.moveTo(25, _btnSeeker._bounds.bottom + 1);
+ _btnCancel._bounds.moveTo(25, _btnMiranda._bounds.bottom + 1);
+
+ // Add the items to the dialog
+ addElements(&_msgTitle, &_btnQuinn, &_btnSeeker, &_btnMiranda, &_btnCancel, NULL);
+
+ // Set the dialog size and position
+ frame();
+ _bounds.collapse(-6, -6);
+ setCenter(160, 100);
+}
+
} // End of namespace Ringworld2
} // End of namespace TsAGE