forked from speed-dreams/speed-dreams-code
menu bug fixes
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@1807 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 49caab1babee26cf64f59ee7fa7c7936951ab841 Former-commit-id: 04bcf44c377d6caaa1bf0b0eac36f24519fa464b
This commit is contained in:
parent
09fc5bc722
commit
2910ec5a76
1 changed files with 52 additions and 9 deletions
|
@ -273,36 +273,79 @@ GetFontSize(const std::string& strTextsize)
|
||||||
{
|
{
|
||||||
int tSize = GFUI_FONT_MEDIUM;
|
int tSize = GFUI_FONT_MEDIUM;
|
||||||
|
|
||||||
if (strTextsize=="medium")
|
if (strTextsize=="big")
|
||||||
tSize = GFUI_FONT_MEDIUM;
|
tSize = GFUI_FONT_BIG;
|
||||||
else if (strTextsize=="large")
|
else if (strTextsize=="large")
|
||||||
tSize = GFUI_FONT_LARGE;
|
tSize = GFUI_FONT_LARGE;
|
||||||
|
else if (strTextsize=="medium")
|
||||||
|
tSize = GFUI_FONT_MEDIUM;
|
||||||
else if (strTextsize=="small")
|
else if (strTextsize=="small")
|
||||||
tSize = GFUI_FONT_SMALL;
|
tSize = GFUI_FONT_SMALL;
|
||||||
else if (strTextsize=="big")
|
else if (strTextsize=="big_c")
|
||||||
tSize = GFUI_FONT_BIG;
|
tSize = GFUI_FONT_BIG_C;
|
||||||
|
else if (strTextsize=="large_c")
|
||||||
|
tSize = GFUI_FONT_LARGE_C;
|
||||||
|
else if (strTextsize=="medium_c")
|
||||||
|
tSize = GFUI_FONT_MEDIUM_C;
|
||||||
|
else if (strTextsize=="small_c")
|
||||||
|
tSize = GFUI_FONT_SMALL_C;
|
||||||
|
else if (strTextsize=="digit")
|
||||||
|
tSize = GFUI_FONT_DIGIT;
|
||||||
|
|
||||||
return tSize;
|
return tSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
GetAlignment(const std::string& strAlignH, const std::string& strAlignV)
|
GetAlignment(const std::string& strAlH,const std::string& strAlV)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
std::string strAlignH = strAlH;
|
||||||
|
std::string strAlignV = strAlV;
|
||||||
|
|
||||||
|
if (strAlignH == "")
|
||||||
|
strAlignH = "left";
|
||||||
|
|
||||||
|
if (strAlignV == "")
|
||||||
|
strAlignV = "bottom";
|
||||||
|
|
||||||
int align = GFUI_ALIGN_HL_VB;
|
int align = GFUI_ALIGN_HL_VB;
|
||||||
if (strAlignH == "left")
|
if ((strAlignH == "left")&&(strAlignV == "bottom"))
|
||||||
{
|
{
|
||||||
|
|
||||||
align = GFUI_ALIGN_HL_VB;
|
align = GFUI_ALIGN_HL_VB;
|
||||||
}
|
}
|
||||||
else if (strAlignH == "center")
|
else if ((strAlignH == "center")&&(strAlignV == "bottom"))
|
||||||
{
|
{
|
||||||
align = GFUI_ALIGN_HC_VB;
|
align = GFUI_ALIGN_HC_VB;
|
||||||
}
|
}
|
||||||
else if (strAlignH == "right")
|
else if ((strAlignH == "right")&&(strAlignV == "bottom"))
|
||||||
{
|
{
|
||||||
align = GFUI_ALIGN_HR_VB;
|
align = GFUI_ALIGN_HR_VB;
|
||||||
}
|
}
|
||||||
|
else if ((strAlignH == "left")&&(strAlignV == "center"))
|
||||||
|
{
|
||||||
|
align = GFUI_ALIGN_HL_VC;
|
||||||
|
}
|
||||||
|
else if ((strAlignH == "center")&&(strAlignV == "center"))
|
||||||
|
{
|
||||||
|
align = GFUI_ALIGN_HC_VC;
|
||||||
|
}
|
||||||
|
else if ((strAlignH == "right")&&(strAlignV == "center"))
|
||||||
|
{
|
||||||
|
align = GFUI_ALIGN_HR_VC;
|
||||||
|
}
|
||||||
|
else if ((strAlignH == "left")&&(strAlignV == "top"))
|
||||||
|
{
|
||||||
|
align = GFUI_ALIGN_HL_VT;
|
||||||
|
}
|
||||||
|
else if ((strAlignH == "center")&&(strAlignV == "top"))
|
||||||
|
{
|
||||||
|
align = GFUI_ALIGN_HC_VT;
|
||||||
|
}
|
||||||
|
else if ((strAlignH == "right")&&(strAlignV == "top"))
|
||||||
|
{
|
||||||
|
align = GFUI_ALIGN_HR_VT;
|
||||||
|
}
|
||||||
|
|
||||||
return align;
|
return align;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue