本文整理汇总了C++中CButeMgr::GetPoint方法的典型用法代码示例。如果您正苦于以下问题:C++ CButeMgr::GetPoint方法的具体用法?C++ CButeMgr::GetPoint怎么用?C++ CButeMgr::GetPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CButeMgr
的用法示例。
在下文中一共展示了CButeMgr::GetPoint方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InitializeFromBute
LTBOOL ServerOption::InitializeFromBute(CButeMgr & buteMgr, const char* aTagName)
{
if (!aTagName) return LTFALSE;
CString str = buteMgr.GetString(aTagName, SO_VARIABLE);
if (!str.IsEmpty())
{
strncpy(szVariable, (char*)(LPCSTR)str, sizeof(szVariable));
}
else
szVariable[0] = LTNULL;
str = buteMgr.GetString(aTagName, SO_SERV_VARIABLE);
if (!str.IsEmpty())
{
strncpy(szServVariable, (char*)(LPCSTR)str, sizeof(szServVariable));
}
else
strncpy(szServVariable, szVariable, sizeof(szServVariable));
nNameId = buteMgr.GetInt(aTagName, SO_NAME,0);
nHelpId = buteMgr.GetInt(aTagName, SO_HELP,0);
eType = (eOptionType) buteMgr.GetInt(aTagName, SO_TYPE,(int)SO_UNKNOWN);
eGameType = (GameType) buteMgr.GetInt(aTagName, SO_GAME_TYPE,(int)SINGLE);
nNumStrings = 0;
str = buteMgr.GetString(aTagName, SO_STRINGS);
if (!str.IsEmpty())
{
char szTemp[128];
char *pNum;
strncpy(szTemp, (char*)(LPCSTR)str, sizeof(szTemp));
pNum = strtok(szTemp,",");
while (pNum && nNumStrings < SO_MAX_STRINGS)
{
nStringId[nNumStrings] = atoi(pNum);
nNumStrings++;
pNum = strtok(NULL,",");
}
}
for (int i = nNumStrings; i < SO_MAX_STRINGS; i++)
nStringId[i] = 0;
CPoint zero(0, 0);
CPoint tmp = buteMgr.GetPoint(aTagName, SO_RANGE, zero);
nSliderMin = tmp.x;
nSliderMax = tmp.y;
nSliderInc = buteMgr.GetInt(aTagName, SO_INCREMENT,0);
fSliderScale = (LTFLOAT)buteMgr.GetDouble(aTagName, SO_SCALE,1.0f);
fDefault = fSliderScale * (LTFLOAT)buteMgr.GetDouble(aTagName, SO_DEFAULT,0.0f);
return LTTRUE;
}