/*********************************************************************
* 功能:载入界面方案
**********************************************************************/
void KUiTongAssignBox::LoadScheme(const char* pScheme)
{
	if(ms_pSelf)
	{
		char		Buff[128];
		KIniFile	Ini;
		sprintf(Buff, "%s\\%s", pScheme, TONG_ASSIGN_BOX_INI);

		if(Ini.Load(Buff))
		{
			ms_pSelf->Init(&Ini, "Main");

			ms_pSelf->m_BtnPilgarlic.Init(&Ini, "BtnMember");
			ms_pSelf->m_BtnCaptain.Init(&Ini, "BtnManager");
			ms_pSelf->m_BtnConfirm.Init(&Ini, "BtnConfirm");
			ms_pSelf->m_BtnElder.Init(&Ini, "BtnDirector");
			ms_pSelf->m_BtnCancel.Init(&Ini, "BtnCancel");
			ms_pSelf->m_TargetName.Init(&Ini, "PlayerName");
			ms_pSelf->m_TextError.Init(&Ini, "ErrorBox");

			ms_pSelf->m_BtnElder.SetText("长老");
			ms_pSelf->m_BtnCaptain.SetText("队长");
			ms_pSelf->m_BtnPilgarlic.SetText("帮众");

			Ini.GetString("Main", "AssignString", "", ms_pSelf->m_szAssign, sizeof(ms_pSelf->m_szAssign));
			Ini.GetString("Main", "CancelString", "", ms_pSelf->m_szCancel, sizeof(ms_pSelf->m_szCancel));
			Ini.GetString("Main", "ConfirmString", "", ms_pSelf->m_szConfirm, sizeof(ms_pSelf->m_szConfirm));
			Ini.GetString("Main", "ErrorFigure", "请选择职位", ms_pSelf->m_szErrorNotSelectFigure, sizeof(ms_pSelf->m_szErrorNotSelectFigure));
		}
	}
}
Example #2
0
//--------------------------------------------------------------------------
//	功能:初始化
//--------------------------------------------------------------------------
int KUiBase::Init()
{
	if (g_pIme)
	{
		g_pIme->DisableLanguageChange();
		g_pIme->CloseIME();
		g_pIme->TurnOn();
	}

	KIniFile* pSetting = GetCommSettingFile();
	char	SchemeName[32] = "";
	int		nInterval = 20;
	if (pSetting)
	{
		pSetting->GetString("Main", "LastUsedScheme", "", SchemeName, 32);
		pSetting->GetInteger("Main", "WndMoveInterval", 20, &nInterval);
		#ifdef _DEBUG
			int	nValue;
			pSetting->GetInteger("Main", "ShowDebugFrameText", 0, &nValue);
			WND_SHOW_DEBUG_FRAME_TEXT = nValue;
			pSetting->GetInteger("Main", "ShowMouseOverWnd", 0, &nValue);
			WND_SHOW_MOUSE_OVER_WND = nValue;
		#endif
			CloseCommSettingFile(false);
	}
	g_CreatePath(UI_USER_DATA_FOLDER);
	g_CreatePath(UI_USER_DATA_TEMP_FOLDER);
	KWndShowAnimate::SetInterval(nInterval);
	LoadScheme(SchemeName);
	return true;
}
Example #3
0
void KUiBase::LoadPrivateConfig()
{
	CreateBlackListUnit();

	KIniFile*	pConfigFile = GetPrivateSettingFile();

	if (pConfigFile)
	{
		//----获取窗口方案设定----
		char	SchemeName[32];
		if (pConfigFile->GetString("Main", "Scheme", "", SchemeName, 32))
		{
			if (SchemeName[0] && LoadScheme(SchemeName))
			{
			//----逐个窗口载入配置设定----
				KUiPlayerBar::LoadPrivateSetting(pConfigFile);
				KUiSkillTree::LoadConfig(pConfigFile);
				KShortcutKeyCentre::LoadPrivateSetting(pConfigFile);
				KUiChatCentre::LoadPrivateSetting(pConfigFile);	//在KShortcutKeyCentre之后,因为会有脚本生成Unit
			//----逐个窗口载入配置设定结束----
			}
		}
		::LoadStallPrivateConfig(pConfigFile);			//摆摊标价存盘
		ClosePrivateSettingFile(false);
	}
}
void KUiNewPlayerStartMsg::LoadList()
{
	KIniFile	File;
	if (!File.Load(NEWENTERINFO_INI))
		return;

    MsgListBox_LoadContent(m_List.GetMessageListBox(), &File, "List");
    MsgListBox_LoadContent(m_AdvanceList.GetMessageListBox(), &File, "AdvanceList");
}
Example #5
0
//载入界面方案
void KUiPlayVideo::LoadScheme(const char* pszSettingFile, const char* pszSection)
{
	if (m_pSelf && pszSettingFile && pszSection && pszSettingFile[0] && pszSection[0])
	{
		KIniFile	Ini;
		if (Ini.Load(pszSettingFile))
			m_pSelf->Init(&Ini, pszSection);
	}
}
Example #6
0
void KUiConnectInfo::SetInfoMsg(LOGIN_BG_INFO_MSG_INDEX eIndex)
{
	m_DelRoleBgImg.LeaveAlone();
	m_DelRoleBtn.LeaveAlone();
	m_CancelDelRoleBtn.LeaveAlone();
	m_ConfirmBtn.LeaveAlone();
	m_ContinueBtn.LeaveAlone();
	m_InputPwdWnd.LeaveAlone();
//	m_BtnUnlockLink.LeaveAlone();
	m_RoleName.LeaveAlone();

	m_szMessage[0] = 0;
	m_nMsgLen = 0;
	m_nColor2CharacterStartIndex = 0;
	m_nColor2CharacterEndIndex = 0;

	KIniFile*	pIni = g_UiBase.GetCommConfigFile();
	if (pIni)
	{
		char	szKey[8];
		char	szBuff[64];
		itoa(eIndex, szKey, 10);
		pIni->GetString("InfoString", szKey, "", szBuff, sizeof(szBuff));
		m_nMsgLen = sprintf(m_szMessage, szBuff, m_szString);
		if (m_nMsgLen)
		{
			m_uLastMsgColorChanageTime = IR_GetCurrentTime();
			m_nColor2CharacterEndIndex =
				TSplitString(m_szMessage, m_nColor2CharacterStartIndex + 1, false);
		}
	}

	if (eIndex == CI_MI_TO_DEL_ROLE)	//13=要删除角色
	{
		AddChild(&m_DelRoleBgImg);
		AddChild(&m_InputPwdWnd);
		AddChild(&m_DelRoleBtn);
		AddChild(&m_RoleName);
		char szBuff[64];
		sprintf(szBuff, "角色名字:%s", m_szString);
		m_RoleName.SetText(szBuff);
		AddChild(&m_CancelDelRoleBtn);
		Wnd_SetFocusWnd(&m_InputPwdWnd);
	}
	else if (eIndex == CI_MI_TO_TRANSFER_ROLE)
	{
		AddChild(&m_ContinueBtn);
	}
	else if (eIndex != CI_MI_ENTERING_GAME)
	{
//		if(eIndex == CI_MI_ACCOUNT_LOCKED)
//		{
//			AddChild(&m_BtnUnlockLink);
//		}
		AddChild(&m_ConfirmBtn);
	}
}
//--------------------------------------------------------------------------
//	功能:载入窗口的界面方案
//--------------------------------------------------------------------------
void KUiFriendInterview::LoadScheme(const char* pScheme)
{
	if (m_pFirstSelf == NULL)
		return;
	if (pScheme == NULL)
	{
		char Scheme[128];
		g_UiBase.GetCurSchemePath(Scheme, 256);
		pScheme = Scheme;
	}

	KUiPlayerBaseInfo	Info;
	memset(&Info, 0, sizeof(KUiPlayerBaseInfo));
	if (g_pCoreShell)
	{
		g_pCoreShell->GetGameData(GDI_PLAYER_BASE_INFO, (int)&Info, 0);
		SetSelfName(Info.Name);
	}

	char		Buff[128];
	KIniFile	Ini;
	sprintf(Buff, "%s\\"SCHEME_INI, pScheme);
	if (Ini.Load(Buff))
	{
		m_pFirstSelf->Init(&Ini, "Main");
		m_pFirstSelf->m_MsgList	.Init(&Ini, "MsgList");
		m_pFirstSelf->m_MsgScroll.Init(&Ini, "MsgScroll");
		m_pFirstSelf->m_InputWnd.Init(&Ini, "Input");
		m_pFirstSelf->m_SendBtn.Init(&Ini, "SendBtn");
		m_pFirstSelf->m_ColorBtn.Init(&Ini, "ColorBtn");
		m_pFirstSelf->m_CloseBtn.Init(&Ini, "CloseBtn");
		m_pFirstSelf->m_FaceBtn.Init(&Ini, "FaceBtn");
		m_pFirstSelf->m_FriendName.Init(&Ini, "FriendName");
		Ini.GetString("MsgList", "MsgColor", "0,0,0", Buff, sizeof(Buff));
		m_uLastTextColor = (::GetColor(Buff) & 0xFFFFFF);
	}

	KIniFile* pSetting = g_UiBase.GetPrivateSettingFile();
	if (pSetting)
	{
		if (pSetting->GetString("UiConfig", "ChatColor", "0,0,0", Buff, sizeof(Buff)))
			m_uLastTextColor = (::GetColor(Buff) & 0xFFFFFF);
		g_UiBase.ClosePrivateSettingFile(false);
	}
	m_pFirstSelf->m_SelfTextColor.Color_dw = m_uLastTextColor;
	m_pFirstSelf->m_InputWnd.SetColor(m_uLastTextColor);

	KUiFriendInterview* pWnd = m_pFirstSelf->m_pNextSelf;
	while(pWnd)
	{
		m_pFirstSelf->CloneTheme(pWnd);
		pWnd = pWnd->m_pNextSelf;
	}
}
Example #8
0
//--------------------------------------------------------------------------
//	功能:载入窗口的界面方案
//--------------------------------------------------------------------------
void KUiParadeItem::LoadScheme(const char* pScheme)
{
	if (m_pSelf)
	{
		char		Buff[128];
		KIniFile	Ini;
		sprintf(Buff, "%s\\%s", pScheme, SCHEME_INI);
		if (Ini.Load(Buff))
			m_pSelf->LoadScheme(&Ini);	
	}
}
Example #9
0
//--------------------------------------------------------------------------
//	功能:连接游戏服务
//--------------------------------------------------------------------------
int KLogin::ConnectAccountServer(const unsigned char* pIpAddress)
{
	KIniFile	IniFile;
	if (pIpAddress && IniFile.Load("\\Config.ini"))
	{			
		int nPort;
		IniFile.GetInteger("Server", "GameServPort", 8888, &nPort);
		return g_NetConnectAgent.ClientConnectByNumericIp(pIpAddress, nPort);
	}
	return false;
}
Example #10
0
void KUiTaskNote_System::LoadScheme(const char* pScheme)
{
	char		Buff[128];
	KIniFile	Ini;
	sprintf(Buff, "%s\\%s", pScheme, SCHEME_INI_SYSTEM);
	if (Ini.Load(Buff))
	{
		KWndPage::Init(&Ini, "Main");
		m_BtnDelete.Init(&Ini, "DeleteBtn");
		m_RecordList.Init(&Ini, "List");
	}
}
Example #11
0
/**************************************************************************
*功能:弹出错误描述窗口
***************************************************************************/
void Error_Box()
{
	if(s_uErrorCode)
	{
    	KIniFile Ini;
    	char szFormatString[512], szOutputInfo[512], szBuf[16];

        //嗷,开始显示错误信息咯
	    Ini.Load(ERROR_STRING);

        Ini.GetString("Strings", itoa(s_uErrorCode,szBuf,10), "", szFormatString, sizeof(szFormatString));
		if(szFormatString[0] == 0)
		{
			Ini.GetString("Strings", "Unknown", "", szFormatString, sizeof(szFormatString));
			if(szFormatString[0] == 0)
			    strcpy(szFormatString, "未知的错误(错误号: %d)");
		}
		while(true)
		{
			char* pszNextLine = strchr(szFormatString, NEXT_LINE_CHARA);
			if (pszNextLine == NULL)
				break;
			*pszNextLine = '\n';
		}
		const char* pszCodePos = strstr(szFormatString, "%d");
		const char* pszStringPos = strstr(szFormatString, "%s");
		if (pszCodePos)
		{
			if (pszStringPos)
			{
				if (pszCodePos < pszStringPos)
					sprintf(szOutputInfo, szFormatString, s_uErrorCode, s_szErrorString);
				else
					sprintf(szOutputInfo, szFormatString, s_szErrorString, s_uErrorCode);
			}
			else
			{
				sprintf(szOutputInfo, szFormatString, s_uErrorCode);
			}
		}
		else if (pszStringPos)
		{
			sprintf(szOutputInfo, szFormatString, s_szErrorString);
		}
		else
			strcpy(szOutputInfo, szFormatString);

	    MessageBox(NULL, szOutputInfo, "剑侠情缘网络版", MB_OK | MB_ICONERROR);

	    s_uErrorCode = 0;
	}
	s_szErrorString[0] = 0;
}
Example #12
0
void KUiSelPlayerNearby::LoadScheme(const char* pScheme)
{
	if (m_pSelf)
	{
		char		Buff[128];
		KIniFile	Ini;
		sprintf(Buff, "%s\\%s", pScheme, SCHEME_INI);
		if (Ini.Load(Buff))
		{
			m_pSelf->LoadScheme(&Ini);
		}
	}
}
Example #13
0
//载入设定
bool UiSoundLoadSetting()
{
	KIniFile	Setting;
	if (!Setting.Load(SETTING_FILE))
		return false;
	char	szSection[8];
	for (int i = 0; i < (int)UI_SOUND_COUNT; i++)
	{
		itoa(i, szSection, 10);
		Setting.GetString("Ui", szSection, "", s_SoundFileName[i], sizeof(s_SoundFileName[i]));
	}
	return true;
}
Example #14
0
//--------------------------------------------------------------------------
//	功能:获得界面方案的数目
//--------------------------------------------------------------------------
int KUiBase::SchemeCount()
{
	int			nCount = 0;
	KIniFile*	pIni = GetCommConfigFile();
	if (pIni)
	{
		pIni->GetInteger(THEME_SECTION, "Count", 0, &nCount);
		if (nCount < 0)
			nCount = 0;
		CloseCommConfigFile();
	}
	return nCount;
}
//载入界面方案
void KUiHeaderControlBar::LoadScheme(const char* pScheme)
{
	char		Buff[128];
	KIniFile	Ini;
	if (m_pSelf)
	{
		sprintf(Buff, "%s\\"SCHEME_INI, pScheme);
		if (Ini.Load(Buff))
		{
			m_pSelf->Init(&Ini, "Main");
		}
	}
}
Example #16
0
void KUiTaskNote_Personal::LoadScheme(const char* pScheme)
{
	char		Buff[128];
	KIniFile	Ini;
	sprintf(Buff, "%s\\%s", pScheme, SCHEME_INI_PERSONAL);
	if (Ini.Load(Buff))
	{
		KWndPage::Init(&Ini, "Main");
		m_BtnSave.Init(&Ini, "SaveBtn");
		m_Editor.Init(&Ini, "Editor");
		m_ScrollBar.Init(&Ini, "EditorScroll");
	}
}
//---------------------------------------------------------------------------
// 功能:	从排序文件中把排序信息读取出来
// 参数:	
//			lpszFileName: 排序文件名
//			*cActionName: 用于获取动作的各种信息
//			nPartNum:部件的数量
// 返回:	读取成功与否
//---------------------------------------------------------------------------
BOOL	CSortTable::GetTable(char *lpszFileName, CActionName *cActionName, int nPartNum)
{
	if ( !lpszFileName || !lpszFileName[0])
		return FALSE;

	char		szBuf[FILE_NAME_LENGTH];
	KIniFile	SortIni;

//	g_SetFilePath(RES_INI_FILE_PATH);
	g_UnitePathAndName(RES_INI_FILE_PATH, lpszFileName, szBuf);
	if ( !SortIni.Load(szBuf) )
		return FALSE;
	return GetTable(&SortIni, cActionName, nPartNum);
}
Example #18
0
// -------------------------------------------------------------------------
// 功能	: 载入界面方案
// -------------------------------------------------------------------------
void KUiStoreBox::LoadScheme(const char* pScheme)
{
	char		Buff[128];
	KIniFile	Ini;
	sprintf(Buff, "%s\\%s", pScheme, SCHEME_INI_ITEM);
	if (m_pSelf && Ini.Load(Buff))
	{
		m_pSelf->Init(&Ini, "Main");
		m_pSelf->m_Money.Init(&Ini, "Money");
		m_pSelf->m_GetMoneyBtn.Init(&Ini, "GetMoneyBtn");
		m_pSelf->m_CloseBtn.Init(&Ini, "CloseBtn");
		m_pSelf->m_ItemBox.Init(&Ini, "ItemBox");
		m_pSelf->m_ItemBox.EnableTracePutPos(true);
	}
}
//--------------------------------------------------------------------------
//	功能:载入窗口的界面方案
//--------------------------------------------------------------------------
void KUiNewPlayerStartMsg::LoadScheme(const char* pScheme)
{
	char		Buff[128];
	KIniFile	Ini;
	sprintf(Buff, "%s\\%s", pScheme, SCHEME_INI_NEWENTERINFO);
	if (Ini.Load(Buff))
	{
		KWndShowAnimate::Init(&Ini, "Main");
		m_List              .Init(&Ini, "List");
		m_AdvanceList       .Init(&Ini, "List");
        m_NewerBtn          .Init(&Ini, "NewerBtn");
        m_AdvanceBtn        .Init(&Ini, "AdvanceNewerBtn");
		m_Ok                .Init(&Ini, "Ok");
	}
}
Example #20
0
void KUiLogin::OnEnableAutoLogin()
{
	KIniFile*	pSetting = g_UiBase.GetCommConfigFile();
	int nAutoLogin = false;
	if (pSetting)
	{
		pSetting->GetInteger("Main", "AutoLogin", 0, &nAutoLogin);
		g_UiBase.CloseCommConfigFile();
	}
	if (nAutoLogin == 6323)
	{
		g_LoginLogic.SetRememberAllFlag(true);
		m_RememberAccount.CheckButton(true);
	}
}
Example #21
0
BOOL KInlinePicSink::Init(iRepresentShell* pShell)
{
	m_pRepShell = pShell;
	if (!m_pRepShell)
		return FALSE;
	KIniFile ini;
#define CHAR_BUFFER_LEN	32
	char szBuffer[CHAR_BUFFER_LEN * 2], szIndex[8];
	int nPicCount = 0, i = 0;
	KUiImageRef CurrentImg;
	KImageParam	Param;

	if (!ini.Load(CHAT_FACE_INI_FILE))
		return FALSE;
	//ini.GetString("Main", "Path", "\\spr\\Ui\\聊天\\表情", szPath, CHAR_BUFFER_LEN);
	ini.GetInteger("List", "Count", 0, &nPicCount);

	if (nPicCount > MAX_SYSTEM_INLINE_PICTURES)
		nPicCount = MAX_SYSTEM_INLINE_PICTURES;

	for (i = 0; i < nPicCount; i++)
	{
		sprintf(szIndex, "Face%d", i + 1);
		if (!ini.GetString(szIndex, "Spr", "", szBuffer, CHAR_BUFFER_LEN))
		{
			_ASSERT(0);
			break;
		}
		IR_InitUiImageRef(CurrentImg);
		CurrentImg.nFlipTime = 0;
		CurrentImg.nInterval = 0;
		CurrentImg.nNumFrames = 0;
		strncpy(CurrentImg.szImage, szBuffer, sizeof(CurrentImg.szImage));
		CurrentImg.szImage[sizeof(CurrentImg.szImage) - 1] = 0;
		CurrentImg.bRenderFlag = RUIMAGE_RENDER_FLAG_REF_SPOT;
		CurrentImg.nType = ISI_T_SPR;
		memset(&Param, 0, sizeof(Param));
		pShell->GetImageParam(CurrentImg.szImage, &Param, CurrentImg.nType);
		m_Images.push_back(CurrentImg);
		m_ImageParams.push_back(Param);
	}

	if (FAILED(m_pRepShell->AdviseRepresent(this)))
		return FALSE;
	if (FAILED(AdviseEngine(this)))
		return FALSE;
	return TRUE;
}
Example #22
0
//--------------------------------------------------------------------------
//	功能:载入窗口的界面方案
//--------------------------------------------------------------------------
void KUiSelServer::LoadScheme(const char* pScheme)
{
	char		Buff[128];
	KIniFile	Ini;
	sprintf(Buff, "%s\\%s", pScheme, SCHEME_INI_SELSERV);
	if (Ini.Load(Buff))
	{
		KWndShowAnimate::Init(&Ini, "Main");
		m_List     .Init(&Ini, "List");
		m_ScrollBar.Init(&Ini, "Scroll");
		m_Login    .Init(&Ini, "Login");
		m_Cancel   .Init(&Ini, "Cancel");

		Ini.GetString("Main", "LoginBg", "", m_szLoginBg, sizeof(m_szLoginBg));
	}
}
Example #23
0
//--------------------------------------------------------------------------
//	功能:载入窗口的界面方案
//--------------------------------------------------------------------------
void KUiSelDlg::LoadScheme(const char* pScheme)
{
	char		Buff[128];
	KIniFile	Ini;
	sprintf(Buff, "%s\\%s", pScheme, SCHEME_INI_SELDLG);
	if (Ini.Load(Buff))
	{
		KWndImage::    Init(&Ini, "Main");
		for (int i = 0; i < KUISEL_MAX_OPTION; i++)
		{
			sprintf(Buff, "Option_%d", i);
			m_OptionBtn[i].Init(&Ini, Buff);
		}
		m_IlluminateTxt.Init(&Ini, "InfoText");
	}
}
//重新初始化界面
void KUiHeaderControlBar::DefaultScheme(const char* pScheme)
{
	char		Buff[128];
	KIniFile	Ini;
	if (m_pSelf)
	{
		sprintf(Buff, "%s\\"SCHEME_INI, pScheme);
		if (Ini.Load(Buff))
		{
			int	nValue1, nValue2;
			Ini.GetInteger("Main", "Left",  0, &nValue1);
			Ini.GetInteger("Main", "Top",   0, &nValue2);
			m_pSelf->SetPosition(nValue1, nValue2);
		}
	}
}
Example #25
0
//--------------------------------------------------------------------------
//	功能:载入窗口的界面方案
//--------------------------------------------------------------------------
void KUiESCDlg::LoadScheme(const char* pScheme)
{
	char		Buff[128];
	KIniFile	Ini;
	sprintf(Buff, "%s\\%s", pScheme, SCHEME_INI_INIT);
	if (Ini.Load(Buff))
	{
		Init(&Ini, "Main");
		m_ContinueGameBtn.Init(&Ini, "ContiumeGame");
		m_OptionsBtn.Init(&Ini, "Options");
		//m_ExitBtn.Init(&Ini, "CloseGame");
		m_ExitGameBtn.Init(&Ini, "ExitGame");
		m_HelpBtn.Init(&Ini, "GameHelp");
		//m_TaskBtn.Init(&Ini, "GameTask");
	}
}
KUiFriendInterview::~KUiFriendInterview()
{
	if (m_pFirstSelf == NULL)
	{
		KIniFile* pSetting = g_UiBase.GetPrivateSettingFile();
		if (pSetting)
		{
			char	szColor[16];
			m_SelfTextColor.Color_dw = m_uLastTextColor;
			sprintf(szColor, "%d,%d,%d", m_SelfTextColor.Color_b.r,
				m_SelfTextColor.Color_b.g, m_SelfTextColor.Color_b.b);
			pSetting->WriteString("UiConfig", "ChatColor", szColor);
			g_UiBase.ClosePrivateSettingFile(true);
		}
	}
}
Example #27
0
//--------------------------------------------------------------------------
//	功能:载入窗口的界面方案
//--------------------------------------------------------------------------
void KUiInformation::LoadScheme(const char* pScheme)
{
	char		Buff[128];
	KIniFile	Ini;
	sprintf(Buff, "%s\\%s", pScheme, SCHEME_INI);
	if (Ini.Load(Buff))
	{
		KWndShowAnimate::Init(&Ini, "Main");
		m_Information .Init(&Ini, "Info");
		m_FirstBtn .Init(&Ini, "FirstBtn");
		m_SecondBtn.Init(&Ini, "SecondBtn");
		m_FirstBtn.GetPosition(&m_nOrigFirstBtnXPos, 0);
		m_FirstBtn.GetSize(&m_nCentreBtnXPos, 0);
		m_nCentreBtnXPos = (m_Width - m_nCentreBtnXPos) / 2;
	}
}
Example #28
0
// -------------------------------------------------------------------------
// 功能	: 载入界面方案
// -------------------------------------------------------------------------
void KUiStall::LoadScheme(const char* pScheme)
{
	char		Buff[128];
	KIniFile	Ini;
	sprintf(Buff, "%s\\%s", pScheme, SCHEME_INI_ITEM);
	if (m_pSelf && Ini.Load(Buff))
	{
		m_pSelf->Init(&Ini, "Main");
		m_pSelf->m_CloseBtn.Init(&Ini, "CloseBtn");
		m_pSelf->m_ItemBox.Init(&Ini, "ItemBox");
		m_pSelf->m_Owner.Init(&Ini, "Owner");

		m_pSelf->m_ItemBox.EnableTracePutPos(false);
		m_pSelf->m_ItemBox.EnablePickPut(false);
	}
}
Example #29
0
//--------------------------------------------------------------------------
//	功能:载入窗口的界面方案
//--------------------------------------------------------------------------
void KUiGetString::LoadScheme(const char* pScheme)
{
	if (m_pSelf)
	{
		char		Buff[128];
		KIniFile	Ini;
		sprintf(Buff, "%s\\%s", pScheme, SCHEME_INI);
		if (Ini.Load(Buff))
		{
			m_pSelf->Init(&Ini, "Main");
			m_pSelf->m_Title.Init(&Ini, "Title");
			m_pSelf->m_StringEdit.Init(&Ini, "StringInput");
			m_pSelf->m_OkBtn.Init(&Ini, "OkBtn");
			m_pSelf->m_CancelBtn.Init(&Ini, "CancelBtn");
		}
	}
}
Example #30
0
//--------------------------------------------------------------------------
//	功能:载入窗口的界面方案
//--------------------------------------------------------------------------
void KUiLogin::LoadScheme(const char* pScheme)
{
	char		Buff[128];
	KIniFile	Ini;
	sprintf(Buff, "%s\\%s", pScheme, SCHEME_INI_LOGIN);
	if (Ini.Load(Buff))
	{
		KWndShowAnimate::Init(&Ini, "Main");
		m_Account .Init(&Ini, "Account");
		m_PassWord.Init(&Ini, "Password");
		m_Login   .Init(&Ini, "Login");
		m_Cancel  .Init(&Ini, "Cancel");
		m_RememberAccount.Init(&Ini, "Remember");
		m_InvisibleLogin.Init(&Ini, "Invisible");
		Ini.GetString("Main", "LoginBg", "", m_szLoginBg, sizeof(m_szLoginBg));
	}
}