//-------------------------------------------------------------------------- // 功能:初始化 //-------------------------------------------------------------------------- void KUiConnectInfo::Initialize() { char Scheme[128]; g_UiBase.GetCurSchemePath(Scheme, 128); m_pSelf->LoadScheme(Scheme); Wnd_AddWindow(this, WL_NORMAL); }
//-------------------------------------------------------------------------- // 功能:初始化 //-------------------------------------------------------------------------- void KUiInformation::Initialize() { m_pCallerWnd = NULL; AddChild(&m_Information); AddChild(&m_FirstBtn); AddChild(&m_SecondBtn); m_Style &= ~WND_S_VISIBLE; Wnd_AddWindow(this, WL_TOPMOST); }
//初始化 void KUiHeaderControlBar::Initialize() { char Scheme[256]; g_UiBase.GetCurSchemePath(Scheme, 256); LoadScheme(Scheme); m_Style &= ~WND_S_VISIBLE; Wnd_AddWindow(this, WL_TOPMOST); }
//-------------------------------------------------------------------------- // 功能:初始化 //-------------------------------------------------------------------------- int KUiSelDlg::Initialize() { AddChild(&m_IlluminateTxt); for (int i = 0; i < KUISEL_MAX_OPTION; i++) AddChild(&m_OptionBtn[i]); m_Style &= ~WND_S_VISIBLE; Wnd_AddWindow(this); return true; }
/********************************************************************* * 功能:初始化 **********************************************************************/ void KUiPopupPasswordQuery::Initialize() { AddChild(&m_Password); AddChild(&m_Confirm); char Scheme[256]; g_UiBase.GetCurSchemePath(Scheme, 256); LoadScheme(Scheme); Wnd_AddWindow(this); }
/********************************************************************* * 功能:初始化 **********************************************************************/ void KUiPortrait::Initialize() { AddChild(&m_Confirm); AddChild(&m_Cancel); AddChild(&m_ScrollBar); char Scheme[256]; g_UiBase.GetCurSchemePath(Scheme, 256); LoadScheme(Scheme); Wnd_AddWindow(this); }
// ------------------------------------------------------------------------- // 功能 : 初始化 // ------------------------------------------------------------------------- void KUiStall::Initialize() { AddChild(&m_Owner); AddChild(&m_CloseBtn); AddChild(&m_ItemBox); char Scheme[256]; g_UiBase.GetCurSchemePath(Scheme, 256); LoadScheme(Scheme); m_ItemBox.SetContainerId((int)UOC_STALL_OTHER); Wnd_AddWindow(this); }
//-------------------------------------------------------------------------- // 功能:初始化 //-------------------------------------------------------------------------- void KUiSelServer::Initialize() { AddChild(&m_List); AddChild(&m_ScrollBar); AddChild(&m_Login); AddChild(&m_Cancel); m_List.SetScrollbar(&m_ScrollBar); char Scheme[256]; g_UiBase.GetCurSchemePath(Scheme, 256); LoadScheme(Scheme); Wnd_AddWindow(this, WL_TOPMOST); }
// Initialize void KUiTaskNote::Initialize() { m_SystemPad.Initialize(); AddPage(&m_SystemPad, &m_BtnSystem); m_PersonalPad.Initialize(); AddPage(&m_PersonalPad, &m_BtnPersonal); AddChild(&m_BtnClose); char Scheme[256]; g_UiBase.GetCurSchemePath(Scheme, sizeof(Scheme)); LoadScheme(Scheme); Wnd_AddWindow(this); }
// ------------------------------------------------------------------------- // 功能 : 初始化 // ------------------------------------------------------------------------- void KUiStoreBox::Initialize() { AddChild(&m_Money); AddChild(&m_GetMoneyBtn); AddChild(&m_CloseBtn); AddChild(&m_ItemBox); m_ItemBox.SetContainerId((int)UOC_STORE_BOX); char Scheme[256]; g_UiBase.GetCurSchemePath(Scheme, 256); LoadScheme(Scheme); m_nMoney = 0; Wnd_AddWindow(this); }
//-------------------------------------------------------------------------- // 功能:初始化 //-------------------------------------------------------------------------- void KUiLogin::Initialize() { AddChild(&m_Account); AddChild(&m_PassWord); AddChild(&m_Login); AddChild(&m_Cancel); AddChild(&m_RememberAccount); AddChild(&m_InvisibleLogin); char Scheme[256]; g_UiBase.GetCurSchemePath(Scheme, 256); LoadScheme(Scheme); Wnd_AddWindow(this, WL_TOPMOST); }
// ------------------------------------------------------------------------- // 函数 : KUiSelPlayer::Initialize // 功能 : 初始化 // ------------------------------------------------------------------------- void KUiSelPlayer::Initialize() { AddChild(&m_btnOk); AddChild(&m_btnCancel); AddChild(&m_btnDel); AddChild(&m_btnNew); AddChild(&m_ButterflyWnd); AddChild(&m_LifeTimeText); char Scheme[128]; g_UiBase.GetCurSchemePath(Scheme, 128); m_pSelf->LoadScheme(Scheme); // 注册本窗口 Wnd_AddWindow(this, WL_TOPMOST); }
//-------------------------------------------------------------------------- // 功能:初始化 //-------------------------------------------------------------------------- void KUiParadeItem::Initialize() { AddChild(&m_Name); AddChild(&m_Title); for (int i = 0; i < _ITEM_COUNT; i ++) { m_EquipBox[i].SetObjectGenre(CGOG_ITEM); AddChild(&m_EquipBox[i]); m_EquipBox[i].SetContainerId((int)UOC_EQUIPTMENT); } AddChild(&m_Close); Wnd_AddWindow(this); }
//-------------------------------------------------------------------------- // 功能:初始化 //-------------------------------------------------------------------------- void KUiInit::Initialize() { AddChild(&m_EnterGame); // AddChild(&m_AutoLogin); AddChild(&m_GameConfig); AddChild(&m_DesignerList); AddChild(&m_ExitGame); m_szLoginBg[0] = 0; char Scheme[256]; g_UiBase.GetCurSchemePath(Scheme, 256); LoadScheme(Scheme); Wnd_AddWindow(this, WL_TOPMOST); }
void KUiNewPlayer2::Initialize() { AddChild(&m_PropertyShow); AddChild(&m_Gold); AddChild(&m_Wood); AddChild(&m_Water); AddChild(&m_Fire); AddChild(&m_Earth); AddChild(&m_OK); AddChild(&m_Cancel); char Scheme[256]; g_UiBase.GetCurSchemePath(Scheme, 256); m_pSelf->LoadScheme(Scheme); Wnd_AddWindow(this, WL_TOPMOST); }
//-------------------------------------------------------------------------- // 功能:初始化 //-------------------------------------------------------------------------- int KUiESCDlg::Initialize() { AddChild(&m_ContinueGameBtn); AddChild(&m_ExitGameBtn); AddChild(&m_OptionsBtn); //AddChild(&m_ExitBtn); AddChild(&m_HelpBtn); //AddChild(&m_TaskBtn); Wnd_AddWindow(this, WL_TOPMOST); char Scheme[256]; g_UiBase.GetCurSchemePath(Scheme, 256); LoadScheme(Scheme); return true; }
//-------------------------------------------------------------------------- // 功能:初始化 //-------------------------------------------------------------------------- void KUiGetString::Initialize(BOOL bNumber) { AddChild(&m_Title); AddChild(&m_StringEdit); AddChild(&m_OkBtn); AddChild(&m_CancelBtn); char Scheme[256]; g_UiBase.GetCurSchemePath(Scheme, 256); LoadScheme(Scheme); if (bNumber) { m_StringEdit.SetLimitLen(9); m_StringEdit.SetType(0); } Wnd_AddWindow(this); }
//-------------------------------------------------------------------------- // 功能:初始化 //-------------------------------------------------------------------------- int KUiFriendInterview::Initialize() { AddChild(&m_MsgList); AddChild(&m_MsgScroll); m_MsgList.SetScrollbar(&m_MsgScroll); AddChild(&m_InputWnd); AddChild(&m_SendBtn); AddChild(&m_ColorBtn); AddChild(&m_CloseBtn); AddChild(&m_FaceBtn); AddChild(&m_FriendName); m_Style &= ~WND_S_VISIBLE; Wnd_AddWindow(this); return true; }
//-------------------------------------------------------------------------- // 功能:初始化 //-------------------------------------------------------------------------- void KUiNewPlayerStartMsg::Initialize() { AddChild(&m_List); AddChild(&m_AdvanceList); AddChild(&m_NewerBtn); AddChild(&m_AdvanceBtn); AddChild(&m_Ok); char Scheme[256]; g_UiBase.GetCurSchemePath(Scheme, 256); LoadScheme(Scheme); LoadList(); m_NewerBtn.CheckButton(true); m_AdvanceBtn.CheckButton(false); m_AdvanceList.Hide(); Wnd_AddWindow(this, WL_TOPMOST); }
//初始化 void KUiSelPlayerNearby::Initialize() { AddChild(&m_PlayerList); AddChild(&m_ListScroll); m_PlayerList.SetScrollbar(&m_ListScroll); AddChild(&m_InputEdit); AddChild(&m_RefreshBtn); AddChild(&m_CancelBtn); Wnd_AddWindow(this); char Buffer[256]; g_UiBase.GetCurSchemePath(Buffer, sizeof(Buffer)); strcat(Buffer, "\\"SCHEME_INI); KIniFile Ini; if (Ini.Load(Buffer)) { LoadScheme(&Ini); } }
/********************************************************************* * 功能:初始化 **********************************************************************/ void KUiTongAssignBox::Initialize() { AddChild(&m_BtnPilgarlic); AddChild(&m_TargetName); AddChild(&m_BtnCaptain); AddChild(&m_BtnConfirm); AddChild(&m_BtnCancel); AddChild(&m_BtnElder); AddChild(&m_TextError); // m_BtnPilgarlic.Hide(); // m_TargetName.Hide(); // m_BtnCaptain.Hide(); // m_BtnConfirm.Hide(); // m_BtnCancel.Hide(); // m_BtnElder.Hide(); // m_BtnConfirm.Enable(FALSE); char Scheme[256]; g_UiBase.GetCurSchemePath(Scheme, 256); LoadScheme(Scheme); Wnd_AddWindow(this); }
//-------------------------------------------------------------------------- // 功能:初始化 //-------------------------------------------------------------------------- void KUiLoginBackGround::Initialize() { AddChild(&m_VersionWnd); m_szConfig[0] = 0; for (int i = 0; i < MAX_NUM_BUTTERFLY; i++) { m_uAdviceIntervalMin[i] = 0; m_uInterval[i] = 0; m_uLastSleepTime[i] = 0; AddChild(&m_Butterflys[i]); } char szVersion[80] = ""; KIniFile* pSetting = g_UiBase.GetCommConfigFile(); if (pSetting) { if (pSetting) pSetting->GetString("Main", "GameVersion", "", szVersion, sizeof(szVersion)); g_UiBase.CloseCommConfigFile(); } m_VersionWnd.SetText(szVersion); Wnd_AddWindow(this, WL_LOWEST); }
int KUiPlayVideo::Initialize() { if (m_bInitialized) return true; m_hVideoDll = LoadLibrary("KLVideo.dll"); if(!m_hVideoDll) return false; // connect bink dll functions m_KLVideoSoundFn = (KLVideoSoundFn)GetProcAddress(m_hVideoDll, "KLVideoSetSoundSystem"); m_KLVideoSndtrackFn = (KLVideoSndtrackFn)GetProcAddress(m_hVideoDll, "KLVideoSetSoundTrack"); m_KLVideoOpen = (KLVideoOpenFn)GetProcAddress(m_hVideoDll, "KLVideoOpen"); m_KLVideoClose = (KLVideoCloseFn)GetProcAddress(m_hVideoDll, "KLVideoClose"); m_KLVideoWait = (KLVideoWaitFn)GetProcAddress(m_hVideoDll, "KLVideoWait"); m_KLVideoToBuffer = (KLVideoToBufferFn)GetProcAddress(m_hVideoDll, "KLVideoCopyToBuffer"); m_KLVideoDoFrame = (KLVideoDoFrameFn)GetProcAddress(m_hVideoDll, "KLVideoDoFrame"); m_KLVideoNextFrame = (KLVideoNextFrameFn)GetProcAddress(m_hVideoDll, "KLVideoNextFrame"); m_KLVideoGetCurrentFrame = (KLVideoGetCurrentFrameFn)GetProcAddress(m_hVideoDll, "KLVideoGetCurrentFrame"); m_KLVideoSetSoundVolume = (KLVideoSetSndVolumeFn)GetProcAddress(m_hVideoDll, "KLVideoSetSoundVolume"); // make sure functions connected // if( !m_KLVideoSoundFn || !m_KLVideoOpen || !m_KLVideoClose || !m_KLVideoWait || !m_KLVideoToBuffer || !m_KLVideoDoFrame || !m_KLVideoNextFrame || !m_KLVideoSndtrackFn) { FreeLibrary(m_hVideoDll); m_hVideoDll = NULL; return false; } Wnd_AddWindow(this, WL_TOPMOST); m_bInitialized = true; return true; }