SCUMM: Moved SessionSelector dialog to Scumm namespace

This commit is contained in:
Eugene Sandulenko 2023-03-06 16:49:07 +01:00
parent 13dbe49b44
commit 34e2d342c5
No known key found for this signature in database
GPG Key ID: 014D387312D34F08
3 changed files with 17 additions and 17 deletions

View File

@ -31,7 +31,7 @@
#include "scumm/dialog-sessionselector.h"
namespace GUI {
namespace Scumm {
enum {
kOkCmd = 'OK ',
@ -46,22 +46,22 @@ SessionSelectorDialog::SessionSelectorDialog(Scumm::ScummEngine_v90he *vm)
_timestamp = 0;
_queryProgressText = new StaticTextWidget(this, "SessionSelector.QueryProgressText",
_queryProgressText = new GUI::StaticTextWidget(this, "SessionSelector.QueryProgressText",
_("Querying games..."));
_queryProgressText->setAlign(Graphics::kTextAlignCenter);
_list = new ListWidget(this, "SessionSelector.SessionList");
_list = new GUI::ListWidget(this, "SessionSelector.SessionList");
_list->setEditable(false);
_list->setNumberingMode(kListNumberingOff);
_list->setNumberingMode(GUI::kListNumberingOff);
_joinButton = new ButtonWidget(this, "SessionSelector.Join", _("Join"), Common::U32String(), kOkCmd, Common::ASCII_RETURN);
_joinButton = new GUI::ButtonWidget(this, "SessionSelector.Join", _("Join"), Common::U32String(), kOkCmd, Common::ASCII_RETURN);
_joinButton->setEnabled(false);
new ButtonWidget(this, "SessionSelector.Cancel", _("Cancel"), Common::U32String(), kCancelCmd, Common::ASCII_ESCAPE);
new GUI::ButtonWidget(this, "SessionSelector.Cancel", _("Cancel"), Common::U32String(), kCancelCmd, Common::ASCII_ESCAPE);
}
void SessionSelectorDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
void SessionSelectorDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) {
switch (cmd) {
case GUI::kListSelectionChangedCmd:
_timestamp = g_system->getMillis();
@ -109,8 +109,8 @@ void SessionSelectorDialog::handleTickle() {
_timestamp = g_system->getMillis();
}
drawDialog(kDrawLayerForeground);
drawDialog(GUI::kDrawLayerForeground);
}
} // End of namespace GUI
} // End of namespace Scumm

View File

@ -33,7 +33,7 @@
#include "scumm/he/net/net_main.h"
#include "scumm/he/net/net_defines.h"
namespace GUI {
namespace Scumm {
class StaticTextWidget;
@ -41,21 +41,21 @@ class SessionSelectorDialog : public Dialog {
public:
SessionSelectorDialog(Scumm::ScummEngine_v90he *vm);
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) override;
void handleTickle() override;
private:
Scumm::ScummEngine_v90he *_vm;
ScummEngine_v90he *_vm;
uint32 _timestamp;
Widget *_joinButton;
StaticTextWidget *_queryProgressText;
GUI::Widget *_joinButton;
GUI::StaticTextWidget *_queryProgressText;
ListWidget *_list;
GUI::ListWidget *_list;
};
} // End of namespace GUI
} // End of namespace Scumm
#endif

View File

@ -3473,7 +3473,7 @@ int ScummEngine_v90he::networkSessionDialog() {
return -1;
// Joining a session
GUI::SessionSelectorDialog sessionDialog(this);
SessionSelectorDialog sessionDialog(this);
return runDialog(sessionDialog);
}
#endif