Exemplo n.º 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);
		}
	}
Exemplo n.º 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);
    }
}
Exemplo n.º 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);
	}
Exemplo n.º 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());
	}