mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-10 03:40:25 +00:00
SCUMM: Moved SessionSelector dialog to Scumm namespace
This commit is contained in:
parent
13dbe49b44
commit
34e2d342c5
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include "scumm/dialog-sessionselector.h"
|
#include "scumm/dialog-sessionselector.h"
|
||||||
|
|
||||||
namespace GUI {
|
namespace Scumm {
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
kOkCmd = 'OK ',
|
kOkCmd = 'OK ',
|
||||||
@ -46,22 +46,22 @@ SessionSelectorDialog::SessionSelectorDialog(Scumm::ScummEngine_v90he *vm)
|
|||||||
|
|
||||||
_timestamp = 0;
|
_timestamp = 0;
|
||||||
|
|
||||||
_queryProgressText = new StaticTextWidget(this, "SessionSelector.QueryProgressText",
|
_queryProgressText = new GUI::StaticTextWidget(this, "SessionSelector.QueryProgressText",
|
||||||
_("Querying games..."));
|
_("Querying games..."));
|
||||||
|
|
||||||
_queryProgressText->setAlign(Graphics::kTextAlignCenter);
|
_queryProgressText->setAlign(Graphics::kTextAlignCenter);
|
||||||
|
|
||||||
_list = new ListWidget(this, "SessionSelector.SessionList");
|
_list = new GUI::ListWidget(this, "SessionSelector.SessionList");
|
||||||
_list->setEditable(false);
|
_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);
|
_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) {
|
switch (cmd) {
|
||||||
case GUI::kListSelectionChangedCmd:
|
case GUI::kListSelectionChangedCmd:
|
||||||
_timestamp = g_system->getMillis();
|
_timestamp = g_system->getMillis();
|
||||||
@ -109,8 +109,8 @@ void SessionSelectorDialog::handleTickle() {
|
|||||||
_timestamp = g_system->getMillis();
|
_timestamp = g_system->getMillis();
|
||||||
}
|
}
|
||||||
|
|
||||||
drawDialog(kDrawLayerForeground);
|
drawDialog(GUI::kDrawLayerForeground);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} // End of namespace GUI
|
} // End of namespace Scumm
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#include "scumm/he/net/net_main.h"
|
#include "scumm/he/net/net_main.h"
|
||||||
#include "scumm/he/net/net_defines.h"
|
#include "scumm/he/net/net_defines.h"
|
||||||
|
|
||||||
namespace GUI {
|
namespace Scumm {
|
||||||
|
|
||||||
class StaticTextWidget;
|
class StaticTextWidget;
|
||||||
|
|
||||||
@ -41,21 +41,21 @@ class SessionSelectorDialog : public Dialog {
|
|||||||
public:
|
public:
|
||||||
SessionSelectorDialog(Scumm::ScummEngine_v90he *vm);
|
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;
|
void handleTickle() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Scumm::ScummEngine_v90he *_vm;
|
ScummEngine_v90he *_vm;
|
||||||
|
|
||||||
uint32 _timestamp;
|
uint32 _timestamp;
|
||||||
|
|
||||||
Widget *_joinButton;
|
GUI::Widget *_joinButton;
|
||||||
StaticTextWidget *_queryProgressText;
|
GUI::StaticTextWidget *_queryProgressText;
|
||||||
|
|
||||||
ListWidget *_list;
|
GUI::ListWidget *_list;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
} // End of namespace GUI
|
} // End of namespace Scumm
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -3473,7 +3473,7 @@ int ScummEngine_v90he::networkSessionDialog() {
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
// Joining a session
|
// Joining a session
|
||||||
GUI::SessionSelectorDialog sessionDialog(this);
|
SessionSelectorDialog sessionDialog(this);
|
||||||
return runDialog(sessionDialog);
|
return runDialog(sessionDialog);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user