Commit d8a80a66 authored by hybrid's avatar hybrid

Removed another umlaut from comments. Minor other changes.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1130 dfc29bdd-3216-0410-991c-e03cc46cb475
parent ec0e4fbd
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h // For conditions of distribution and use, see copyright notice in irrlicht.h
// 07.10.2005 - Multicolor-Listbox addet by A. Buschhter (Acki) // 07.10.2005 - Multicolor-Listbox added by A. Buschhueter (Acki)
// A_Buschhueter@gmx.de // A_Buschhueter@gmx.de
#include "CGUITable.h" #include "CGUITable.h"
...@@ -546,7 +546,6 @@ void CGUITable::draw() ...@@ -546,7 +546,6 @@ void CGUITable::draw()
s32 headerFinalPosition = frameRect.UpperLeftCorner.Y + ItemHeight; s32 headerFinalPosition = frameRect.UpperLeftCorner.Y + ItemHeight;
frameRect = AbsoluteRect; frameRect = AbsoluteRect;
frameRect.UpperLeftCorner.X += 1; frameRect.UpperLeftCorner.X += 1;
frameRect.UpperLeftCorner.Y = headerFinalPosition; frameRect.UpperLeftCorner.Y = headerFinalPosition;
...@@ -566,7 +565,6 @@ void CGUITable::draw() ...@@ -566,7 +565,6 @@ void CGUITable::draw()
for ( u32 i = 0 ; i < Rows.size() ; ++i ) for ( u32 i = 0 ; i < Rows.size() ; ++i )
{ {
if (frameRect.LowerRightCorner.Y >= AbsoluteRect.UpperLeftCorner.Y && if (frameRect.LowerRightCorner.Y >= AbsoluteRect.UpperLeftCorner.Y &&
frameRect.UpperLeftCorner.Y <= AbsoluteRect.LowerRightCorner.Y) frameRect.UpperLeftCorner.Y <= AbsoluteRect.LowerRightCorner.Y)
{ {
...@@ -580,7 +578,7 @@ void CGUITable::draw() ...@@ -580,7 +578,7 @@ void CGUITable::draw()
pos = frameRect.UpperLeftCorner.X; pos = frameRect.UpperLeftCorner.X;
if (s32(i) == Selected) if ((s32)i == Selected)
driver->draw2DRectangle(skin->getColor(EGDC_HIGH_LIGHT), frameRect, &clientClip); driver->draw2DRectangle(skin->getColor(EGDC_HIGH_LIGHT), frameRect, &clientClip);
for ( u32 j = 0 ; j < Columns.size() ; ++j ) for ( u32 j = 0 ; j < Columns.size() ; ++j )
...@@ -590,7 +588,7 @@ void CGUITable::draw() ...@@ -590,7 +588,7 @@ void CGUITable::draw()
s32 test = font->getDimension(Rows[i].Items[j].text.c_str()).Width; s32 test = font->getDimension(Rows[i].Items[j].text.c_str()).Width;
if (s32(i) == Selected) if ((s32)i == Selected)
{ {
font->draw(Rows[i].Items[j].text.c_str(), textRect, skin->getColor(EGDC_HIGH_LIGHT_TEXT), false, true, &clientClip); font->draw(Rows[i].Items[j].text.c_str(), textRect, skin->getColor(EGDC_HIGH_LIGHT_TEXT), false, true, &clientClip);
} }
...@@ -607,7 +605,6 @@ void CGUITable::draw() ...@@ -607,7 +605,6 @@ void CGUITable::draw()
frameRect.LowerRightCorner.Y += ItemHeight; frameRect.LowerRightCorner.Y += ItemHeight;
} }
frameRect = AbsoluteRect; frameRect = AbsoluteRect;
columnSeparator.UpperLeftCorner.Y = headerFinalPosition; columnSeparator.UpperLeftCorner.Y = headerFinalPosition;
...@@ -639,7 +636,7 @@ void CGUITable::draw() ...@@ -639,7 +636,7 @@ void CGUITable::draw()
columnrect.UpperLeftCorner.X += CellWidthPadding; columnrect.UpperLeftCorner.X += CellWidthPadding;
font->draw(text, columnrect, skin->getColor(EGDC_BUTTON_TEXT), false, true, &AbsoluteClippingRect); font->draw(text, columnrect, skin->getColor(EGDC_BUTTON_TEXT), false, true, &AbsoluteClippingRect);
if ( s32(i) == ActiveTab ) if ( (s32)i == ActiveTab )
{ {
if ( m_CurrentOrdering == EGOM_ASCENDING ) if ( m_CurrentOrdering == EGOM_ASCENDING )
{ {
...@@ -662,9 +659,9 @@ void CGUITable::draw() ...@@ -662,9 +659,9 @@ void CGUITable::draw()
skin->draw3DButtonPaneStandard(this, columnrect, &AbsoluteClippingRect); skin->draw3DButtonPaneStandard(this, columnrect, &AbsoluteClippingRect);
IGUIElement::draw(); IGUIElement::draw();
} }
void CGUITable::breakText(core::stringw &text, u32 cellWidth ) void CGUITable::breakText(core::stringw &text, u32 cellWidth )
{ {
IGUISkin* skin = Environment->getSkin(); IGUISkin* skin = Environment->getSkin();
...@@ -679,14 +676,13 @@ void CGUITable::breakText(core::stringw &text, u32 cellWidth ) ...@@ -679,14 +676,13 @@ void CGUITable::breakText(core::stringw &text, u32 cellWidth )
if (!font) if (!font)
return; return;
core::stringw line, lineDots;
core::stringw line, lineDots, character;
wchar_t c[2]; wchar_t c[2];
c[1] = L'\0'; c[1] = L'\0';
u32 maxLength = cellWidth - (CellWidthPadding * 2); const u32 maxLength = cellWidth - (CellWidthPadding * 2);
u32 maxLengthDots = cellWidth - (CellWidthPadding * 2) - font->getDimension(L"...").Width; const s32 maxLengthDots = cellWidth - (CellWidthPadding * 2) - font->getDimension(L"...").Width;
u32 size = text.size(); const u32 size = text.size();
u32 pos = 0; u32 pos = 0;
u32 i; u32 i;
...@@ -702,18 +698,16 @@ void CGUITable::breakText(core::stringw &text, u32 cellWidth ) ...@@ -702,18 +698,16 @@ void CGUITable::breakText(core::stringw &text, u32 cellWidth )
if ( pos > maxLength ) if ( pos > maxLength )
break; break;
if ( font->getDimension( (line + c[0]).c_str() ).Width > s32(maxLengthDots) ) if ( font->getDimension( (line + c[0]).c_str() ).Width > maxLengthDots )
lineDots = line; lineDots = line;
line += c[0]; line += c[0];
} }
if ( i < size ) if ( i < size )
line = lineDots + L"..."; text = lineDots + L"...";
else
text = line; text = line;
} }
} // end namespace gui } // end namespace gui
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment