60 //connect(imageButt, SIGNAL(clicked()), this, SLOT(setRandomTheme())); |
60 //connect(imageButt, SIGNAL(clicked()), this, SLOT(setRandomTheme())); |
61 connect(imageButt, SIGNAL(clicked()), this, SLOT(setRandomMap())); |
61 connect(imageButt, SIGNAL(clicked()), this, SLOT(setRandomMap())); |
62 |
62 |
63 chooseMap = new QComboBox(this); |
63 chooseMap = new QComboBox(this); |
64 chooseMap->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
64 chooseMap->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
65 chooseMap->addItem(QIcon(":/res/mapRandom.png"), QComboBox::tr("generated map...")); |
65 chooseMap->addItem( |
66 chooseMap->addItem(QIcon(":/res/mapMaze.png"), QComboBox::tr("generated maze...")); |
66 // FIXME - need real icons. Disabling until then |
|
67 //QIcon(":/res/mapRandom.png"), |
|
68 QComboBox::tr("generated map...")); |
|
69 chooseMap->addItem( |
|
70 // FIXME - need real icons. Disabling until then |
|
71 //QIcon(":/res/mapMaze.png"), |
|
72 QComboBox::tr("generated maze...")); |
67 chooseMap->insertSeparator(chooseMap->count()); // separator between generators and missions |
73 chooseMap->insertSeparator(chooseMap->count()); // separator between generators and missions |
68 |
74 |
69 int missionindex = chooseMap->count(); |
75 int missionindex = chooseMap->count(); |
70 numMissions = 0; |
76 numMissions = 0; |
71 for (int i = 0; i < mapList->size(); ++i) { |
77 for (int i = 0; i < mapList->size(); ++i) { |
93 else |
99 else |
94 mapInfo.push_back(18); |
100 mapInfo.push_back(18); |
95 mapInfo.push_back(mapLuaFile.exists()); |
101 mapInfo.push_back(mapLuaFile.exists()); |
96 if(mapLuaFile.exists()) |
102 if(mapLuaFile.exists()) |
97 { |
103 { |
98 chooseMap->insertItem(missionindex++, QIcon(":/res/mapMission.png"), QComboBox::tr("Mission") + ": " + map, mapInfo); |
104 chooseMap->insertItem(missionindex++, |
|
105 // FIXME - need real icons. Disabling until then |
|
106 //QIcon(":/res/mapMission.png"), |
|
107 QComboBox::tr("Mission") + ": " + map, mapInfo); |
99 numMissions++; |
108 numMissions++; |
100 } |
109 } |
101 else |
110 else |
102 chooseMap->addItem(QIcon(":/res/mapCustom.png"), map, mapInfo); |
111 chooseMap->addItem( |
|
112 // FIXME - need real icons. Disabling until then |
|
113 //QIcon(":/res/mapCustom.png"), |
|
114 map, mapInfo); |
103 mapCfgFile.close(); |
115 mapCfgFile.close(); |
104 } |
116 } |
105 } |
117 } |
106 chooseMap->insertSeparator(missionindex); // separator between missions and maps |
118 chooseMap->insertSeparator(missionindex); // separator between missions and maps |
107 |
119 |