Пример #1
0
	ItemBoxMenu::~ItemBoxMenu()
	{
		MyGUI::ItemBox* box = getItemBox();
		size_t count = box->getItemCount();
		for (size_t pos=0; pos<count; ++pos)
		{
			delete *box->getItemDataAt<ItemMenu*>(pos);
		}
	}
Пример #2
0
DeployItemBox::~DeployItemBox()
{
    MyGUI::ItemBox* box = getItemBox();
    size_t count = box->getItemCount();
    for (size_t pos = 0; pos < count; ++pos)
    {
        delete *box->getItemDataAt<DeployItemData*>(pos);
    }
}
Пример #3
0
	void TextureBrowseControl::setTextureName(const std::string& _value)
	{
		mCurrentTextureName = _value;

		MyGUI::ItemBox* box = mTextures->getItemBox();

		size_t indexSelected = MyGUI::ITEM_NONE;
		for (size_t index = 0; index < box->getItemCount(); ++index)
		{
			if (*box->getItemDataAt<std::string>(index) == mCurrentTextureName)
			{
				indexSelected = index;
				break;
			}
		}

		box->setIndexSelected(indexSelected);
	}
Пример #4
0
	void WidgetsWindow::notifyChangeCreatorMode(bool _modeCreate)
	{
		const std::string& widgetType = WidgetCreatorManager::getInstance().getWidgetType();
		const std::string& widgetSkin = WidgetCreatorManager::getInstance().getWidgetSkin();

		for (VectorItemBox::iterator item = mItemBoxs.begin(); item != mItemBoxs.end(); ++item)
		{
			MyGUI::ItemBox* box = (*item);
			box->setIndexSelected(MyGUI::ITEM_NONE);
			for (size_t index = 0; index < box->getItemCount(); ++index)
			{
				SkinInfo* info = box->getItemDataAt<SkinInfo>(index);
				if (info->widget_skin == widgetSkin && info->widget_type == widgetType)
				{
					box->setIndexSelected(index);
					break;
				}
			}
		}

		mPopupMode->setStateSelected(WidgetCreatorManager::getInstance().getPopupMode());
	}