$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

CContentTypeFormattedText2 Class Reference

#include <ui.h>

Inheritance diagram for CContentTypeFormattedText2:

CContentType

List of all members.


Public Member Functions

 CContentTypeFormattedText2 ()
virtual ~CContentTypeFormattedText2 ()
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 Index1
 if true, center the display.
EnumVariable Component1
 Index of the variable1 to show.
int Index2
 Component of the variable1.
EnumVariable Component2
 Index of the variable to show.

Detailed Description

Show formatted text with variable value.

Constructor & Destructor Documentation

CContentTypeFormattedText2::CContentTypeFormattedText2 (  )  [inline]

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


Member Function Documentation

void CContentTypeFormattedText2::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 2 d.

Bug:
if text format is incorrect.

Implements CContentType.


Member Data Documentation

if true, center the display.

Index of the variable1 to show.

Component of the variable1.

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.