示例#1
0
/**
 *  fügt eine Tabelle hinzu.
 *  ... sollte eine Menge von const char*, int und SortType sein
 *
 *  @author OLiver
 */
ctrlTable *Window::AddTable(unsigned int id,
							unsigned short x, 
							unsigned short y, 
							unsigned short width, 
							unsigned short height, 
							TextureColor tc, 
							glArchivItem_Font *font, 
							unsigned int columns, 
							...)
{
	ctrlTable *ctrl;
	va_list liste;
	va_start(liste, columns);

	if(scale)
	{
		x = ScaleX(x);
		y = ScaleY(y);
		width = ScaleX(width);
		height = ScaleY(height);
	}

	ctrl = new ctrlTable(this, id, x, y, width, height, tc, font, columns, liste);
	
	va_end(liste);

	return AddCtrl(id, ctrl);
}
示例#2
0
/**
 *  fügt eine ProgressBar hinzu.
 *
 *  @author OLiver
 */
ctrlProgress *Window::AddProgress(unsigned int id,
								  unsigned short x,
								  unsigned short y,
								  unsigned short width,
								  unsigned short height,
								  TextureColor tc,
								  unsigned short button_minus,
								  unsigned short button_plus,
								  unsigned short maximum,
								  const std::string& tooltip,
								  unsigned short x_padding,
								  unsigned short y_padding,
								  unsigned int force_color,
								  const std::string& button_minus_tooltip,
								  const std::string& button_plus_tooltip)
{
	if(scale)
	{
		x = ScaleX(x);
		y = ScaleY(y);
		width = ScaleX(width);
		height = ScaleY(height);
	}

	return AddCtrl(id, new ctrlProgress(this, id, x, y, width, height, tc, button_minus, button_plus, maximum, x_padding, y_padding, force_color, tooltip, button_minus_tooltip, button_plus_tooltip));
}
示例#3
0
/**
 *  fügt ein vertieftes variables TextCtrl hinzu.
 *
 *  @author FloSoft
 */
ctrlVarDeepening *Window::AddVarDeepening(unsigned int id, 
									 unsigned short x, 
									 unsigned short y, 
									 unsigned short width, 
									 unsigned short height, 
									 TextureColor tc, 
									 const std::string& formatstr,  
									 glArchivItem_Font *font,
									 unsigned int color,
									 unsigned int parameters, 
									 ...)
{
	ctrlVarDeepening *ctrl;
	va_list liste;
	va_start(liste, parameters);

	if(scale)
	{
		x = ScaleX(x);
		y = ScaleY(y);
		width = ScaleX(width);
		height = ScaleY(height);
	}

	ctrl = new ctrlVarDeepening(this, id, x, y, width, height, tc, formatstr, font, color, parameters, liste);
	
	va_end(liste);

	return AddCtrl(id, ctrl);
}
示例#4
0
文件: cockpit.cpp 项目: paud/d2x-xl
void CCockpit::SetupWindow (int nWindow, CCanvas* canvP)
{
tGaugeBox* hudAreaP = hudWindowAreas + COCKPIT_PRIMARY_BOX + nWindow;
gameStates.render.vr.buffers.render->SetupPane (
	canvP,
	ScaleX (hudAreaP->left),
	ScaleY (hudAreaP->top),
	ScaleX (hudAreaP->right - hudAreaP->left+1),
	ScaleY (hudAreaP->bot - hudAreaP->top+1));
}
示例#5
0
/// fügt einen Color-ButtonCtrl hinzu.
ctrlColorButton *Window::AddColorButton(unsigned int id, unsigned short x, unsigned short y,unsigned short width, unsigned short height, const TextureColor tc, const unsigned int fillColor, const std::string& tooltip)
{
	if(scale)
	{
		x = ScaleX(x);
		y = ScaleY(y);
		width = ScaleX(width);
		height = ScaleY(height);
	}

	return AddCtrl(id, new ctrlColorButton(this, id, x, y, width, height, tc, fillColor, tooltip));
}
示例#6
0
/// fügt einen Image-ButtonCtrl hinzu.
ctrlImageButton *Window::AddImageButton(unsigned int id, unsigned short x, unsigned short y,unsigned short width, unsigned short height, const TextureColor tc,glArchivItem_Bitmap * const image,  const std::string& tooltip)
{
	if(scale)
	{
		x = ScaleX(x);
		y = ScaleY(y);
		width = ScaleX(width);
		height = ScaleY(height);
	}

	return AddCtrl(id, new ctrlImageButton(this, id, x, y, width, height, tc, image,tooltip));
}
示例#7
0
/// fügt einen Text-ButtonCtrl hinzu.
ctrlTextButton *Window::AddTextButton(unsigned int id, unsigned short x, unsigned short y,unsigned short width, unsigned short height, const TextureColor tc,const std::string& text,  glArchivItem_Font *font, const std::string& tooltip)
{
	if(scale)
	{
		x = ScaleX(x);
		y = ScaleY(y);
		width = ScaleX(width);
		height = ScaleY(height);
	}

	return AddCtrl(id, new ctrlTextButton(this, id, x, y, width, height, tc, text,font,tooltip));
}
示例#8
0
文件: statusbar.cpp 项目: paud/d2x-xl
CBitmap* CStatusBar::StretchBlt (int nGauge, int x, int y, double xScale, double yScale, int scale, int orient)
{
	CBitmap* bmP = NULL;

if (nGauge >= 0) {
	PageInGauge (nGauge);
	CBitmap* bmP = gameData.pig.tex.bitmaps [0] + GaugeIndex (nGauge);
	if (bmP)
		bmP->RenderScaled (ScaleX (x), ScaleY (y), 
								 ScaleX ((int) (bmP->Width () * xScale + 0.5)), ScaleY ((int) (bmP->Height () * yScale + 0.5)), 
								 scale, orient, NULL);
	}
return bmP;
}
示例#9
0
/**
 *  fügt ein variables TextCtrl hinzu.
 *
 *  @param[in] x          X-Koordinate des Steuerelements
 *  @param[in] y          Y-Koordinate des Steuerelements
 *  @param[in] formatstr  Der Formatstring des Steuerelements
 *  @param[in] color      Textfarbe
 *  @param[in] format     Formatierung des Textes
 *                          @p 0    - Text links ( standard )
 *                          @p glArchivItem_Font::DF_CENTER  - Text mittig
 *                          @p glArchivItem_Font::DF_RIGHT   - Text rechts
 *                          @p glArchivItem_Font::DF_TOP     - Text oben ( standard )
 *                          @p glArchivItem_Font::DF_VCENTER - Text vertikal zentriert
 *                          @p glArchivItem_Font::DF_BOTTOM  - Text unten
 *  @param[in] font       Schriftart
 *  @param[in] parameters Anzahl der nachfolgenden Parameter
 *  @param[in] ...        die variablen Parameter
 *
 *  @author OLiver
 */
ctrlVarText *Window::AddVarText(unsigned int id, 
								unsigned short x, 
								unsigned short y, 
								 const std::string& formatstr, 
								unsigned int color, 
								unsigned int format, 
								glArchivItem_Font *font, 
								unsigned int parameters, 
								...)
{
	ctrlVarText *ctrl;
	va_list liste;
	va_start(liste, parameters);

	if(scale)
	{
		x = ScaleX(x);
		y = ScaleY(y);
	}

	ctrl = new ctrlVarText(this, id, x, y, formatstr, color, format, font, parameters, liste);
	
	va_end(liste);

	return AddCtrl(id, ctrl);
}
示例#10
0
/**
 *  Größe verändern
 */
void ctrlComboBox::Resize_(unsigned short width, unsigned short height)
{
    ctrlButton* button = GetCtrl<ctrlButton>(1);
    if(button)
    {
        button->Move(width - height, 0);
        button->Resize(height, height);
    }

    ctrlList* list = GetCtrl<ctrlList>(0);

    unsigned short list_height = 4;

    // Langsam die Höhe der maximalen annähern
    for(unsigned int i = 0; i < list->GetLineCount(); ++i)
    {
        // zu große geworden?
        list_height += font->getHeight();

        if(list_height > (scale_ ? ScaleY(max_list_height) : max_list_height))
        {
            // kann nicht mal ein Item aufnehmen, dann raus
            if(i == 0)
                return;

            // Höhe um eins erniedrigen, damits wieder kleiner ist als die maximale
            list_height -= font->getHeight();;

            break;
        }
    }

    list->Move(0, height);
    list->Resize(width, list_height);
}
示例#11
0
文件: statusbar.cpp 项目: paud/d2x-xl
void CStatusBar::DrawAfterburner (void)
{
if (gameStates.app.bD1Mission)
	return;

	static int nIdAfterBurner = 0;

	char szAB [3] = "AB";

CCanvas::Push ();
fontManager.SetScale (floor (float (CCanvas::Current ()->Width ()) / 640.0f));
CCanvas::SetCurrent (CurrentGameScreen ());
if (LOCALPLAYER.flags & PLAYER_FLAGS_AFTERBURNER)
	fontManager.SetColorRGBi (RGBA_PAL2 (45, 21, 0), 1, 0, 0);
else 
	fontManager.SetColorRGBi (RGBA_PAL2 (12, 12, 12), 1, 0, 0);

int w, h, aw;
fontManager.Current ()->StringSize (szAB, w, h, aw);
nIdAfterBurner = PrintF (&nIdAfterBurner, 
								 -(ScaleX (SB_AFTERBURNER_GAUGE_X) + (ScaleX (SB_AFTERBURNER_GAUGE_W) - w) / 2), 
								 -(ScaleY (SB_AFTERBURNER_GAUGE_Y + SB_AFTERBURNER_GAUGE_H - m_info.nLineSpacing) + HeightPad ()), 
								 "AB");
fontManager.SetScale (1.0f);
CCanvas::Pop ();
}
示例#12
0
ctrlPreviewMinimap *Window::AddPreviewMinimap(const unsigned id,
				 unsigned short x, 
				 unsigned short y, 
				  unsigned short width, 
				  unsigned short height,
				 glArchivItem_Map * const map)
{
	if(scale)
	{
		x = ScaleX(x);
		y = ScaleY(y);
		width = ScaleX(width);
		height = ScaleY(height);
	}

	return AddCtrl(id, new ctrlPreviewMinimap(this, id, x, y, width, height, map));
}
示例#13
0
/**
 *  fügt ein ListCtrl hinzu.
 *
 *  @author OLiver
 */
ctrlList *Window::AddList(unsigned int id,
						  unsigned short x,
						  unsigned short y,
						  unsigned short width,
						  unsigned short height,
						  TextureColor tc,
						  glArchivItem_Font *font)
{
	if(scale)
	{
		x = ScaleX(x);
		y = ScaleY(y);
		width = ScaleX(width);
		height = ScaleY(height);
	}

	return AddCtrl(id, new ctrlList(this, id, x, y, width, height, tc, font));
}
示例#14
0
文件: cockpit.cpp 项目: paud/d2x-xl
int CCockpit::DrawBombCount (int& nIdBombCount, int x, int y, int nColor, char* pszBombCount)
{
CCanvas::Push ();
CCanvas::SetCurrent (CurrentGameScreen ());
fontManager.SetColorRGBi (nColor, 1, 0, 1);
int i = PrintF (&nIdBombCount, -(ScaleX (x) + WidthPad (pszBombCount)), -(ScaleY (y) + HeightPad ()), pszBombCount, nIdBombCount);
CCanvas::Pop ();
return i;
}
示例#15
0
/**
 *  adds a colored Deepening
 *
 *  @author Divan
 */
ctrlColorDeepening *Window::AddColorDeepening(unsigned int id,
									unsigned short x,
									unsigned short y,
									unsigned short width, 
									unsigned short height, 
									TextureColor tc, 
									unsigned int fillColor)
{
	if(scale)
	{
		x = ScaleX(x);
		y = ScaleY(y);
		width = ScaleX(width);
		height = ScaleY(height);
	}

	return AddCtrl(id, new ctrlColorDeepening(this, id, x, y, width, height, tc, fillColor));
}
示例#16
0
bool CCoordTransService::Scale (const double &rdX, const double &rdY, KoOrd *pX, KoOrd *pY)
{
	if (NULL == pX || NULL == pY) 
		return false;

	*pX = ScaleX (rdX, rdY);
	*pY = ScaleY (rdX, rdY);
	return true;
}
示例#17
0
文件: Window.cpp 项目: jhkl/s25client
/**
 *  fügt ein mehrzeiliges TextCtrl hinzu.
 *
 *  @author Devil
 */
ctrlMultiline* Window::AddMultiline(unsigned int id,
                                    unsigned short x,
                                    unsigned short y,
                                    unsigned short width,
                                    unsigned short height,
                                    TextureColor tc,
                                    glArchivItem_Font* font,
                                    unsigned int format)
{
    if(scale_)
    {
        x = ScaleX(x);
        y = ScaleY(y);
        width = ScaleX(width);
        height = ScaleY(height);
    }

    return AddCtrl(id, new ctrlMultiline(this, id, x, y, width, height, tc, font, format));
}
示例#18
0
/**
 *  fügt eine Combobox hinzu.
 *
 *  @author OLiver
 */
ctrlComboBox *Window::AddComboBox(unsigned int id,
								  unsigned short x, 
								  unsigned short y,
								  unsigned short width,
								  unsigned short height,
								  TextureColor tc, 
								  glArchivItem_Font *font,
								  unsigned short max_list_height,
								  bool readonly)
{
	if(scale)
	{
		x = ScaleX(x);
		y = ScaleY(y);
		width = ScaleX(width);
		height = ScaleY(height);
	}

	return AddCtrl(id, new ctrlComboBox(this, id, x, y, width, height, tc, font, max_list_height, readonly));
}
示例#19
0
/**
 *  fügt eine Checkbox hinzu.
 *
 *  @author OLiver
 */
ctrlCheck *Window::AddCheckBox(unsigned int id,
							   unsigned short x, 
							   unsigned short y,
							   unsigned short width, 
							   unsigned short height,
							   TextureColor tc, 
							   const std::string& text, 
							   glArchivItem_Font *font, 
							   bool readonly)
{
	if(scale)
	{
		x = ScaleX(x);
		y = ScaleY(y);
		width = ScaleX(width);
		height = ScaleY(height);
	}

	return AddCtrl(id, new ctrlCheck(this, id, x, y, width, height, tc, text, font, readonly));
}
示例#20
0
/**
 *  fügt eine prozentuale ProgressBar hinzu.
 *
 *  @author OLiver
 */
ctrlPercent *Window::AddPercent(unsigned int id,
								unsigned short x,
								unsigned short y, 
								unsigned short width,
								unsigned short height,
								TextureColor tc, 
								unsigned int text_color, 
								glArchivItem_Font *font,
								const unsigned short *percentage)
{
	if(scale)
	{
		x = ScaleX(x);
		y = ScaleY(y);
		width = ScaleX(width);
		height = ScaleY(height);
	}

	return AddCtrl(id, new ctrlPercent(this, id, x, y, width, height, tc, text_color, font, percentage));
}
示例#21
0
/**
 *  fügt ein vertieftes TextCtrl hinzu.
 *
 *  @author OLiver
 */
ctrlDeepening *Window::AddDeepening(unsigned int id,
									unsigned short x,
									unsigned short y,
									unsigned short width, 
									unsigned short height, 
									TextureColor tc, 
									const std::string& text, 
									glArchivItem_Font *font, 
									unsigned int color)
{
	if(scale)
	{
		x = ScaleX(x);
		y = ScaleY(y);
		width = ScaleX(width);
		height = ScaleY(height);
	}

	return AddCtrl(id, new ctrlDeepening(this, id, x, y, width, height, tc, text, font, color));
}
示例#22
0
/**
 *  fügt eine Scrollbar hinzu.
 *
 *  @author OLiver
 */
ctrlScrollBar *Window::AddScrollBar(unsigned int id,
							  unsigned short x, 
							  unsigned short y,
							  unsigned short width, 
							  unsigned short height, 
							  unsigned short button_height, 
							  TextureColor tc, 
							  unsigned short page_size)
{
	if(scale)
	{
		x = ScaleX(x);
		y = ScaleY(y);
		width = ScaleX(width);
		height = ScaleY(height);
		button_height = ScaleY(button_height);
	}

	return AddCtrl(id, new ctrlScrollBar(this, id, x, y, width, height, button_height, tc, page_size));
}
示例#23
0
文件: statusbar.cpp 项目: paud/d2x-xl
void CStatusBar::DrawLives (void)
{
	static int nIdLives [2] = {0, 0}, nIdKilled = 0;
  
	char		szLives [20];
	int		w, h, aw;

CCanvas::Push ();
fontManager.SetScale (floor (float (CCanvas::Current ()->Width ()) / 640.0f));
CCanvas::SetCurrent (CurrentGameScreen ());
fontManager.SetColorRGBi (MEDGREEN_RGBA, 1, 0, 0);
strcpy (szLives, IsMultiGame ? TXT_DEATHS : TXT_LIVES);
fontManager.Current ()->StringSize (szLives, w, h, aw);
nIdLives [0] = PrintF (&nIdLives [0], -(ScaleX (SB_LIVES_LABEL_X + int (w / fontManager.Scale ())) - w), -ScaleY (SB_LIVES_LABEL_Y + HeightPad ()), szLives);

if (IsMultiGame) {
	static int lastX [4] = {SB_SCORE_RIGHT_L, SB_SCORE_RIGHT_L, SB_SCORE_RIGHT_H, SB_SCORE_RIGHT_H};

	char	szKilled [20];
	int	x = SB_LIVES_X, 
			y = -(ScaleY (SB_LIVES_Y + 1) + HeightPad ());

	sprintf (szKilled, "%5d", LOCALPLAYER.netKilledTotal);
	fontManager.Current ()->StringSize (szKilled, w, h, aw);
	CCanvas::Current ()->SetColorRGBi (RGB_PAL (0, 0, 0));
	Rect (lastX [(gameStates.video.nDisplayMode ? 2 : 0) + gameStates.render.vr.nCurrentPage], 
			y + 1, SB_SCORE_RIGHT, y + GAME_FONT->Height ());
	fontManager.SetColorRGBi (MEDGREEN_RGBA, 1, 0, 0);
	x = SB_SCORE_RIGHT - w - 2;	
	nIdKilled = PrintF (&nIdKilled, x, y + 1, szKilled);
	lastX [(gameStates.video.nDisplayMode ? 2 : 0) + gameStates.render.vr.nCurrentPage] = x;
	}
else if (LOCALPLAYER.lives > 1) {
	int y = -ScaleY (SB_LIVES_Y + HeightPad ());
	fontManager.SetColorRGBi (MEDGREEN_RGBA, 1, 0, 0);
	CBitmap* bmP = BitBlt (GAUGE_LIVES, SB_LIVES_X, SB_LIVES_Y);
	nIdLives [1] = PrintF (&nIdLives [1], SB_LIVES_X + bmP->Width () + m_info.fontWidth, y, "x %d", LOCALPLAYER.lives - 1);
	}
fontManager.SetScale (1.0f);
CCanvas::Pop ();
}
示例#24
0
void TorrentDialog::OnSize(UINT uMsg, UINT nType, SIZE size) {
  switch (uMsg) {
    case WM_SIZE: {
      win::Rect rcWindow;
      rcWindow.Set(0, 0, size.cx, size.cy);
      // Resize rebar
      rebar_.SendMessage(WM_SIZE, 0, 0);
      rcWindow.top += rebar_.GetBarHeight() + ScaleY(win::kControlMargin / 2);
      // Resize list
      list_.SetPosition(NULL, rcWindow);
    }
  }
}
示例#25
0
/**
 *  fügt ein EditCtrl hinzu.
 *
 *  @author OLiver
 */
ctrlEdit *Window::AddEdit(unsigned int id,
						  unsigned short x, 
						  unsigned short y, 
						  unsigned short width, 
						  unsigned short height, 
						  TextureColor tc, 
						  glArchivItem_Font *font,
						  unsigned short maxlength,
						  bool password, 
						  bool disabled,
						  bool notify)
{
	if(scale)
	{
		x = ScaleX(x);
		y = ScaleY(y);
		width = ScaleX(width);
		height = ScaleY(height);
	}

	return AddCtrl(id, new ctrlEdit(this, id, x, y, width, height, tc, font, maxlength, password, disabled, notify));
}
示例#26
0
/**
 *  fügt ein ImageCtrl hinzu.
 *
 *  @author OLiver
 */
ctrlImage *Window::AddImage(unsigned int id,
							unsigned short x,
							unsigned short y,
							glArchivItem_Bitmap *image, const std::string& tooltip)
{
	if(scale)
	{
		x = ScaleX(x);
		y = ScaleY(y);
	}

	return AddCtrl(id, new ctrlImage(this, id, x, y, image, tooltip));
}
示例#27
0
void ControlPointsWidget::CalculateWorkingData()
{
    m_bHasWorkingData = true;
    m_dScaleX = ((double)m_rcChartPlotArea.width()) / POINTS_MAX;
    m_dScaleY = ((double)m_rcChartPlotArea.height()) / POINTS_MAX;

    for ( int i = 0; i < (int)m_Points.size(); i++ )
    {
	int x = ScaleX( m_Points[i].lP );
	int y = ScaleY( m_Points[i].dwLog );

	m_rcScreenPoints[i] = QRect( QPoint(x-3,y-3), QSize(7,7));
    }
}
示例#28
0
/**
 *  fügt ein TabCtrl hinzu.
 *
 *  @author OLiver
 */
ctrlTab *Window::AddTabCtrl(unsigned int id,
						unsigned short x, 
						unsigned short y, 
						unsigned short width)
{
	if(scale)
	{
		x = ScaleX(x);
		y = ScaleY(y);
		width = ScaleX(width);
	}

	return AddCtrl(id, new ctrlTab(this, id, x, y, width));
}
示例#29
0
文件: cockpit.cpp 项目: paud/d2x-xl
void CCockpit::DrawAfterburnerBar (void)
{
#if 1
if (!(LOCALPLAYER.flags & PLAYER_FLAGS_AFTERBURNER))
	return;		//don't draw if don't have
if (!gameData.physics.xAfterburnerCharge)
	return;
#endif
//CCanvas::Current ()->SetColorRGB (255, 255, 255, 255);
BitBlt (GAUGE_AFTERBURNER, AFTERBURNER_GAUGE_X, AFTERBURNER_GAUGE_Y);
int yMax = FixMul (I2X (1) - gameData.physics.xAfterburnerCharge, AFTERBURNER_GAUGE_H);
if (yMax) {
	int		x [4], y [4];
	ubyte*	tableP = gameStates.video.nDisplayMode ? afterburnerBarTableHires : afterburnerBarTable;

	y [0] = y [1] = ScaleY (AFTERBURNER_GAUGE_Y);
	y [3] = ScaleY (AFTERBURNER_GAUGE_Y + yMax) - 1;
	x [1] = ScaleX (AFTERBURNER_GAUGE_X + tableP [0]);
	x [0] = ScaleX (AFTERBURNER_GAUGE_X + tableP [1] + 1);
	x [2] = x [1];
	y [2] = 0;
	for (int i = 1; i < yMax - 1; i++)
		if (x [2] >= tableP [2 * i]) {
			x [2] = tableP [2 * i];
			y [2] = i;
			}
	x [2] = ScaleX (AFTERBURNER_GAUGE_X + x [2] + 1);
	y [2] = ScaleY (AFTERBURNER_GAUGE_Y + y [2]);
	x [3] = ScaleX (AFTERBURNER_GAUGE_X + tableP [2 * yMax - 1] + 1);
	gameStates.render.grAlpha = 1.0f;
	glEnable (GL_BLEND);
	glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
	OglDrawFilledPoly (x, y, 4, gaugeFadeColors [0], 1);
	glDisable (GL_BLEND);
	}
}
示例#30
0
/**
 *  fügt ein TextCtrl hinzu.
 *
 *  @param[in] x      X-Koordinate des Steuerelements
 *  @param[in] y      Y-Koordinate des Steuerelements
 *  @param[in] text   Text
 *  @param[in] color  Textfarbe
 *  @param[in] format Formatierung des Textes
 *                      @p 0    - Text links ( standard )
 *                      @p glArchivItem_Font::DF_CENTER  - Text mittig
 *                      @p glArchivItem_Font::DF_RIGHT   - Text rechts
 *                      @p glArchivItem_Font::DF_TOP     - Text oben ( standard )
 *                      @p glArchivItem_Font::DF_VCENTER - Text vertikal zentriert
 *                      @p glArchivItem_Font::DF_BOTTOM  - Text unten
 *  @param[in] font   Schriftart
 *
 *  @author OLiver
 */
ctrlText *Window::AddText(unsigned int id, 
						  unsigned short x,
						  unsigned short y, 
						  const std::string& text, 
						  unsigned int color, 
						  unsigned int format, 
						  glArchivItem_Font *font)
{
	if(scale)
	{
		x = ScaleX(x);
		y = ScaleY(y);
	}

	return AddCtrl(id, new ctrlText(this, id, x, y, text, color, format, font));
}