GameManager::GameManager() : Frame( gui, "GameManager", rect(0,0,gui->Width(),gui->Height()) ) { mMap = NULL; mPlayer = NULL; mNet = NULL; mLoader = NULL; //mParty = NULL; game = this; buildDirectoryTree(DIR_PROFILE); UpdateAppTitle(); logger.Write("Loading user settings"); LoadUserData(); mMap = NULL; mShowJoinParts = sti(mUserData.GetValue("MapSettings", "JoinParts")); mShowAddresses = sti(mUserData.GetValue("MapSettings", "ShowAddresses")); logger.Write("Starting IrcNet"); mNet = new IrcNet(); mNet->mRealname = "guest"; hookNetListeners(); logger.Write("Loading LocalActor"); mPlayer = new LocalActor(); mPlayer->SetName(mUserData.GetValue("MapSettings", "Nick")); if (mPlayer->GetName().empty()) mPlayer->SetName("fro_user"); timers->AddProcess("gameproc", timer_gameManagerProcess, NULL, this); logger.Write("Initializing Login"); new LoginDialog(); ToggleGameMode(MODE_ACTION); //Backpack* pack = new Backpack(); console->HookCommand("net_info", callback_consoleNetInfo); console->HookCommand("avatarout", callback_consoleOutputAvatar); console->HookCommand("test", callback_consoleTestMap); console->HookCommand("screendraw", callback_consoleScreenDraw); console->HookCommand("drawrects", callback_consoleDrawRects); console->HookCommand("debugmap", callback_consoleMapDebug); console->HookCommand("makecol", callback_consoleMakeCol); console->HookCommand("player_flags", callback_consolePlayerFlags); }
BOOL CLoginPage::OnInitDialog() { CXPropertyPage::OnInitDialog(); g_hLoginWnd=GetSafeHwnd(); GetDlgItem(IDC_CONNECT_STATUS)->SetWindowText(L"Disconnected."); if (LoadUserData()) { WCHAR wTemp[0x100]; MultiByteToWideChar(CP_UTF8, 0, CXfireCore::s_cUserName, -1, wTemp, 0x100); ::SetWindowText(GetDlgItem(IDC_USERNAME)->GetSafeHwnd(),wTemp); MultiByteToWideChar(CP_UTF8, 0, CXfireCore::s_cPassword, -1, wTemp, 0x100); ::SetWindowText(GetDlgItem(IDC_PASSWORD)->GetSafeHwnd(),wTemp); } GetDlgItem(IDC_USERNAME)->GetWindowRect(&rcUsername); GetDlgItem(IDC_PASSWORD)->GetWindowRect(&rcPassword); GetDlgItem(IDC_STATIC_USERNAME)->GetWindowRect(&rcStaticUsername); GetDlgItem(IDC_STATIC_PASSWORD)->GetWindowRect(&rcStaticPassword); GetDlgItem(IDC_CONNECT_STATUS)->GetWindowRect(&rcConnectStatus); GetDlgItem(IDC_SIGNIN_BUTTON)->GetWindowRect(&rcSigninButton); ScreenToClient(&rcSigninButton); ScreenToClient(&rcConnectStatus); ScreenToClient(&rcStaticUsername); ScreenToClient(&rcStaticPassword); ScreenToClient(&rcUsername); ScreenToClient(&rcPassword); nResizeTop=rcUsername.top; bInitCtrlsPos=TRUE; // Create a menu bar return TRUE; // return TRUE unless you set the focus to a control }