summaryrefslogtreecommitdiffstats
path: root/src/ui/check.cpp
diff options
context:
space:
mode:
authorMichał Konopacki <konopacki.m@gmail.com>2012-08-18 22:56:42 +0200
committerMichał Konopacki <konopacki.m@gmail.com>2012-08-18 22:56:42 +0200
commit574c07e388dfd902b6565bc4a5ac9b915c73074e (patch)
tree65846a6bd77542a5e7271ff8cc4bfa77bda477a5 /src/ui/check.cpp
parent10b2c562fb7635f9850f1441f08ba8b1a71e31e1 (diff)
downloadcolobot-574c07e388dfd902b6565bc4a5ac9b915c73074e.tar.gz
colobot-574c07e388dfd902b6565bc4a5ac9b915c73074e.tar.bz2
colobot-574c07e388dfd902b6565bc4a5ac9b915c73074e.zip
Further improvements in UI porting
Diffstat (limited to 'src/ui/check.cpp')
-rw-r--r--src/ui/check.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/ui/check.cpp b/src/ui/check.cpp
index 424e4fc..b4ddf4a 100644
--- a/src/ui/check.cpp
+++ b/src/ui/check.cpp
@@ -1,5 +1,6 @@
// * This file is part of the COLOBOT source code
// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch
+// * Copyright (C) 2012 Polish Portal of Colobot (PPC)
// *
// * This program is free software: you can redistribute it and/or modify
// * it under the terms of the GNU General Public License as published by
@@ -16,10 +17,10 @@
//#include <windows.h>
-#include <stdio.h>
+//#include <stdio.h>
//#include <d3d.h>
-#include "common/struct.h"
+//#include "common/struct.h"
//#include "old/d3dengine.h"
#include "graphics/engine/engine.h"
//#include "old/math3d.h"
@@ -28,14 +29,15 @@
#include "common/iman.h"
#include "common/restext.h"
//#include "old/text.h"
+#include "graphics/engine/text.h"
#include "ui/check.h"
-
+namespace Ui {
// Object's constructor.
-CCheck::CCheck(CInstanceManager* iMan) : CControl(iMan)
+CCheck::CCheck() : CControl()
{
}
@@ -103,7 +105,7 @@ void CCheck::Draw()
if ( (m_state & STATE_VISIBLE) == 0 ) return;
iDim = m_dim;
- m_dim.x = m_dim.y*0.75f; // square
+ m_dim.x = m_dim.y * 0.75f; // square
if ( m_state & STATE_SHADOW )
{
@@ -159,10 +161,10 @@ void CCheck::Draw()
if ( m_state & STATE_DEAD ) return;
// Draw the name.
- pos.x = m_pos.x+m_dim.y/0.9f;
- pos.y = m_pos.y+m_dim.y*0.50f;
+ pos.x = m_pos.x + m_dim.y / 0.9f;
+ pos.y = m_pos.y + m_dim.y * 0.50f;
pos.y -= m_engine->GetText()->GetHeight(m_fontType, m_fontSize)/2.0f;
m_engine->GetText()->DrawText(m_name, m_fontType, m_fontSize, pos, m_dim.x, m_textAlign, 0);
}
-
+}