#include <stdio.h>
#include <cstring>
#include <ctype.h>
#include <stdlib.h>
#include <stdarg.h>
#include "typen.h"
#include "buildingtype.h"
#include "vehicletype.h"
#include "basegfx.h"
#include "newfont.h"
#include "spfst.h"
#include "loaders.h"
#include "misc.h"
#include "events.h"
#include "stack.h"
#include "dlg_box.h"
#include "dialog.h"
#include "sgstream.h"
#include "attack.h"
#include "gameoptions.h"
#include "errors.h"
#include "itemrepository.h"
#include "mapdisplay.h"
#include "graphicset.h"
#include "viewcalculation.h"
#include "paradialog.h"
#include "cannedmessages.h"
#include "dialogs/messagedialog.h"
#include "dialogs/fileselector.h"
#include "widgets/textrenderer.h"
#include "unitset.h"
#include "spfst-legacy.h"
Include dependency graph for dialog.cpp:

Go to the source code of this file.
Classes | |
| class | tchoice_dlg |
| class | tbi3preferences |
| class | ResizeMap |
| class | tchoosezoomlevel |
Defines | |
| #define | markedlettercolor red |
| #define | klickconst 100 |
| #define | delayconst 10 |
| #define | blocksize 256 |
Functions | |
| void | dispmessage2 (const ActionResult &result) |
| void | dispmessage2 (int id, const char *st) |
| displays a message in the message line | |
| int | legacy_choice_dlg (const char *title, const char *s1, const char *s2,...) |
| int | choice_dlg (const ASCString &title, const ASCString &leftButton, const ASCString &rightButton) |
| void | unpack_date (unsigned short packed, int &day, int &month, int &year) |
| void | unpack_time (unsigned short packed, int &sec, int &min, int &hour) |
| void | viewVisibilityStatistics () |
| void | bi3preferences (void) |
| the dialog box for setting up how to load bi3 graphics and maps. Since ASC now uses its own graphics, this dialog is not used any more. | |
| void | resizemap (void) |
| a dialog box that lets a user resize the active map. Should only be used in the mapeditor | |
| void | choosezoomlevel (void) |
| void | showbdtbits (void) |
| void | appendTerrainBits (char *text, const TerrainBits *bdt) |
| void | viewUnitSetinfo (void) |
| void | selectgraphicset (void) |
| int | editInt (const ASCString &title, int defaultValue, int minValue, int maxValue) |
| void | displayActionError (const ActionResult &result, const ASCString &additionalInfo) |
Definition in file dialog.cpp.
| #define blocksize 256 |
Definition at line 1430 of file dialog.cpp.
Referenced by tparagraph::changesize(), tplasma::generateplasma(), MemoryStreamCopy::MemoryStreamCopy(), and tparagraph::tparagraph().
| #define delayconst 10 |
Definition at line 463 of file dialog.cpp.
| #define klickconst 100 |
Definition at line 462 of file dialog.cpp.
| #define markedlettercolor red |
Definition at line 64 of file dialog.cpp.
| void appendTerrainBits | ( | char * | text, | |
| const TerrainBits * | bdt | |||
| ) |
| void bi3preferences | ( | void | ) |
the dialog box for setting up how to load bi3 graphics and maps. Since ASC now uses its own graphics, this dialog is not used any more.
Definition at line 1124 of file dialog.cpp.
References tdialogbox::done(), tbi3preferences::init(), and tbi3preferences::run().
Referenced by executeUserAction().
| int choice_dlg | ( | const ASCString & | title, | |
| const ASCString & | leftButton, | |||
| const ASCString & | rightButton | |||
| ) |
displays a dialog with two buttons, to select one of them
| title,: | the message text; printf style arguments allowed | |
| leftButton | the text on the left button | |
| rightButton | the text on the right button |
Definition at line 616 of file dialog.cpp.
References legacy_choice_dlg(), legacyEventSystemActive(), and new_choice_dlg().
Referenced by checkforreplay(), checkforvictory(), NextTurnStrategy_AskUser::continueWhenLastPlayer(), execaction_pg(), GuiFunctions::SelfDestructIcon::execute(), GuiFunctions::EndTurn::execute(), CargoGuiFunctions::RecycleUnitCommandButton::execute(), executeUserAction(), SavegameSelectionWindow::fileNameSelected(), FileSelectionWindow::fileNameSelected(), gamethread(), generateTechTree(), mapeditorMainThread(), ObjectItem::place(), BuildingItem::place(), VehicleProduction_SelectionWindow::removeProductionLine(), runPendingTasks(), FileTransfer::send(), tmapgenerator::setmap(), DisplayEllipse::setup(), and viewOwnReplay().
| void choosezoomlevel | ( | void | ) |
Definition at line 1324 of file dialog.cpp.
References displaymap(), tdialogbox::done(), tchoosezoomlevel::init(), and tchoosezoomlevel::run().
| void displayActionError | ( | const ActionResult & | result, | |
| const ASCString & | additionalInfo | |||
| ) |
Definition at line 2170 of file dialog.cpp.
References errorMessage(), ActionResult::getCode(), getmessage(), and ActionResult::getMessage().
Referenced by trunreplay::execnextreplaymove(), GuiFunctions::SelfDestructIcon::execute(), GuiFunctions::ConstructBuilding::execute(), GuiFunctions::ObjectBuildingGui::execute(), GuiFunctions::RemoveMine::execute(), GuiFunctions::PutMineStage2::execute(), GuiFunctions::RepairUnit::execute(), GuiFunctions::JumpDriveIcon::execute(), GuiFunctions::DisableReactionfire::execute(), GuiFunctions::EnableReactionfire::execute(), GuiFunctions::DestructBuilding::execute(), GuiFunctions::PowerSwitch::execute(), CargoGuiFunctions::RecycleUnitCommandButton::execute(), CargoGuiFunctions::TransferUnitControl::execute(), CargoGuiFunctions::RefuelUnitCommand::execute(), CargoGuiFunctions::UnitTraining::execute(), CargoGuiFunctions::UnitProduction::execute(), executeUserAction(), ChooseTech::ok(), InternalAmmoTransferHandler::performTransfer(), VehicleProduction_SelectionWindow::removeProductionLine(), BuildingControlWindow::repair(), tgiveunitawaydlg::run(), and AddProductionLine_SelectionItemFactory::vehicleTypeSelected().
| void dispmessage2 | ( | int | id, | |
| const char * | st | |||
| ) |
| void dispmessage2 | ( | const ActionResult & | result | ) |
Definition at line 466 of file dialog.cpp.
Referenced by dispmessage2(), GuiFunctions::ConstructBuilding::execute(), GuiFunctions::BuildVehicleCommand::execute(), GuiFunctions::RefuelUnitCommand::execute(), GuiFunctions::RepairUnit::execute(), GuiFunctions::JumpDriveIcon::execute(), GuiFunctions::DestructBuilding::execute(), GuiFunctions::Attack::execute(), GuiFunctions::MovementBase::execute(), GuiFunctions::AttackGui::execute(), CargoGuiFunctions::Movement::execute(), giveunitaway(), and runOpenTasks().
| int editInt | ( | const ASCString & | title, | |
| int | defaultValue, | |||
| int | minValue, | |||
| int | maxValue | |||
| ) |
Definition at line 2165 of file dialog.cpp.
References getid().
Referenced by editResearchPoints(), AddResources::setup(), SetViewSharing::setup(), ChangePlayerState::setup(), ChangeDiplomaticStatus::setup(), NextMap::setup(), ChangeBuildingDamage::setup(), DisplayMessage::setup(), WindChange::setup(), ResourceTribute::setup(), and TurnPassed::setup().
| int legacy_choice_dlg | ( | const char * | title, | |
| const char * | s1, | |||
| const char * | s2, | |||
| ... | ||||
| ) |
Definition at line 589 of file dialog.cpp.
References displaymessage(), tdialogbox::done(), tchoice_dlg::init(), tchoice_dlg::result, and tchoice_dlg::run().
Referenced by choice_dlg().
| void resizemap | ( | void | ) |
a dialog box that lets a user resize the active map. Should only be used in the mapeditor
Definition at line 1256 of file dialog.cpp.
References displaymap(), tdialogbox::done(), ResizeMap::init(), and ResizeMap::run().
Referenced by execaction().
| void selectgraphicset | ( | void | ) |
Definition at line 2153 of file dialog.cpp.
References actmap, displaymap(), getGraphicSetIdFromFilename(), GameMap::graphicset, and selectFile().
Referenced by execaction_pg(), and executeUserAction().
| void showbdtbits | ( | void | ) |
Definition at line 1337 of file dialog.cpp.
References actmap, MapField::bdt, displaymessage(), GameMap::getCursor(), GameMap::getField(), terrainProperty, and terrainPropertyNum.
| void unpack_date | ( | unsigned short | packed, | |
| int & | day, | |||
| int & | month, | |||
| int & | year | |||
| ) |
Definition at line 631 of file dialog.cpp.
| void unpack_time | ( | unsigned short | packed, | |
| int & | sec, | |||
| int & | min, | |||
| int & | hour | |||
| ) |
Definition at line 645 of file dialog.cpp.
| void viewUnitSetinfo | ( | void | ) |
Definition at line 1369 of file dialog.cpp.
References actmap, ContainerBaseType::description, fieldvisiblenow(), GameMap::getCursor(), GameMap::getField(), Player::getName(), GameMap::getPlayer(), ContainerBaseType::id, LoadableItemType::location, ContainerBaseType::name, ASC_PG_Dialog::RunModal(), ASCString::toString(), SingleUnitSet::unit, and unitSets.
Referenced by execaction(), and executeUserAction().
| void viewVisibilityStatistics | ( | ) |
Definition at line 874 of file dialog.cpp.
References tdialogbox::done(), tviewanytext::init(), and tviewanytext::run().
1.5.1