Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

SolverDrawer Class Reference

Inheritance diagram for SolverDrawer:

Inheritance graph
[legend]
Collaboration diagram for SolverDrawer:

Collaboration graph
[legend]

Detailed Description

Draws the best solver.

Definition at line 11 of file SolverDrawer.h.

Public Member Functions

 SolverDrawer (LevelStatus *status)
 Prepares to draw info about best solver.


Constructor & Destructor Documentation

SolverDrawer::SolverDrawer LevelStatus status  ) 
 

Prepares to draw info about best solver.

Parameters:
status shared level status

Definition at line 24 of file SolverDrawer.cpp.

00025 {
00026     try {
00027         Font usedFont(Path::dataReadPath("font/font_menu.ttf"), 14);
00028         SDL_Color usedColor = {255, 255, 255, 255};
00029 
00030         Labels labels(Path::dataReadPath("script/labels.lua"));
00031         const char *labelName;
00032         switch (status->compareToBest()) {
00033             case 1:
00034                 labelName = "solver_better";
00035                 break;
00036             case 0:
00037                 labelName = "solver_equals";
00038                 break;
00039             default:
00040                 labelName = "solver_worse";
00041         }
00042         StringTool::t_args args;
00043         args.push_back("");
00044         args.push_back(StringTool::toString(status->getBestMoves()));
00045         args.push_back(status->getBestAuthor());
00046 
00047         WiPara *para = new WiPara(
00048                 labels.getFormatedLabel(labelName, args),
00049                 usedFont, usedColor);
00050         para->enableCentered();
00051         para->recenter();
00052         addWidget(para);
00053     }
00054     catch (BaseException &e) {
00055         LOG_WARNING(e.info());
00056     }
00057 }


The documentation for this class was generated from the following files:
Generated on Wed Jun 1 09:56:52 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2