예제 #1
0
	void PropertyFieldSkin::onFillValues()
	{
		WidgetStyle::VectorString values = WidgetTypes::getInstance().findWidgetStyle(mCurrentWidget->getTypeName())->skin;

		// добавляем скины и шаблоны
		MyGUI::ResourceManager::EnumeratorPtr resource = MyGUI::ResourceManager::getInstance().getEnumerator();
		while (resource.next())
		{
			MyGUI::ResourceSkin* resourceSkin = resource.current().second->castType<MyGUI::ResourceSkin>(false);
			if (resourceSkin != nullptr)
			{
				if (!MyGUI::utility::startWith(resourceSkin->getResourceName(), "LE_"))
					values.push_back(replaceTags("ColourDefault") + resourceSkin->getResourceName());
			}

			MyGUI::ResourceLayout* resourceLayout = resource.current().second->castType<MyGUI::ResourceLayout>(false);
			if (resourceLayout != nullptr)
			{
				if (!MyGUI::utility::endWith(resourceLayout->getResourceName(), ".layout"))
				{
					if (!MyGUI::utility::startWith(resourceLayout->getResourceName(), "LE_"))
						values.push_back(replaceTags("ColourDefault") + resourceLayout->getResourceName());
				}
			}
		}

		mField->removeAllItems();
		for (WidgetStyle::VectorString::iterator iter = values.begin(); iter != values.end(); ++iter)
			mField->addItem(*iter);
		mField->beginToItemFirst();
	}
예제 #2
0
	void PropertyFieldComboBox::onFillValues()
	{
		WidgetStyle::VectorString values = WidgetTypes::getInstance().findPossibleValues(mType);

		mField->removeAllItems();
		for (WidgetStyle::VectorString::iterator iter = values.begin(); iter != values.end(); ++iter)
			mField->addItem(MyGUI::LanguageManager::getInstance().replaceTags(*iter));
		mField->beginToItemFirst();
	}
예제 #3
0
	void PropertyFieldType::onFillValues()
	{
		WidgetStyle::VectorString values;

		VectorWidgetType types = WidgetTypes::getInstance().getWidgetTypes();
		for (VectorWidgetType::iterator iter = types.begin(); iter != types.end(); ++iter)
		{
			bool exist = MyGUI::WidgetManager::getInstance().isFactoryExist((*iter)->name);
			if (exist && !(*iter)->internalType)
				values.push_back((*iter)->name);
		}

		mField->removeAllItems();
		for (WidgetStyle::VectorString::iterator iter = values.begin(); iter != values.end(); ++iter)
			mField->addItem(*iter);
		mField->beginToItemFirst();
	}
예제 #4
0
	void PropertyFieldFont::onFillValues()
	{
		WidgetStyle::VectorString values;

		const std::string DEFAULT_STRING = "[DEFAULT]";
		values.push_back(replaceTags("ColourDefault") + DEFAULT_STRING);
		values.push_back("Default");

		MyGUI::ResourceManager::EnumeratorPtr resource = MyGUI::ResourceManager::getInstance().getEnumerator();
		while (resource.next())
		{
			MyGUI::IFont* resourceFont = resource.current().second->castType<MyGUI::IFont>(false);
			if (resourceFont != nullptr)
				values.push_back(resourceFont->getResourceName());
		}

		for (WidgetStyle::VectorString::iterator iter = values.begin(); iter != values.end(); ++iter)
			mField->addItem(*iter);
		mField->beginToItemFirst();
	}