summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Sehmisch <crush@themanaworld.org>2009-02-10 17:26:15 +0100
committerPhilipp Sehmisch <crush@themanaworld.org>2009-02-10 17:30:19 +0100
commitd5d8b2f29c8bd776d4c9fb1fad2af8232f59a1ab (patch)
tree76e77269ec6afcaafb57558c1bf2b6a4f2b0e79a
parentc5fe99dcfd22b7e4d455ab8961d5f6c6210872d7 (diff)
downloadmana-client-d5d8b2f29c8bd776d4c9fb1fad2af8232f59a1ab.tar.gz
mana-client-d5d8b2f29c8bd776d4c9fb1fad2af8232f59a1ab.tar.bz2
mana-client-d5d8b2f29c8bd776d4c9fb1fad2af8232f59a1ab.tar.xz
mana-client-d5d8b2f29c8bd776d4c9fb1fad2af8232f59a1ab.zip
fixed capitalization of color member functions.
-rw-r--r--src/gui/browserbox.cpp6
-rw-r--r--src/gui/color.cpp32
-rw-r--r--src/gui/color.h16
-rw-r--r--src/gui/listbox.cpp6
-rw-r--r--src/gui/setup_colors.cpp8
-rw-r--r--src/gui/shoplistbox.cpp6
-rw-r--r--src/gui/table.cpp12
-rw-r--r--src/gui/widgets/dropdown.cpp2
8 files changed, 44 insertions, 44 deletions
diff --git a/src/gui/browserbox.cpp b/src/gui/browserbox.cpp
index 4c4af2a4..32f0d1a2 100644
--- a/src/gui/browserbox.cpp
+++ b/src/gui/browserbox.cpp
@@ -254,7 +254,7 @@ void BrowserBox::draw(gcn::Graphics *graphics)
bool valid;
if ((mHighMode & BACKGROUND))
{
- graphics->setColor(gcn::Color(textcolor->getcolor('H', valid)));
+ graphics->setColor(gcn::Color(textcolor->getColor('H', valid)));
graphics->fillRectangle(gcn::Rectangle(
mLinks[mSelectedLink].x1,
mLinks[mSelectedLink].y1,
@@ -265,7 +265,7 @@ void BrowserBox::draw(gcn::Graphics *graphics)
if ((mHighMode & UNDERLINE))
{
- graphics->setColor(gcn::Color(textcolor->getcolor('<', valid)));
+ graphics->setColor(gcn::Color(textcolor->getColor('<', valid)));
graphics->drawLine(
mLinks[mSelectedLink].x1,
mLinks[mSelectedLink].y2,
@@ -331,7 +331,7 @@ void BrowserBox::draw(gcn::Graphics *graphics)
else
{
bool valid;
- int rgb = textcolor->getcolor(c, valid);
+ int rgb = textcolor->getColor(c, valid);
if (c == '<')
{
const int size = mLinks[link].x2 - mLinks[link].x1;
diff --git a/src/gui/color.cpp b/src/gui/color.cpp
index ebbfc638..9c6a0cb0 100644
--- a/src/gui/color.cpp
+++ b/src/gui/color.cpp
@@ -28,16 +28,16 @@
color::color()
{
- addcolor('C', 0x000000, _("Chat"));
- addcolor('G', 0xff0000, _("GM"));
- addcolor('H', 0xebc873, _("Highlight"));
- addcolor('Y', 0x1fa052, _("Player"));
- addcolor('W', 0x0000ff, _("Whisper"));
- addcolor('I', 0xf1dc27, _("Is"));
- addcolor('P', 0xff00d8, _("Party"));
- addcolor('S', 0x8415e2, _("Server"));
- addcolor('L', 0x919191, _("Logger"));
- addcolor('<', 0xe50d0d, _("Hyperlink"));
+ addColor('C', 0x000000, _("Chat"));
+ addColor('G', 0xff0000, _("GM"));
+ addColor('H', 0xebc873, _("Highlight"));
+ addColor('Y', 0x1fa052, _("Player"));
+ addColor('W', 0x0000ff, _("Whisper"));
+ addColor('I', 0xf1dc27, _("Is"));
+ addColor('P', 0xff00d8, _("Party"));
+ addColor('S', 0x8415e2, _("Server"));
+ addColor('L', 0x919191, _("Logger"));
+ addColor('<', 0xe50d0d, _("Hyperlink"));
commit();
}
@@ -52,7 +52,7 @@ color::~color()
}
}
-void color::setcolor(const char c, const int rgb)
+void color::setColor(const char c, const int rgb)
{
for (ColVector::iterator col = mColVector.begin(),
colEnd = mColVector.end();
@@ -67,7 +67,7 @@ void color::setcolor(const char c, const int rgb)
}
}
-int color::getcolor(const char c, bool &valid) const
+int color::getColor(const char c, bool &valid) const
{
for (ColVector::const_iterator col = mColVector.begin(),
colEnd = mColVector.end();
@@ -93,7 +93,7 @@ std::string color::getElementAt(int i)
return mColVector[i].text;
}
-char color::getcolorCharAt(int i)
+char color::getColorCharAt(int i)
{
if (i < 0 || i >= getNumberOfElements())
{
@@ -102,13 +102,13 @@ char color::getcolorCharAt(int i)
return mColVector[i].ch;
}
-void color::addcolor(const char c, const int rgb, const std::string &text)
+void color::addColor(const char c, const int rgb, const std::string &text)
{
int trueRgb = config.getValue("color" + text, rgb);
mColVector.push_back(colorElem(c, trueRgb, text));
}
-int color::getcolorAt(int i)
+int color::getColorAt(int i)
{
if (i < 0 || i >= getNumberOfElements())
{
@@ -117,7 +117,7 @@ int color::getcolorAt(int i)
return mColVector[i].rgb;
}
-void color::setcolorAt(int i, int rgb)
+void color::setColorAt(int i, int rgb)
{
if (i >= 0 && i < getNumberOfElements())
{
diff --git a/src/gui/color.h b/src/gui/color.h
index 2539c085..a4ba752a 100644
--- a/src/gui/color.h
+++ b/src/gui/color.h
@@ -46,7 +46,7 @@ class color : public gcn::ListModel
* @param c charater to be replaced
* @param rgb color to replace character
*/
- void setcolor(const char c, const int rgb);
+ void setColor(const char c, const int rgb);
/**
* Define the color replacement for a character
@@ -56,9 +56,9 @@ class color : public gcn::ListModel
* @param g green component
* @param b blue component
*/
- void setcolor(const char c, const int r, const int g, const int b)
+ void setColor(const char c, const int r, const int g, const int b)
{
- setcolor(c, (r << 16) | (g << 8) | b);
+ setColor(c, (r << 16) | (g << 8) | b);
}
/**
@@ -67,7 +67,7 @@ class color : public gcn::ListModel
* @param c character requested
* @param valid indicate whether character is known
*/
- int getcolor(const char c, bool &valid) const;
+ int getColor(const char c, bool &valid) const;
/**
* Return the number of colors known
@@ -85,18 +85,18 @@ class color : public gcn::ListModel
* Get the color for the element at index i in the current color
* model
*/
- int getcolorAt(int i);
+ int getColorAt(int i);
/**
* Get the character used by the color for the element at index i in
* the current color model
*/
- char getcolorCharAt(int i);
+ char getColorCharAt(int i);
/**
* Set the color for the element at index i
*/
- void setcolorAt(int i, int rgb);
+ void setColorAt(int i, int rgb);
/**
* Commit the colors
@@ -128,7 +128,7 @@ class color : public gcn::ListModel
* @param rgb default color if not found in config
* @param text identifier of color
*/
- void addcolor(const char c, const int rgb, const std::string &text);
+ void addColor(const char c, const int rgb, const std::string &text);
};
extern color *textcolor;
diff --git a/src/gui/listbox.cpp b/src/gui/listbox.cpp
index 118dbac1..6edaba7d 100644
--- a/src/gui/listbox.cpp
+++ b/src/gui/listbox.cpp
@@ -44,9 +44,9 @@ void ListBox::draw(gcn::Graphics *graphics)
mAlpha = config.getValue("guialpha", 0.8);
bool valid;
- const int red = (textcolor->getcolor('H', valid) >> 16) & 0xFF;
- const int green = (textcolor->getcolor('H', valid) >> 8) & 0xFF;
- const int blue = textcolor->getcolor('H', valid) & 0xFF;
+ const int red = (textcolor->getColor('H', valid) >> 16) & 0xFF;
+ const int green = (textcolor->getColor('H', valid) >> 8) & 0xFF;
+ const int blue = textcolor->getColor('H', valid) & 0xFF;
const int alpha = mAlpha * 255;
graphics->setColor(gcn::Color(red, green, blue, alpha));
diff --git a/src/gui/setup_colors.cpp b/src/gui/setup_colors.cpp
index 6b06b3f1..8fe90790 100644
--- a/src/gui/setup_colors.cpp
+++ b/src/gui/setup_colors.cpp
@@ -151,8 +151,8 @@ void Setup_colors::action(const gcn::ActionEvent &event)
if (event.getId() == "color_box")
{
mSelected = mcolorBox->getSelected();
- int col = textcolor->getcolorAt(mSelected);
- char ch = textcolor->getcolorCharAt(mSelected);
+ int col = textcolor->getColorAt(mSelected);
+ char ch = textcolor->getColorCharAt(mSelected);
std::string msg;
if (ch == '<')
@@ -208,7 +208,7 @@ void Setup_colors::apply()
void Setup_colors::cancel()
{
textcolor->rollback();
- int col = textcolor->getcolorAt(mSelected);
+ int col = textcolor->getColorAt(mSelected);
setEntry(mRedSlider, mRedText, col >> 16);
setEntry(mGreenSlider, mGreenText, (col >> 8) & 0xff);
setEntry(mBlueSlider, mBlueText, col & 0xff);
@@ -245,5 +245,5 @@ void Setup_colors::updatecolor()
int rgb = static_cast<int>(mRedSlider->getValue()) << 16 |
static_cast<int>(mGreenSlider->getValue()) << 8 |
static_cast<int>(mBlueSlider->getValue());
- textcolor->setcolorAt(mSelected, rgb);
+ textcolor->setColorAt(mSelected, rgb);
}
diff --git a/src/gui/shoplistbox.cpp b/src/gui/shoplistbox.cpp
index 66c12fc6..f44bf87b 100644
--- a/src/gui/shoplistbox.cpp
+++ b/src/gui/shoplistbox.cpp
@@ -64,9 +64,9 @@ void ShopListBox::draw(gcn::Graphics *gcnGraphics)
mAlpha = config.getValue("guialpha", 0.8);
bool valid;
- const int red = (textcolor->getcolor('H', valid) >> 16) & 0xFF;
- const int green = (textcolor->getcolor('H', valid) >> 8) & 0xFF;
- const int blue = textcolor->getcolor('H', valid) & 0xFF;
+ const int red = (textcolor->getColor('H', valid) >> 16) & 0xFF;
+ const int green = (textcolor->getColor('H', valid) >> 8) & 0xFF;
+ const int blue = textcolor->getColor('H', valid) & 0xFF;
const int alpha = mAlpha * 255;
Graphics *graphics = static_cast<Graphics*>(gcnGraphics);
diff --git a/src/gui/table.cpp b/src/gui/table.cpp
index 3bb6b6f3..a5b4ace0 100644
--- a/src/gui/table.cpp
+++ b/src/gui/table.cpp
@@ -325,10 +325,10 @@ void GuiTable::draw(gcn::Graphics* graphics)
{
bool valid;
const int red =
- (textcolor->getcolor('H', valid) >> 16) & 0xFF;
+ (textcolor->getColor('H', valid) >> 16) & 0xFF;
const int green =
- (textcolor->getcolor('H', valid) >> 8) & 0xFF;
- const int blue = textcolor->getcolor('H', valid) & 0xFF;
+ (textcolor->getColor('H', valid) >> 8) & 0xFF;
+ const int blue = textcolor->getColor('H', valid) & 0xFF;
const int alpha = mAlpha * 127;
graphics->setColor(gcn::Color(red, green, blue, alpha));
@@ -347,10 +347,10 @@ void GuiTable::draw(gcn::Graphics* graphics)
{
bool valid;
const int red =
- (textcolor->getcolor('H', valid) >> 16) & 0xFF;
+ (textcolor->getColor('H', valid) >> 16) & 0xFF;
const int green =
- (textcolor->getcolor('H', valid) >> 8) & 0xFF;
- const int blue = textcolor->getcolor('H', valid) & 0xFF;
+ (textcolor->getColor('H', valid) >> 8) & 0xFF;
+ const int blue = textcolor->getColor('H', valid) & 0xFF;
const int alpha = mAlpha * 127;
graphics->setColor(gcn::Color(red, green, blue, alpha));
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index ab10590a..514dc3a6 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -138,7 +138,7 @@ void DropDown::draw(gcn::Graphics* graphics)
const int alpha = mAlpha * 255;
gcn::Color faceColor = getBaseColor();
faceColor.a = alpha;
- gcn::Color highlightColor = textcolor->getcolor('H', valid);
+ gcn::Color highlightColor = textcolor->getColor('H', valid);
highlightColor.a = alpha;
gcn::Color shadowColor = faceColor - 0x303030;
shadowColor.a = alpha;