Commit 2c7c73c5 authored by cutealien's avatar cutealien

Irrlichtify variable names (membervariables start upper-case).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4733 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 3fc10527
...@@ -82,7 +82,7 @@ const wchar_t* CGUIListBox::getListItem(u32 id) const ...@@ -82,7 +82,7 @@ const wchar_t* CGUIListBox::getListItem(u32 id) const
if (id>=Items.size()) if (id>=Items.size())
return 0; return 0;
return Items[id].text.c_str(); return Items[id].Text.c_str();
} }
...@@ -92,7 +92,7 @@ s32 CGUIListBox::getIcon(u32 id) const ...@@ -92,7 +92,7 @@ s32 CGUIListBox::getIcon(u32 id) const
if (id>=Items.size()) if (id>=Items.size())
return -1; return -1;
return Items[id].icon; return Items[id].Icon;
} }
...@@ -220,7 +220,7 @@ void CGUIListBox::setSelected(const wchar_t *item) ...@@ -220,7 +220,7 @@ void CGUIListBox::setSelected(const wchar_t *item)
{ {
for ( index = 0; index < (s32) Items.size(); ++index ) for ( index = 0; index < (s32) Items.size(); ++index )
{ {
if ( Items[index].text == item ) if ( Items[index].Text == item )
break; break;
} }
} }
...@@ -329,17 +329,17 @@ bool CGUIListBox::OnEvent(const SEvent& event) ...@@ -329,17 +329,17 @@ bool CGUIListBox::OnEvent(const SEvent& event)
// dont change selection if the key buffer matches the current item // dont change selection if the key buffer matches the current item
if (Selected > -1 && KeyBuffer.size() > 1) if (Selected > -1 && KeyBuffer.size() > 1)
{ {
if (Items[Selected].text.size() >= KeyBuffer.size() && if (Items[Selected].Text.size() >= KeyBuffer.size() &&
KeyBuffer.equals_ignore_case(Items[Selected].text.subString(0,KeyBuffer.size()))) KeyBuffer.equals_ignore_case(Items[Selected].Text.subString(0,KeyBuffer.size())))
return true; return true;
} }
s32 current; s32 current;
for (current = start+1; current < (s32)Items.size(); ++current) for (current = start+1; current < (s32)Items.size(); ++current)
{ {
if (Items[current].text.size() >= KeyBuffer.size()) if (Items[current].Text.size() >= KeyBuffer.size())
{ {
if (KeyBuffer.equals_ignore_case(Items[current].text.subString(0,KeyBuffer.size()))) if (KeyBuffer.equals_ignore_case(Items[current].Text.subString(0,KeyBuffer.size())))
{ {
if (Parent && Selected != current && !Selecting && !MoveOverSelect) if (Parent && Selected != current && !Selecting && !MoveOverSelect)
{ {
...@@ -357,9 +357,9 @@ bool CGUIListBox::OnEvent(const SEvent& event) ...@@ -357,9 +357,9 @@ bool CGUIListBox::OnEvent(const SEvent& event)
} }
for (current = 0; current <= start; ++current) for (current = 0; current <= start; ++current)
{ {
if (Items[current].text.size() >= KeyBuffer.size()) if (Items[current].Text.size() >= KeyBuffer.size())
{ {
if (KeyBuffer.equals_ignore_case(Items[current].text.subString(0,KeyBuffer.size()))) if (KeyBuffer.equals_ignore_case(Items[current].Text.subString(0,KeyBuffer.size())))
{ {
if (Parent && Selected != current && !Selecting && !MoveOverSelect) if (Parent && Selected != current && !Selecting && !MoveOverSelect)
{ {
...@@ -541,7 +541,7 @@ void CGUIListBox::draw() ...@@ -541,7 +541,7 @@ void CGUIListBox::draw()
if (Font) if (Font)
{ {
if (IconBank && (Items[i].icon > -1)) if (IconBank && (Items[i].Icon > -1))
{ {
core::position2di iconPos = textRect.UpperLeftCorner; core::position2di iconPos = textRect.UpperLeftCorner;
iconPos.Y += textRect.getHeight() / 2; iconPos.Y += textRect.getHeight() / 2;
...@@ -549,14 +549,14 @@ void CGUIListBox::draw() ...@@ -549,14 +549,14 @@ void CGUIListBox::draw()
if ( i==Selected && hl ) if ( i==Selected && hl )
{ {
IconBank->draw2DSprite( (u32)Items[i].icon, iconPos, &clientClip, IconBank->draw2DSprite( (u32)Items[i].Icon, iconPos, &clientClip,
hasItemOverrideColor(i, EGUI_LBC_ICON_HIGHLIGHT) ? hasItemOverrideColor(i, EGUI_LBC_ICON_HIGHLIGHT) ?
getItemOverrideColor(i, EGUI_LBC_ICON_HIGHLIGHT) : getItemDefaultColor(EGUI_LBC_ICON_HIGHLIGHT), getItemOverrideColor(i, EGUI_LBC_ICON_HIGHLIGHT) : getItemDefaultColor(EGUI_LBC_ICON_HIGHLIGHT),
selectTime, os::Timer::getTime(), false, true); selectTime, os::Timer::getTime(), false, true);
} }
else else
{ {
IconBank->draw2DSprite( (u32)Items[i].icon, iconPos, &clientClip, IconBank->draw2DSprite( (u32)Items[i].Icon, iconPos, &clientClip,
hasItemOverrideColor(i, EGUI_LBC_ICON) ? getItemOverrideColor(i, EGUI_LBC_ICON) : getItemDefaultColor(EGUI_LBC_ICON), hasItemOverrideColor(i, EGUI_LBC_ICON) ? getItemOverrideColor(i, EGUI_LBC_ICON) : getItemDefaultColor(EGUI_LBC_ICON),
0 , (i==Selected) ? os::Timer::getTime() : 0, false, true); 0 , (i==Selected) ? os::Timer::getTime() : 0, false, true);
} }
...@@ -566,14 +566,14 @@ void CGUIListBox::draw() ...@@ -566,14 +566,14 @@ void CGUIListBox::draw()
if ( i==Selected && hl ) if ( i==Selected && hl )
{ {
Font->draw(Items[i].text.c_str(), textRect, Font->draw(Items[i].Text.c_str(), textRect,
hasItemOverrideColor(i, EGUI_LBC_TEXT_HIGHLIGHT) ? hasItemOverrideColor(i, EGUI_LBC_TEXT_HIGHLIGHT) ?
getItemOverrideColor(i, EGUI_LBC_TEXT_HIGHLIGHT) : getItemDefaultColor(EGUI_LBC_TEXT_HIGHLIGHT), getItemOverrideColor(i, EGUI_LBC_TEXT_HIGHLIGHT) : getItemDefaultColor(EGUI_LBC_TEXT_HIGHLIGHT),
false, true, &clientClip); false, true, &clientClip);
} }
else else
{ {
Font->draw(Items[i].text.c_str(), textRect, Font->draw(Items[i].Text.c_str(), textRect,
hasItemOverrideColor(i, EGUI_LBC_TEXT) ? getItemOverrideColor(i, EGUI_LBC_TEXT) : getItemDefaultColor(EGUI_LBC_TEXT), hasItemOverrideColor(i, EGUI_LBC_TEXT) ? getItemOverrideColor(i, EGUI_LBC_TEXT) : getItemDefaultColor(EGUI_LBC_TEXT),
false, true, &clientClip); false, true, &clientClip);
} }
...@@ -594,8 +594,8 @@ void CGUIListBox::draw() ...@@ -594,8 +594,8 @@ void CGUIListBox::draw()
u32 CGUIListBox::addItem(const wchar_t* text, s32 icon) u32 CGUIListBox::addItem(const wchar_t* text, s32 icon)
{ {
ListItem i; ListItem i;
i.text = text; i.Text = text;
i.icon = icon; i.Icon = icon;
Items.push_back(i); Items.push_back(i);
recalculateItemHeight(); recalculateItemHeight();
...@@ -692,7 +692,7 @@ void CGUIListBox::serializeAttributes(io::IAttributes* out, io::SAttributeReadWr ...@@ -692,7 +692,7 @@ void CGUIListBox::serializeAttributes(io::IAttributes* out, io::SAttributeReadWr
{ {
core::stringc label("text"); core::stringc label("text");
label += i; label += i;
out->addString(label.c_str(), Items[i].text.c_str() ); out->addString(label.c_str(), Items[i].Text.c_str() );
for ( s32 c=0; c < (s32)EGUI_LBC_COUNT; ++c ) for ( s32 c=0; c < (s32)EGUI_LBC_COUNT; ++c )
{ {
...@@ -733,9 +733,9 @@ void CGUIListBox::deserializeAttributes(io::IAttributes* in, io::SAttributeReadW ...@@ -733,9 +733,9 @@ void CGUIListBox::deserializeAttributes(io::IAttributes* in, io::SAttributeReadW
ListItem item; ListItem item;
label += i; label += i;
item.text = in->getAttributeAsStringW(label.c_str()); item.Text = in->getAttributeAsStringW(label.c_str());
addItem(item.text.c_str(), item.icon); addItem(item.Text.c_str(), item.Icon);
for ( u32 c=0; c < EGUI_LBC_COUNT; ++c ) for ( u32 c=0; c < EGUI_LBC_COUNT; ++c )
{ {
...@@ -776,8 +776,8 @@ void CGUIListBox::setItem(u32 index, const wchar_t* text, s32 icon) ...@@ -776,8 +776,8 @@ void CGUIListBox::setItem(u32 index, const wchar_t* text, s32 icon)
if ( index >= Items.size() ) if ( index >= Items.size() )
return; return;
Items[index].text = text; Items[index].Text = text;
Items[index].icon = icon; Items[index].Icon = icon;
recalculateItemHeight(); recalculateItemHeight();
recalculateItemWidth(icon); recalculateItemWidth(icon);
...@@ -789,8 +789,8 @@ void CGUIListBox::setItem(u32 index, const wchar_t* text, s32 icon) ...@@ -789,8 +789,8 @@ void CGUIListBox::setItem(u32 index, const wchar_t* text, s32 icon)
s32 CGUIListBox::insertItem(u32 index, const wchar_t* text, s32 icon) s32 CGUIListBox::insertItem(u32 index, const wchar_t* text, s32 icon)
{ {
ListItem i; ListItem i;
i.text = text; i.Text = text;
i.icon = icon; i.Icon = icon;
Items.insert(i, index); Items.insert(i, index);
recalculateItemHeight(); recalculateItemHeight();
......
...@@ -135,11 +135,11 @@ namespace gui ...@@ -135,11 +135,11 @@ namespace gui
struct ListItem struct ListItem
{ {
ListItem() : icon(-1) ListItem() : Icon(-1)
{} {}
core::stringw text; core::stringw Text;
s32 icon; s32 Icon;
// A multicolor extension // A multicolor extension
struct ListItemOverrideColor struct ListItemOverrideColor
......
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