GUIMissionWindow::GUIMissionWindow(MyGUI::Window* window,int Width,int Height):GUISubWindows(window,Width,Height),mIsShow(false),mIndex(0)
{
	mWindow=window;
	assignWidget(mClose,"TEXT_Close");
	mClose->eventMouseButtonClick+= MyGUI::newDelegate(this, &GUIMissionWindow::onMissionClose);

	clearMission();

	std::vector<std::string> list=DataLibrary::getSingletonPtr()->getChildList("GameData/BattleData/MissionList");
	for (std::vector<std::string>::iterator it=list.begin();it!=list.end();it++)
	{
		std::string name;
		DataLibrary::getSingletonPtr()->getData(std::string("GameData/BattleData/MissionList/")+(*it)+"/Name",name);
		int state;
		DataLibrary::getSingletonPtr()->getData(std::string("GameData/BattleData/MissionList/")+(*it)+"/State",state);

		addMission(name,(MissionState)state,false);
	}

}
示例#2
0
int video::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QMainWindow::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: openNewWindowMain(); break;
        case 1: openNewWindowData(); break;
        case 2: openNewWindowVideo(); break;
        case 3: openNewMap(); break;
        case 4: switchToMap(); break;
        case 5: afficheList(); break;
        case 6: openMission(); break;
        case 7: saveMission(); break;
        case 8: addPoint((*reinterpret_cast< qreal(*)>(_a[1])),(*reinterpret_cast< qreal(*)>(_a[2])),(*reinterpret_cast< GeoDataCoordinates::Unit(*)>(_a[3]))); break;
        case 9: clearMission(); break;
        case 10: close(); break;
        default: ;
        }
        _id -= 11;
    }
    return _id;
}
GUIMissionWindow::~GUIMissionWindow(void)
{
	clearMission();
	DataLibrary::getSingletonPtr()->delNode("GameData/BattleData/MissionList");
}