Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

dialog.cpp File Reference

Many many dialog boxes used by the game and the mapeditor. More...

#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 dependency graph for dialog.cpp:

Go to the source code of this file.

Defines

#define markedlettercolor   red
#define klickconst   100
#define delayconst   10
#define blocksize   256

Functions

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)


Detailed Description

Many many dialog boxes used by the game and the mapeditor.

Definition in file dialog.cpp.


Define Documentation

#define blocksize   256
 

Definition at line 2244 of file dialog.cpp.

Referenced by tparagraph::changesize(), tplasma::generateplasma(), MemoryStreamCopy::MemoryStreamCopy(), and tparagraph::tparagraph().

#define delayconst   10
 

Definition at line 462 of file dialog.cpp.

#define klickconst   100
 

Definition at line 461 of file dialog.cpp.

#define markedlettercolor   red
 

Definition at line 63 of file dialog.cpp.


Function Documentation

void appendTerrainBits char *  text,
const TerrainBits bdt
 

Definition at line 2168 of file dialog.cpp.

References terrainProperty, and terrainPropertyNum.

Referenced by viewterraininfo().

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 1938 of file dialog.cpp.

References tdialogbox::done(), tbi3preferences::init(), and tbi3preferences::run().

Referenced by execuseraction().

int choice_dlg const ASCString title,
const ASCString leftButton,
const ASCString rightButton
 

displays a dialog with two buttons, to select one of them

Parameters:
title,: the message text; printf style arguments allowed
leftButton the text on the left button
rightButton the text on the right button
Returns:
1 if the left button has been pressed; 2 if the right button has been pressed

Definition at line 610 of file dialog.cpp.

References legacy_choice_dlg(), legacyEventSystemActive(), and new_choice_dlg().

Referenced by checkforreplay(), checkforvictory(), execaction_pg(), execuseraction(), execuseraction2(), GuiFunctions::SelfDestructIcon::execute(), GuiFunctions::EndTurn::execute(), CargoGuiFunctions::RecycleUnit::execute(), FileSelectionWindow::fileNameSelected(), gamethread(), generateTechTree(), mapeditorMainThread(), next_turn(), ObjectItem::place(), BuildingItem::place(), VehicleProduction_SelectionWindow::removeProductionLine(), FileTransfer::send(), tmapgenerator::setmap(), DisplayEllipse::setup(), and viewOwnReplay().

void choosezoomlevel void   ) 
 

Definition at line 2138 of file dialog.cpp.

References displaymap(), tdialogbox::done(), tchoosezoomlevel::init(), and tchoosezoomlevel::run().

void dispmessage2 int  id,
const char *  st
 

displays a message in the message line

Definition at line 466 of file dialog.cpp.

References displaymessage2(), getmessage(), s1, and s2.

Referenced by GuiFunctions::ConstructBuilding::execute(), GuiFunctions::RefuelUnit::execute(), GuiFunctions::RepairUnit::execute(), GuiFunctions::EnableReactionfire::execute(), GuiFunctions::Attack::execute(), GuiFunctions::Descend::execute(), GuiFunctions::Ascend::execute(), GuiFunctions::Movement::execute(), GuiFunctions::AttackGui::execute(), giveunitaway(), tsearchdestructbuildingfields::initdestructbuilding(), putMine(), and GuiFunctions::BuildingConstruction::setBuilding().

int editInt const ASCString title,
int  defaultValue,
int  minValue,
int  maxValue
 

Definition at line 2979 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 583 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 2070 of file dialog.cpp.

References displaymap(), tdialogbox::done(), ResizeMap::init(), and ResizeMap::run().

Referenced by execaction().

void selectgraphicset void   ) 
 

Definition at line 2967 of file dialog.cpp.

References actmap, displaymap(), getGraphicSetIdFromFilename(), GameMap::graphicset, and selectFile().

Referenced by execaction_pg(), and execuseraction2().

void showbdtbits void   ) 
 

Definition at line 2151 of file dialog.cpp.

References actmap, tfield::bdt, displaymessage(), GameMap::getCursor(), GameMap::getField(), terrainProperty, and terrainPropertyNum.

void unpack_date unsigned short  packed,
int &  day,
int &  month,
int &  year
 

Definition at line 625 of file dialog.cpp.

void unpack_time unsigned short  packed,
int &  sec,
int &  min,
int &  hour
 

Definition at line 639 of file dialog.cpp.

void viewUnitSetinfo void   ) 
 

Definition at line 2183 of file dialog.cpp.

References actmap, Vehicletype::description, fieldvisiblenow(), GameMap::getCursor(), GameMap::getField(), GameMap::getPlayer(), ContainerBaseType::id, LoadableItemType::location, ContainerBaseType::name, ASC_PG_Dialog::RunModal(), PG_Widget::Show(), ASCString::toString(), SingleUnitSet::unit, and unitSets.

Referenced by execaction(), and execuseraction().

void viewVisibilityStatistics  ) 
 

Definition at line 868 of file dialog.cpp.

References tdialogbox::done(), tviewanytext::init(), and tviewanytext::run().


Generated on Tue Jun 24 01:39:36 2008 for Advanced Strategic Command by  doxygen 1.4.2