configure server host and port in enter game

This commit is contained in:
Eduardo Bart
2011-11-16 18:07:52 -02:00
parent 9159e14895
commit fa8291a433
8 changed files with 67 additions and 23 deletions

View File

@@ -27,6 +27,12 @@
#include <framework/graphics/graphics.h>
#include <framework/core/eventdispatcher.h>
void UICheckBox::setup()
{
UIWidget::setup();
setFocusable(false);
}
void UICheckBox::render()
{
if(m_image) {

View File

@@ -28,6 +28,7 @@
class UICheckBox : public UIWidget
{
public:
void setup();
void render();
bool isChecked();

View File

@@ -45,8 +45,6 @@ namespace Otc
static const int ClientVersion = 862;
static const int PicSignature = 0x4E119CBF;
static const char* Host = "sv3.radbr.com";
static const int HostPort = 7171;
enum OsTypes {
OsWindow = 1,

View File

@@ -33,7 +33,7 @@ ProtocolLogin::ProtocolLogin()
enableChecksum();
}
void ProtocolLogin::login(const std::string& accountName, const std::string& accountPassword)
void ProtocolLogin::login(const std::string& host, int port, const std::string& accountName, const std::string& accountPassword)
{
if(accountName.empty() || accountPassword.empty()) {
callLuaField("onError", "You must enter an account name and password.");
@@ -43,7 +43,7 @@ void ProtocolLogin::login(const std::string& accountName, const std::string& acc
m_accountName = accountName;
m_accountPassword = accountPassword;
connect(Otc::Host, Otc::HostPort);
connect(host, port);
}
void ProtocolLogin::onConnect()

View File

@@ -36,7 +36,7 @@ public:
static ProtocolLoginPtr create() { return ProtocolLoginPtr(new ProtocolLogin); }
void login(const std::string& accountName, const std::string& accountPassword);
void login(const std::string& host, int port, const std::string& accountName, const std::string& accountPassword);
void cancelLogin() { disconnect(); }
void onConnect();