diff options
author | Philipp Sehmisch <crush@themanaworld.org> | 2009-02-10 16:56:05 +0100 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-02-11 08:29:51 -0700 |
commit | 4a41ce55224ad7b54c6b5ea78126d8d314f5ef41 (patch) | |
tree | 2d2172cb0c0985c7711206dc5adda6bfa219245e /src | |
parent | d036e2c771bcd19a21e26aec155d4269cecdb1c2 (diff) | |
download | mana-client-4a41ce55224ad7b54c6b5ea78126d8d314f5ef41.tar.gz mana-client-4a41ce55224ad7b54c6b5ea78126d8d314f5ef41.tar.bz2 mana-client-4a41ce55224ad7b54c6b5ea78126d8d314f5ef41.tar.xz mana-client-4a41ce55224ad7b54c6b5ea78126d8d314f5ef41.zip |
Changed spelling from colour to color.
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/Makefile.am | 8 | ||||
-rw-r--r-- | src/gui/browserbox.cpp | 8 | ||||
-rw-r--r-- | src/gui/color.cpp (renamed from src/gui/colour.cpp) | 50 | ||||
-rw-r--r-- | src/gui/color.h (renamed from src/gui/colour.h) | 66 | ||||
-rw-r--r-- | src/gui/gui.cpp | 2 | ||||
-rw-r--r-- | src/gui/listbox.cpp | 8 | ||||
-rw-r--r-- | src/gui/setup.cpp | 4 | ||||
-rw-r--r-- | src/gui/setup_colors.cpp (renamed from src/gui/setup_colours.cpp) | 56 | ||||
-rw-r--r-- | src/gui/setup_colors.h (renamed from src/gui/setup_colours.h) | 16 | ||||
-rw-r--r-- | src/gui/shoplistbox.cpp | 8 | ||||
-rw-r--r-- | src/gui/table.cpp | 14 | ||||
-rw-r--r-- | src/gui/widgets/dropdown.cpp | 4 | ||||
-rw-r--r-- | src/main.cpp | 8 | ||||
-rw-r--r-- | src/text.cpp | 10 | ||||
-rw-r--r-- | src/text.h | 6 |
16 files changed, 138 insertions, 138 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5e26ff97..25bcbfb0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -81,8 +81,8 @@ SET(SRCS gui/chatinput.h gui/checkbox.cpp gui/checkbox.h - gui/colour.cpp - gui/colour.h + gui/color.cpp + gui/color.h gui/confirm_dialog.cpp gui/confirm_dialog.h gui/connection.cpp @@ -164,8 +164,8 @@ SET(SRCS gui/setup.h gui/setup_audio.cpp gui/setup_audio.h - gui/setup_colours.cpp - gui/setup_colours.h + gui/setup_colors.cpp + gui/setup_colors.h gui/setup_joystick.cpp gui/setup_joystick.h gui/setup_keyboard.cpp diff --git a/src/Makefile.am b/src/Makefile.am index b6b052f4..71862994 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -31,8 +31,8 @@ aethyra_SOURCES = gui/widgets/dropdown.cpp \ gui/chatinput.h \ gui/checkbox.cpp \ gui/checkbox.h \ - gui/colour.cpp \ - gui/colour.h \ + gui/color.cpp \ + gui/color.h \ gui/confirm_dialog.cpp \ gui/confirm_dialog.h \ gui/connection.cpp \ @@ -114,8 +114,8 @@ aethyra_SOURCES = gui/widgets/dropdown.cpp \ gui/setup.h \ gui/setup_audio.cpp \ gui/setup_audio.h \ - gui/setup_colours.cpp \ - gui/setup_colours.h \ + gui/setup_colors.cpp \ + gui/setup_colors.h \ gui/setup_joystick.cpp \ gui/setup_joystick.h \ gui/setup_keyboard.cpp \ diff --git a/src/gui/browserbox.cpp b/src/gui/browserbox.cpp index 37480415..18fa2ad4 100644 --- a/src/gui/browserbox.cpp +++ b/src/gui/browserbox.cpp @@ -25,7 +25,7 @@ #include <guichan/graphics.hpp> #include "browserbox.h" -#include "colour.h" +#include "color.h" #include "linkhandler.h" #include "truetypefont.h" @@ -255,7 +255,7 @@ void BrowserBox::draw(gcn::Graphics *graphics) bool valid; if ((mHighMode & BACKGROUND)) { - graphics->setColor(gcn::Color(textColour->getColour('H', valid))); + graphics->setColor(gcn::Color(textColor->getColor('H', valid))); graphics->fillRectangle(gcn::Rectangle( mLinks[mSelectedLink].x1, mLinks[mSelectedLink].y1, @@ -266,7 +266,7 @@ void BrowserBox::draw(gcn::Graphics *graphics) if ((mHighMode & UNDERLINE)) { - graphics->setColor(gcn::Color(textColour->getColour('<', valid))); + graphics->setColor(gcn::Color(textColor->getColor('<', valid))); graphics->drawLine( mLinks[mSelectedLink].x1, mLinks[mSelectedLink].y2, @@ -332,7 +332,7 @@ void BrowserBox::draw(gcn::Graphics *graphics) else { bool valid; - int rgb = textColour->getColour(c, valid); + int rgb = textColor->getColor(c, valid); if (c == '<') { const int size = mLinks[link].x2 - mLinks[link].x1; diff --git a/src/gui/colour.cpp b/src/gui/color.cpp index 095662ef..62537191 100644 --- a/src/gui/colour.cpp +++ b/src/gui/color.cpp @@ -19,40 +19,40 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "colour.h" +#include "color.h" #include "../configuration.h" #include "../utils/gettext.h" #include "../utils/tostring.h" -Colour::Colour() +Color::Color() { - addColour('C', 0x000000, _("Chat")); - addColour('G', 0xff0000, _("GM")); - addColour('H', 0xebc873, _("Highlight")); - addColour('Y', 0x1fa052, _("Player")); - addColour('W', 0x0000ff, _("Whisper")); - addColour('I', 0xf1dc27, _("Is")); - addColour('P', 0xff00d8, _("Party")); - addColour('S', 0x8415e2, _("Server")); - addColour('L', 0x919191, _("Logger")); - addColour('<', 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(); } -Colour::~Colour() +Color::~Color() { for (ColVector::iterator col = mColVector.begin(), colEnd = mColVector.end(); col != colEnd; ++col) { - config.setValue("Colour" + col->text, toString(col->rgb)); + config.setValue("Color" + col->text, toString(col->rgb)); } } -void Colour::setColour(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 Colour::setColour(const char c, const int rgb) } } -int Colour::getColour(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(); @@ -84,7 +84,7 @@ int Colour::getColour(const char c, bool &valid) const return 0x000000; } -std::string Colour::getElementAt(int i) +std::string Color::getElementAt(int i) { if (i < 0 || i >= getNumberOfElements()) { @@ -93,7 +93,7 @@ std::string Colour::getElementAt(int i) return mColVector[i].text; } -char Colour::getColourCharAt(int i) +char Color::getColorCharAt(int i) { if (i < 0 || i >= getNumberOfElements()) { @@ -102,13 +102,13 @@ char Colour::getColourCharAt(int i) return mColVector[i].ch; } -void Colour::addColour(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("Colour" + text, rgb); - mColVector.push_back(ColourElem(c, trueRgb, text)); + int trueRgb = config.getValue("Color" + text, rgb); + mColVector.push_back(ColorElem(c, trueRgb, text)); } -int Colour::getColourAt(int i) +int Color::getColorAt(int i) { if (i < 0 || i >= getNumberOfElements()) { @@ -117,7 +117,7 @@ int Colour::getColourAt(int i) return mColVector[i].rgb; } -void Colour::setColourAt(int i, int rgb) +void Color::setColorAt(int i, int rgb) { if (i >= 0 && i < getNumberOfElements()) { @@ -125,7 +125,7 @@ void Colour::setColourAt(int i, int rgb) } } -void Colour::commit() +void Color::commit() { for (ColVector::iterator i = mColVector.begin(), iEnd = mColVector.end(); i != iEnd; @@ -135,7 +135,7 @@ void Colour::commit() } } -void Colour::rollback() +void Color::rollback() { for (ColVector::iterator i = mColVector.begin(), iEnd = mColVector.end(); i != iEnd; diff --git a/src/gui/colour.h b/src/gui/color.h index 820c319d..aca3d045 100644 --- a/src/gui/colour.h +++ b/src/gui/color.h @@ -19,118 +19,118 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef COLOUR_H -#define COLOUR_H +#ifndef COLOR_H +#define COLOR_H #include <string> #include <vector> #include <guichan/listmodel.hpp> -class Colour : public gcn::ListModel +class Color : public gcn::ListModel { public: /** * Constructor */ - Colour(); + Color(); /** * Destructor */ - ~Colour(); + ~Color(); /** - * Define the colour replacement for a character + * Define the color replacement for a character * * @param c charater to be replaced - * @param rgb colour to replace character + * @param rgb color to replace character */ - void setColour(const char c, const int rgb); + void setColor(const char c, const int rgb); /** - * Define the colour replacement for a character + * Define the color replacement for a character * * @param c character to be replaced * @param r red component * @param g green component * @param b blue component */ - void setColour(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) { - setColour(c, (r << 16) | (g << 8) | b); + setColor(c, (r << 16) | (g << 8) | b); } /** - * Return the colour associated with a character, if exists + * Return the color associated with a character, if exists * * @param c character requested * @param valid indicate whether character is known */ - int getColour(const char c, bool &valid) const; + int getColor(const char c, bool &valid) const; /** - * Return the number of colours known + * Return the number of colors known */ int getNumberOfElements() {return mColVector.size(); } /** - * Return the name of the ith colour + * Return the name of the ith color * - * @param i index of colour interested in + * @param i index of color interested in */ std::string getElementAt(int i); /** - * Get the colour for the element at index i in the current colour + * Get the color for the element at index i in the current color * model */ - int getColourAt(int i); + int getColorAt(int i); /** - * Get the character used by the colour for the element at index i in - * the current colour model + * Get the character used by the color for the element at index i in + * the current color model */ - char getColourCharAt(int i); + char getColorCharAt(int i); /** - * Set the colour for the element at index i + * Set the color for the element at index i */ - void setColourAt(int i, int rgb); + void setColorAt(int i, int rgb); /** - * Commit the colours + * Commit the colors */ void commit(); /** - * Rollback the colours + * Rollback the colors */ void rollback(); private: - struct ColourElem + struct ColorElem { - ColourElem(const char c, const int rgb, const std::string &text) : + ColorElem(const char c, const int rgb, const std::string &text) : ch(c), rgb(rgb), text(text) {} char ch; int rgb; int committedRgb; std::string text; }; - typedef std::vector<ColourElem> ColVector; + typedef std::vector<ColorElem> ColVector; ColVector mColVector; /** - * Initialise colour + * Initialise color * * @param c character that needs initialising - * @param rgb default colour if not found in config - * @param text identifier of colour + * @param rgb default color if not found in config + * @param text identifier of color */ - void addColour(const char c, const int rgb, const std::string &text); + void addColor(const char c, const int rgb, const std::string &text); }; -extern Colour *textColour; +extern Color *textColor; #endif diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index a8a2a72f..f8901119 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -135,7 +135,7 @@ Gui::Gui(Graphics *graphics): gcn::Widget::setGlobalFont(mGuiFont); - // Load hits' colourful fonts + // Load hits' colorful fonts try { hitRedFont = new gcn::ImageFont("graphics/gui/hits_red.png", diff --git a/src/gui/listbox.cpp b/src/gui/listbox.cpp index 97b3bbd0..12bb2c02 100644 --- a/src/gui/listbox.cpp +++ b/src/gui/listbox.cpp @@ -24,7 +24,7 @@ #include <guichan/graphics.hpp> #include <guichan/listmodel.hpp> -#include "colour.h" +#include "color.h" #include "listbox.h" #include "../configuration.h" @@ -45,9 +45,9 @@ void ListBox::draw(gcn::Graphics *graphics) mAlpha = config.getValue("guialpha", 0.8); bool valid; - const int red = (textColour->getColour('H', valid) >> 16) & 0xFF; - const int green = (textColour->getColour('H', valid) >> 8) & 0xFF; - const int blue = textColour->getColour('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.cpp b/src/gui/setup.cpp index 2c187f94..4798f598 100644 --- a/src/gui/setup.cpp +++ b/src/gui/setup.cpp @@ -23,7 +23,7 @@ #include "button.h" #include "setup.h" #include "setup_audio.h" -#include "setup_colours.h" +#include "setup_colors.h" #include "setup_joystick.h" #include "setup_keyboard.h" #include "setup_players.h" @@ -91,7 +91,7 @@ Setup::Setup(): panel->addTab(_("Keyboard"), tab); mTabs.push_back(tab); - tab = new Setup_Colours(); + tab = new Setup_Colors(); panel->addTab(_("Colors"), tab); mTabs.push_back(tab); diff --git a/src/gui/setup_colours.cpp b/src/gui/setup_colors.cpp index 03fdcfec..f3fa3c65 100644 --- a/src/gui/setup_colours.cpp +++ b/src/gui/setup_colors.cpp @@ -27,11 +27,11 @@ #include <guichan/widgets/slider.hpp> #include "browserbox.h" -#include "colour.h" +#include "color.h" #include "itemlinkhandler.h" #include "listbox.h" #include "scrollarea.h" -#include "setup_colours.h" +#include "setup_colors.h" #include "slider.h" #include "textfield.h" @@ -42,16 +42,16 @@ #include "../utils/gettext.h" #include "../utils/tostring.h" -Setup_Colours::Setup_Colours() : +Setup_Colors::Setup_Colors() : mSelected(-1) { setOpaque(false); - mColourBox = new ListBox(textColour); - mColourBox->setActionEventId("colour_box"); - mColourBox->addActionListener(this); + mColorBox = new ListBox(textColor); + mColorBox->setActionEventId("color_box"); + mColorBox->addActionListener(this); - mScroll = new ScrollArea(mColourBox); + mScroll = new ScrollArea(mColorBox); mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER); mPreview = new BrowserBox(BrowserBox::AUTO_WRAP); @@ -129,7 +129,7 @@ Setup_Colours::Setup_Colours() : setDimension(gcn::Rectangle(0, 0, 325, 280)); } -Setup_Colours::~Setup_Colours() +Setup_Colors::~Setup_Colors() { delete mRedLabel; delete mRedSlider; @@ -146,13 +146,13 @@ Setup_Colours::~Setup_Colours() delete mScroll; } -void Setup_Colours::action(const gcn::ActionEvent &event) +void Setup_Colors::action(const gcn::ActionEvent &event) { - if (event.getId() == "colour_box") + if (event.getId() == "color_box") { - mSelected = mColourBox->getSelected(); - int col = textColour->getColourAt(mSelected); - char ch = textColour->getColourCharAt(mSelected); + mSelected = mColorBox->getSelected(); + int col = textColor->getColorAt(mSelected); + char ch = textColor->getColorCharAt(mSelected); std::string msg; if (ch == '<') @@ -173,26 +173,26 @@ void Setup_Colours::action(const gcn::ActionEvent &event) if (event.getId() == "slider_red") { mRedText->setText(toString(std::floor(mRedSlider->getValue()))); - updateColour(); + updateColor(); return; } if (event.getId() == "slider_green") { mGreenText->setText(toString(std::floor(mGreenSlider->getValue()))); - updateColour(); + updateColor(); return; } if (event.getId() == "slider_blue") { mBlueText->setText(toString(std::floor(mBlueSlider->getValue()))); - updateColour(); + updateColor(); return; } } -void Setup_Colours::setEntry(gcn::Slider *s, TextField *t, int value) +void Setup_Colors::setEntry(gcn::Slider *s, TextField *t, int value) { s->setValue(value); char buffer[100]; @@ -200,43 +200,43 @@ void Setup_Colours::setEntry(gcn::Slider *s, TextField *t, int value) t->setText(buffer); } -void Setup_Colours::apply() +void Setup_Colors::apply() { - textColour->commit(); + textColor->commit(); } -void Setup_Colours::cancel() +void Setup_Colors::cancel() { - textColour->rollback(); - int col = textColour->getColourAt(mSelected); + textColor->rollback(); + int col = textColor->getColorAt(mSelected); setEntry(mRedSlider, mRedText, col >> 16); setEntry(mGreenSlider, mGreenText, (col >> 8) & 0xff); setEntry(mBlueSlider, mBlueText, col & 0xff); } -void Setup_Colours::listen(const TextField *tf) +void Setup_Colors::listen(const TextField *tf) { if (tf == mRedText) { mRedSlider->setValue(tf->getValue()); - updateColour(); + updateColor(); return; } if (tf == mGreenText) { mGreenSlider->setValue(tf->getValue()); - updateColour(); + updateColor(); return; } if (tf == mBlueText) { mBlueSlider->setValue(tf->getValue()); - updateColour(); + updateColor(); return; } } -void Setup_Colours::updateColour() +void Setup_Colors::updateColor() { if (mSelected == -1) { @@ -245,5 +245,5 @@ void Setup_Colours::updateColour() int rgb = static_cast<int>(mRedSlider->getValue()) << 16 | static_cast<int>(mGreenSlider->getValue()) << 8 | static_cast<int>(mBlueSlider->getValue()); - textColour->setColourAt(mSelected, rgb); + textColor->setColorAt(mSelected, rgb); } diff --git a/src/gui/setup_colours.h b/src/gui/setup_colors.h index ac06c178..98a2d18b 100644 --- a/src/gui/setup_colours.h +++ b/src/gui/setup_colors.h @@ -19,8 +19,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef SETUP_COLOURS_H -#define SETUP_COLOURS_H +#ifndef SETUP_COLORS_H +#define SETUP_COLORS_H #include <string> @@ -36,19 +36,19 @@ class BrowserBox; -class Setup_Colours : public SetupTab, public gcn::ActionListener, - public TextFieldListener +class Setup_Colors : public SetupTab, public gcn::ActionListener, + public TextFieldListener { public: - Setup_Colours(); - ~Setup_Colours(); + Setup_Colors(); + ~Setup_Colors(); void apply(); void cancel(); void action(const gcn::ActionEvent &event); void listen(const TextField *tf); private: - gcn::ListBox *mColourBox; + gcn::ListBox *mColorBox; gcn::ScrollArea *mScroll; BrowserBox *mPreview; gcn::ScrollArea *mPreviewBox; @@ -70,6 +70,6 @@ class Setup_Colours : public SetupTab, public gcn::ActionListener, int mBlueValue; void setEntry(gcn::Slider *s, TextField *t, int value); - void updateColour(); + void updateColor(); }; #endif diff --git a/src/gui/shoplistbox.cpp b/src/gui/shoplistbox.cpp index 9e53dff7..4f9f9024 100644 --- a/src/gui/shoplistbox.cpp +++ b/src/gui/shoplistbox.cpp @@ -23,7 +23,7 @@ #include <guichan/font.hpp> #include <guichan/listmodel.hpp> -#include "colour.h" +#include "color.h" #include "shop.h" #include "shoplistbox.h" @@ -65,9 +65,9 @@ void ShopListBox::draw(gcn::Graphics *gcnGraphics) mAlpha = config.getValue("guialpha", 0.8); bool valid; - const int red = (textColour->getColour('H', valid) >> 16) & 0xFF; - const int green = (textColour->getColour('H', valid) >> 8) & 0xFF; - const int blue = textColour->getColour('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 b79d43cf..de7f11b2 100644 --- a/src/gui/table.cpp +++ b/src/gui/table.cpp @@ -24,7 +24,7 @@ #include <guichan/graphics.hpp> #include <guichan/key.hpp> -#include "colour.h" +#include "color.h" #include "table.h" #include "../configuration.h" @@ -326,10 +326,10 @@ void GuiTable::draw(gcn::Graphics* graphics) { bool valid; const int red = - (textColour->getColour('H', valid) >> 16) & 0xFF; + (textColor->getColor('H', valid) >> 16) & 0xFF; const int green = - (textColour->getColour('H', valid) >> 8) & 0xFF; - const int blue = textColour->getColour('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)); @@ -348,10 +348,10 @@ void GuiTable::draw(gcn::Graphics* graphics) { bool valid; const int red = - (textColour->getColour('H', valid) >> 16) & 0xFF; + (textColor->getColor('H', valid) >> 16) & 0xFF; const int green = - (textColour->getColour('H', valid) >> 8) & 0xFF; - const int blue = textColour->getColour('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 a292edd5..5d1b8d4f 100644 --- a/src/gui/widgets/dropdown.cpp +++ b/src/gui/widgets/dropdown.cpp @@ -23,7 +23,7 @@ #include "dropdown.h" -#include "../colour.h" +#include "../color.h" #include "../listbox.h" #include "../scrollarea.h" @@ -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 = textColour->getColour('H', valid); + gcn::Color highlightColor = textColor->getColor('H', valid); highlightColor.a = alpha; gcn::Color shadowColor = faceColor - 0x303030; shadowColor.a = alpha; diff --git a/src/main.cpp b/src/main.cpp index c68c02d8..80cff8d1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -56,7 +56,7 @@ #include "gui/button.h" #include "gui/char_server.h" #include "gui/char_select.h" -#include "gui/colour.h" +#include "gui/color.h" #include "gui/gui.h" #include "gui/login.h" #include "gui/ok_dialog.h" @@ -136,7 +136,7 @@ CharServerHandler charServerHandler; LoginData loginData; LockedArray<LocalPlayer*> charInfo(MAX_SLOT + 1); -Colour *textColour; +Color *textColor; // This anonymous namespace hides whatever is inside from other modules. namespace { @@ -764,7 +764,7 @@ int main(int argc, char *argv[]) unsigned int oldstate = !state; // We start with a status change. // Needs to be created in main, as the updater uses it - textColour = new Colour(); + textColor = new Color(); Game *game = NULL; Window *currentDialog = NULL; @@ -1097,7 +1097,7 @@ int main(int argc, char *argv[]) usleep(50000); } - delete textColour; + delete textColor; #ifdef PACKAGE_VERSION delete versionLabel; #endif diff --git a/src/text.cpp b/src/text.cpp index 5a015139..e5e40235 100644 --- a/src/text.cpp +++ b/src/text.cpp @@ -30,8 +30,8 @@ int Text::mInstances = 0; Text::Text(const std::string &text, int x, int y, - gcn::Graphics::Alignment alignment, gcn::Color colour) : - mText(text), mColour(colour) + gcn::Graphics::Alignment alignment, gcn::Color color) : + mText(text), mColor(color) { if (textManager == 0) { @@ -91,13 +91,13 @@ void Text::draw(gcn::Graphics *graphics, int xOff, int yOff) graphics->drawText(mText, mX - xOff, mY - yOff - 1, gcn::Graphics::LEFT); - graphics->setColor(mColour); + graphics->setColor(mColor); graphics->drawText(mText, mX - xOff, mY - yOff, gcn::Graphics::LEFT); } FlashText::FlashText(const std::string &text, int x, int y, - gcn::Graphics::Alignment alignment, gcn::Color colour) : - Text(text, x, y, alignment, colour), + gcn::Graphics::Alignment alignment, gcn::Color color) : + Text(text, x, y, alignment, color), mTime(0) { } @@ -39,7 +39,7 @@ class Text * Constructor creates a text object to display on the screen. */ Text(const std::string &text, int x, int y, - gcn::Graphics::Alignment alignment, gcn::Color colour); + gcn::Graphics::Alignment alignment, gcn::Color color); /** * Destructor. The text is removed from the screen. @@ -64,14 +64,14 @@ class Text int mXOffset; /**< The offset of mX from the desired x. */ static int mInstances; /**< Instances of text. */ std::string mText; /**< The text to display. */ - gcn::Color mColour; /**< The colour of the text. */ + gcn::Color mColor; /**< The color of the text. */ }; class FlashText : public Text { public: FlashText(const std::string &text, int x, int y, - gcn::Graphics::Alignment alignment, gcn::Color colour); + gcn::Graphics::Alignment alignment, gcn::Color color); /** * Remove the text from the screen |