
Public Member Functions | |
| ObjectBuildingGui () | |
| bool | init (Vehicle *vehicle) |
| void | eval (const MapCoordinate &mc, ContainerBase *subject) |
| checks evaluates the field on which the cursor resides | |
Protected Types | |
| enum | Mode { Build, Remove } |
Protected Member Functions | |
| bool | available (const MapCoordinate &pos, ContainerBase *subject, int num) |
| void | execute (const MapCoordinate &pos, ContainerBase *subject, int num) |
| Surface & | getImage (const MapCoordinate &pos, ContainerBase *subject, int num) |
| ASCString | getName (const MapCoordinate &pos, ContainerBase *subject, int num) |
| bool | checkForKey (const SDL_KeyboardEvent *key, int modifier, int num) |
| void | addButton (int &num, const MapCoordinate &mc, ContainerBase *subject, int id) |
Definition at line 1403 of file guifunctions.cpp.
enum GuiFunctions::ObjectBuildingGui::Mode [protected] |
| GuiFunctions::ObjectBuildingGui::ObjectBuildingGui | ( | ) | [inline] |
| bool GuiFunctions::ObjectBuildingGui::available | ( | const MapCoordinate & | pos, | |
| ContainerBase * | subject, | |||
| int | num | |||
| ) | [protected, virtual] |
| void GuiFunctions::ObjectBuildingGui::execute | ( | const MapCoordinate & | pos, | |
| ContainerBase * | subject, | |||
| int | num | |||
| ) | [protected, virtual] |
Implements GuiFunction.
Definition at line 1458 of file guifunctions.cpp.
References actmap, GameMap::cleartemps(), createContext(), displayActionError(), GameAction::execute(), NewGuiHost::pendingCommand, NewGuiHost::popIconHandler(), repaintMap, PutObjectCommand::setTarget(), ActionResult::successful(), and updateFieldInfo.
| Surface & GuiFunctions::ObjectBuildingGui::getImage | ( | const MapCoordinate & | pos, | |
| ContainerBase * | subject, | |||
| int | num | |||
| ) | [protected, virtual] |
Implements GuiFunction.
Definition at line 1514 of file guifunctions.cpp.
References GuiFunctions::buildGuiIcon(), IconRepository::getIcon(), ObjectType::getPicture(), and objectTypeRepository.
| ASCString GuiFunctions::ObjectBuildingGui::getName | ( | const MapCoordinate & | pos, | |
| ContainerBase * | subject, | |||
| int | num | |||
| ) | [protected, virtual] |
Implements GuiFunction.
Definition at line 1534 of file guifunctions.cpp.
References ObjectType::build_movecost, ObjectType::buildcost, ASCString::format(), Resources::fuel, Resources::material, ObjectType::name, objectTypeRepository, ObjectType::remove_movecost, and ObjectType::removecost.
| bool GuiFunctions::ObjectBuildingGui::checkForKey | ( | const SDL_KeyboardEvent * | key, | |
| int | modifier, | |||
| int | num | |||
| ) | [protected, virtual] |
| void GuiFunctions::ObjectBuildingGui::addButton | ( | int & | num, | |
| const MapCoordinate & | mc, | |||
| ContainerBase * | subject, | |||
| int | id | |||
| ) | [protected] |
Definition at line 1555 of file guifunctions.cpp.
References NewGuiHost::getButton(), GuiIconHandler::host, and GuiButton::registerFunc().
Referenced by eval().
| bool GuiFunctions::ObjectBuildingGui::init | ( | Vehicle * | vehicle | ) |
Definition at line 1435 of file guifunctions.cpp.
| void GuiFunctions::ObjectBuildingGui::eval | ( | const MapCoordinate & | mc, | |
| ContainerBase * | subject | |||
| ) | [virtual] |
checks evaluates the field on which the cursor resides
Reimplemented from GuiIconHandler.
Definition at line 1565 of file guifunctions.cpp.
References addButton(), NewGuiHost::disableButtons(), NewGuiHost::getButton(), PutObjectCommand::getCreatableObjects(), PutObjectCommand::getRemovableObjects(), GuiIconHandler::host, NewGuiHost::pendingCommand, and GuiButton::registerFunc().
1.5.1