2 #ifndef WORLDSIM_MENU_FLORA_DETAILS_CPP 3 #define WORLDSIM_MENU_FLORA_DETAILS_CPP 18 #include <Graphics/GUI/GUI_Table.hpp> 19 #include <Container/Table/Table.hpp> 47 guiManager.setFont(_font);
58 if ( _flora != 0 || selectedFlora== 0)
64 cNormal.set(220,220,220);
65 cSelected.set(180,180,180);
66 cDropPanel.set(170,170,170);
67 cHighlight.set(255,160,160);
70 buttonClose.setColours(cNormal,cHighlight,0);
71 buttonClose.active=
true;
73 guiManager.add(&buttonClose);
74 guiManager.setFont(font);
86 Renderer::placeColour4a(150,150,150,220,panelX1,panelY1,panelX2,panelY2);
87 font8x8.drawText(
"Flora details",panelX1,panelY2-20,panelX2,panelY2-5,
true,
true);
92 std::string mainText=
"This is the "+selectedFlora->
getName()+
".\n";
94 if (selectedFlora->
biome)
96 mainText +=
"It comes from the "+selectedFlora->
biome->
name+
".\n";
100 mainText+=
"Biome unknown.\n";
106 mainText +=
"It is "+selectedFlora->
getColour()+
"\n";
108 font8x8.drawText(mainText,panelX1,panelY1,panelX2,panelY2-25,
false,
false,
false, 0, 0, 0, 255, 2);
117 return guiManager.keyboardEvent(_keyboard);
127 if(guiManager.mouseEvent(_mouse)==
true)
132 if (buttonClose.clicked==
true)
135 buttonClose.unclick();
143 buttonClose.setPanel(panelX2-40, panelY2-40, panelX2-20, panelY2-20);
Wildcat::Font font8x8
Definition: Driver_GlobalObjects.hpp:55
World_Biome * biome
Definition: Static_Flora.hpp:215
Ingredient * ingredient
Definition: Static_Flora.hpp:214
Definition: Static_Flora.hpp:201
std::string name
Definition: Static_Flora.hpp:131
std::string getColour()
Definition: Ingredient.hpp:33
std::string name
Definition: World_Biome.hpp:61
std::string getColour()
Definition: Static_Flora.cpp:55
Effect * effect
Definition: Ingredient.hpp:24
std::string getName() override
Definition: Static_Flora.cpp:60
std::string name
Definition: Ingredient.hpp:23