$treeview $search $mathjax
Stratagus  2.2.7
$projectbrief
$projectbrief
$searchbox
-->
         _________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

CContentTypeFormattedText Class Reference

#include <ui.h>

Inheritance diagram for CContentTypeFormattedText:

CContentType

List of all members.


Public Member Functions

 CContentTypeFormattedText ()
virtual ~CContentTypeFormattedText ()
mainscr.cpp - The main screen.
virtual void Draw (const CUnit &unit, CFont *defaultfont) const

Public Attributes

std::string Format
CFontFont
 Text to display.
bool Centered
 Font to use.
int Index
 if true, center the display.
EnumVariable Component
 Index of the variable to show.

Detailed Description

Show formatted text with variable value.

Constructor & Destructor Documentation

CContentTypeFormattedText::CContentTypeFormattedText (  )  [inline]

virtual CContentTypeFormattedText::~CContentTypeFormattedText (  )  [inline, virtual]


Member Function Documentation

void CContentTypeFormattedText::Draw ( const CUnit unit,
CFont defaultfont 
) const [virtual]

Draw formatted text with variable value.

Parameters:
unit unit with variable to show.
defaultfont default font if no specific font in extra data.
Note:
text is limited to 256 chars. (enough?)

text must have exactly 1 d.

Bug:
if text format is incorrect.

Implements CContentType.


Member Data Documentation

if true, center the display.

Index of the variable to show.


The documentation for this class was generated from the following files:
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.