Beispiel #1
0
void FontDemo::retrieveLoadedFontNames(bool areEditable)
{
    FontManager& fontManager(FontManager::getSingleton());
    FontManager::FontIterator fi = fontManager.getIterator();

    while (!fi.isAtEnd())
    {
        CEGUI::Font& font(fontManager.get(fi.getCurrentKey()));

        if(d_fontNameOptions.find(font.getName()) == d_fontNameOptions.end())
        {
            d_fontNameOptions[font.getName()] = areEditable;
        }
        ++fi;
    }
}
Beispiel #2
0
VOID CDataPool::InsertBasePropertyList(CEGUI::Window* pWindow)
{
	CRightPropList* pList = GetRightPropList();
	StringVector vec;

	//位置相关
	pList->CreateRootItem("PropertyPos","窗口位置大小相关","窗口位置大小相关集合");

	pList->InsertEditItem("UnifiedXPosition", "位置X{rx, ax}","",OTES_NORMAL,"UnifiedXPosition","PropertyPos");
	pList->InsertEditItem("UnifiedYPosition", "位置Y{ry, ay}","",OTES_NORMAL,"UnifiedYPosition","PropertyPos");
	pList->InsertEditItem("UnifiedWidth", "宽度{rw, aw}","",OTES_NORMAL,"UnifiedWidth","PropertyPos");
	pList->InsertEditItem("UnifiedHeight", "高度{rh, ah}","",OTES_NORMAL,"UnifiedHeight","PropertyPos");

	pList->InsertEditItem("UnifiedMaxSize", "窗口最大尺寸{{rw,aw},{rh,ah}}","",OTES_NORMAL,"UnifiedMaxSize","PropertyPos");
	pList->InsertEditItem("UnifiedMinSize", "窗口最小尺寸{{rw,aw},{rh,ah}}","",OTES_NORMAL,"UnifiedMinSize","PropertyPos");

	vec.push_back("");
	vec.push_back("Relative");
	vec.push_back("Absolute");
	vec.push_back("Inherited");
	pList->InsertComboItem("MetricsMode", "相对模式(Relative)随窗口变化自动缩放,绝对模式(Absolute),位置不会随父窗口变化而变化",vec, OTCS_NORMAL, "MetricsMode", "PropertyPos");

	//重要的设置
	pList->CreateRootItem("ImportantSet","重要设置","重要设置相关集合");
	pList->InsertEditItem("Name", "窗口Alpha","",OTES_NORMAL,"Name","ImportantSet");
	pList->InsertEditItem("Text", "窗口显示的文本","",OTES_NORMAL,"Text","ImportantSet");
	pList->InsertEditItem("Tooltip", "窗口Tooltip","",OTES_NORMAL,"Tooltip","ImportantSet");
	pList->InsertEditItem("ID", "窗口ID","",OTES_NORMAL,"ID","ImportantSet");
	pList->InsertEditItem("Alpha", "窗口Alpha","",OTES_NORMAL,"Alpha","ImportantSet");
	
	
	FontManager::FontIterator it = FontManager::getSingleton().getIterator();
	vec.clear();
	vec.push_back("");
	while ( !it.isAtEnd() )
	{
		vec.push_back(it.getCurrentKey().c_str());
		++it;
	}
	pList->InsertComboItem("Font", "窗口Font",vec, OTCS_NORMAL, "Font", "ImportantSet");

	vec.clear();
	vec.push_back("");
	vec.push_back("True");
	vec.push_back("False");
	pList->InsertComboItem("ClippedByParent", "是否被父窗口裁剪",vec, OTCS_NORMAL, "ClippedByParent", "ImportantSet");
	pList->InsertComboItem("Disabled", "是否Disable窗口",vec, OTCS_NORMAL, "Disabled", "ImportantSet");
	pList->InsertComboItem("Visible", "是否Disable窗口",vec, OTCS_NORMAL, "Visible", "ImportantSet");
	pList->InsertComboItem("RiseOnClick", "鼠标单击后是否将窗口提升到最高层",vec, OTCS_NORMAL, "RiseOnClick", "ImportantSet");

	
	//鼠标镂空
	pList->CreateRootItem("HollowMode","鼠标镂空相关","鼠标镂空相关集合");

	vec.clear();
	vec.push_back("");
	vec.push_back("True");
	vec.push_back("False");
	pList->InsertComboItem("MouseHollow", "所有鼠标操作都镂空",vec, OTCS_NORMAL, "MouseHollow", "HollowMode");
	pList->InsertComboItem("MouseMoveHollow", "镂空鼠标移动操作",vec, OTCS_NORMAL, "MouseMoveHollow", "HollowMode");
	pList->InsertComboItem("MouseLButtonHollow", "镂空鼠标左键操作",vec, OTCS_NORMAL, "MouseLButtonHollow", "HollowMode");
	pList->InsertComboItem("MouseRButtonHollow", "镂空鼠标右键操作",vec, OTCS_NORMAL, "MouseRButtonHollow", "HollowMode");

	//对齐方式
	pList->CreateRootItem("PropertyAlignmentMode","对齐方式相关","对齐方式相关集合");

	vec.clear();
	vec.push_back("");
	vec.push_back("Centre");
	vec.push_back("Bottom");
	vec.push_back("Top");
	pList->InsertComboItem("VerticalAlignment", "窗口竖直对齐方式",vec, OTCS_NORMAL, "VerticalAlignment", "PropertyAlignmentMode");

	vec.clear();
	vec.push_back("");
	vec.push_back("Centre");
	vec.push_back("Right");
	vec.push_back("Left");
	pList->InsertComboItem("HorizontalAlignment", "窗口水平对齐方式",vec, OTCS_NORMAL, "HorizontalAlignment", "PropertyAlignmentMode");

	//Hook模式
	pList->CreateRootItem("HookingMode","Hook模式","Hook模式集合");
	pList->InsertEditItem("HookPosition", "Hook的位置","",OTES_NORMAL,"HookPosition","HookingMode");

	vec.clear();
	vec.push_back("");
	vec.push_back("None");
	vec.push_back("Left");
	vec.push_back("Right");
	vec.push_back("Top");
	vec.push_back("Bottom");
	vec.push_back("LeftTop");
	vec.push_back("LeftBottom");
	vec.push_back("RightTop");
	vec.push_back("RightBottom");
	vec.push_back("Center");
	pList->InsertComboItem("HookMode", "定位到窗口的某个位置",vec, OTCS_NORMAL, "HookMode", "HookingMode");

	vec.clear();
	vec.push_back("");
	vec.push_back("Relative");
	vec.push_back("Absolute");
	vec.push_back("Inherited");
	pList->InsertComboItem("ZoomMode", "缩放模式Absolute和Relative",vec, OTCS_NORMAL, "ZoomMode", "HookingMode");

	//调用脚本添加基本属性
	//创建父窗口
	pList->CreateRootItem("OtherSets","其他属性","其他属性集合");

	vec.clear();
	vec.push_back("");
	vec.push_back("True");
	vec.push_back("False");
	pList->InsertComboItem("MouseButtonDownAutoRepeat", "鼠标事件是否自动重复",vec, OTCS_NORMAL, "MouseButtonDownAutoRepeat", "OtherSets");

	pList->InsertEditItem("AutoRepeatDelay", "重复延迟时间","",OTES_NORMAL,"AutoRepeatDelay","OtherSets");
	pList->InsertEditItem("AutoRepeatRate", "重复延迟时间","",OTES_NORMAL,"AutoRepeatRate","OtherSets");
	pList->InsertEditItem("MouseCursorImage", "图片作为鼠标(set:setname image:imagename)","",OTES_NORMAL,"MouseCursorImage","OtherSets");
	
		
	//调用脚本处理
	m_scriptModule.DoString("getBasePropList('OtherSets')");
	
	
	pList->ExpandAllItems();
}