Peoplemon  0.1.0
Peoplemon 3 game source documentation
WeatherSelect.cpp
Go to the documentation of this file.
2 
3 namespace editor
4 {
5 namespace component
6 {
8 
9 WeatherSelect::WeatherSelect()
10 : ComboBox() {
11  addOption("None");
12  addOption("AllRandom");
13  addOption("LightRain");
14  addOption("LightRainThunder");
15  addOption("HardRain");
16  addOption("HardRainThunder");
17  addOption("LightSnow");
18  addOption("LightSnowThunder");
19  addOption("HardSnow");
20  addOption("HardSnowThunder");
21  addOption("ThinFog");
22  addOption("ThickFog");
23  addOption("Sunny");
24  addOption("SandStorm");
25  addOption("WaterRandom");
26  addOption("SnowRandom");
27  addOption("DesertRandom");
28  setSelectedOption(0);
29  setMaxHeight(300);
30 }
31 
33  return getSelectedOption() >= 0 ? static_cast<core::map::Weather::Type>(getSelectedOption()) :
35 }
36 
38  setSelectedOption(static_cast<int>(t));
39 }
40 
41 } // namespace component
42 } // namespace editor
All classes and functionality used for implementing the game editor.
Definition: Tile.hpp:11
Type
The type of weather.
Definition: Weather.hpp:38
@ None
No weather will occur.
Definition: Weather.hpp:40
Helper component to select weather.
core::map::Weather::Type selectedWeather() const
Returns the currently selected weather.
static Ptr create()
Creates a new weather selector.
std::shared_ptr< WeatherSelect > Ptr
Pointer to the weather selector.
void setSelectedWeather(core::map::Weather::Type type)
Sets the currently selected weather.