diff options
-rw-r--r-- | po/POTFILES.in | 4 | ||||
-rw-r--r-- | src/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/Makefile.am | 8 | ||||
-rw-r--r-- | src/being.cpp | 6 | ||||
-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) | 62 | ||||
-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) | 10 | ||||
-rw-r--r-- | src/gui/shoplistbox.cpp | 8 | ||||
-rw-r--r-- | src/gui/table.cpp | 30 | ||||
-rw-r--r-- | src/gui/widgets/dropdown.cpp | 6 | ||||
-rw-r--r-- | src/main.cpp | 8 | ||||
-rw-r--r-- | src/text.cpp | 12 | ||||
-rw-r--r-- | src/text.h | 6 | ||||
-rw-r--r-- | tmw.cbp | 8 |
19 files changed, 152 insertions, 152 deletions
diff --git a/po/POTFILES.in b/po/POTFILES.in index 295a6127..1b3dea84 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -5,7 +5,7 @@ src/gui/buysell.cpp src/gui/char_select.cpp src/gui/char_server.cpp src/gui/chat.cpp -src/gui/colour.cpp +src/gui/color.cpp src/gui/confirm_dialog.cpp src/gui/connection.cpp src/gui/emotecontainer.cpp @@ -31,7 +31,7 @@ src/gui/register.cpp src/gui/sell.cpp src/gui/setup_audio.cpp src/gui/setup.cpp -src/gui/setup_colours.cpp +src/gui/setup_colors.cpp src/gui/setup_joystick.cpp src/gui/setup_keyboard.cpp src/gui/setup_players.cpp diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 513456aa..c7e3d936 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 ecf45945..926455b2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -31,8 +31,8 @@ tmw_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 @@ tmw_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/being.cpp b/src/being.cpp index e1ff5591..521947e3 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -49,8 +49,8 @@ #include "gui/speechbubble.h" #include "utils/dtor.h" -#include "utils/gettext.h" -#include "utils/tostring.h" +#include "utils/gettext.h" +#include "utils/tostring.h" #include "utils/trim.h" #include "utils/xml.h" @@ -842,7 +842,7 @@ static void initializeHair() } } // done initializing - if (hairColorsNr == 0) { // No colours -> black only + if (hairColorsNr == 0) { // No colors -> black only hairColorsNr = 1; hairColors.resize(hairColorsNr, "#000000"); } diff --git a/src/gui/browserbox.cpp b/src/gui/browserbox.cpp index 65659df6..4c4af2a4 100644 --- a/src/gui/browserbox.cpp +++ b/src/gui/browserbox.cpp @@ -24,7 +24,7 @@ #include <guichan/graphics.hpp> #include "browserbox.h" -#include "colour.h" +#include "color.h" #include "linkhandler.h" #include "truetypefont.h" @@ -254,7 +254,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, @@ -265,7 +265,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, @@ -331,7 +331,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 cdb5a3fd..ebbfc638 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 6ea02840..2539c085 100644 --- a/src/gui/colour.h +++ b/src/gui/color.h @@ -27,110 +27,110 @@ #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 7779a503..87304bd1 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -134,7 +134,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 b63d6424..118dbac1 100644 --- a/src/gui/listbox.cpp +++ b/src/gui/listbox.cpp @@ -23,7 +23,7 @@ #include <guichan/graphics.hpp> #include <guichan/listmodel.hpp> -#include "colour.h" +#include "color.h" #include "listbox.h" #include "../configuration.h" @@ -44,9 +44,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 19575cfb..fa4e1a0a 100644 --- a/src/gui/setup.cpp +++ b/src/gui/setup.cpp @@ -22,7 +22,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" @@ -90,7 +90,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 f986fded..6b06b3f1 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, 290, 250)); } -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 57d9e304..7a224249 100644 --- a/src/gui/setup_colours.h +++ b/src/gui/setup_colors.h @@ -36,19 +36,19 @@ class BrowserBox; -class Setup_Colours : public SetupTab, public gcn::ActionListener, +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 b5761535..66c12fc6 100644 --- a/src/gui/shoplistbox.cpp +++ b/src/gui/shoplistbox.cpp @@ -22,7 +22,7 @@ #include <guichan/font.hpp> #include <guichan/listmodel.hpp> -#include "colour.h" +#include "color.h" #include "shop.h" #include "shoplistbox.h" @@ -64,9 +64,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 19039b2d..3bb6b6f3 100644 --- a/src/gui/table.cpp +++ b/src/gui/table.cpp @@ -23,7 +23,7 @@ #include <guichan/graphics.hpp> #include <guichan/key.hpp> -#include "colour.h" +#include "color.h" #include "table.h" #include "../configuration.h" @@ -199,7 +199,7 @@ void GuiTable::setSelectedRow(int selected) { mSelectedRow = 0; } - else if ((selected >= mModel->getRows() && !mWrappingEnabled) || + else if ((selected >= mModel->getRows() && !mWrappingEnabled) || (selected < 0 && mWrappingEnabled)) { mSelectedRow = mModel->getRows() - 1; @@ -224,7 +224,7 @@ void GuiTable::setSelectedColumn(int selected) { mSelectedColumn = 0; } - else if ((selected >= mModel->getColumns() && !mWrappingEnabled) || + else if ((selected >= mModel->getColumns() && !mWrappingEnabled) || (selected < 0 && mWrappingEnabled)) { mSelectedColumn = mModel->getColumns() - 1; @@ -324,11 +324,11 @@ void GuiTable::draw(gcn::Graphics* graphics) if (!mLinewiseMode && c == mSelectedColumn && r == mSelectedRow) { bool valid; - const int red = - (textColour->getColour('H', valid) >> 16) & 0xFF; + const int red = + (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)); @@ -346,11 +346,11 @@ void GuiTable::draw(gcn::Graphics* graphics) if (mLinewiseMode && r == mSelectedRow) { bool valid; - const int red = - (textColour->getColour('H', valid) >> 16) & 0xFF; + const int red = + (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)); @@ -401,25 +401,25 @@ void GuiTable::keyPressed(gcn::KeyEvent& keyEvent) else if (key.getValue() == gcn::Key::UP) { setSelectedRow(mSelectedRow - 1); - + keyEvent.consume(); } else if (key.getValue() == gcn::Key::DOWN) { setSelectedRow(mSelectedRow + 1); - + keyEvent.consume(); } else if (key.getValue() == gcn::Key::LEFT) { setSelectedColumn(mSelectedColumn - 1); - + keyEvent.consume(); } else if (key.getValue() == gcn::Key::RIGHT) { setSelectedColumn(mSelectedColumn + 1); - + keyEvent.consume(); } else if (key.getValue() == gcn::Key::HOME) diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp index 31d35cb0..ab10590a 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" @@ -40,7 +40,7 @@ Image *DropDown::buttons[2][2]; ImageRect DropDown::skin; float DropDown::mAlpha = config.getValue("guialpha", 0.8); -DropDown::DropDown(gcn::ListModel *listModel, gcn::ScrollArea *scrollArea, +DropDown::DropDown(gcn::ListModel *listModel, gcn::ScrollArea *scrollArea, gcn::ListBox *listBox, bool opacity): gcn::DropDown::DropDown(listModel, scrollArea, listBox), mOpaque(opacity) @@ -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 3a562b25..209157b4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -55,7 +55,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" @@ -135,7 +135,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 { @@ -760,7 +760,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; @@ -1095,7 +1095,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 e4f1d409..5d88bd69 100644 --- a/src/text.cpp +++ b/src/text.cpp @@ -37,9 +37,9 @@ Image *Text::mBubbleArrow; Text::Text(const std::string &text, int x, int y, gcn::Graphics::Alignment alignment, - gcn::Color colour, bool isSpeech) : + gcn::Color color, bool isSpeech) : mText(text), - mColour(colour), + mcolor(color), mIsSpeech(isSpeech) { if (textManager == 0) @@ -47,7 +47,7 @@ Text::Text(const std::string &text, int x, int y, textManager = new TextManager; ResourceManager *resman = ResourceManager::getInstance(); Image *sbImage = resman->getImage("graphics/gui/bubble.png|W:#" - + config.getValue("speechBubbleColour", "000000")); + + config.getValue("speechBubblecolor", "000000")); mBubble.grid[0] = sbImage->getSubImage(0, 0, 5, 5); mBubble.grid[1] = sbImage->getSubImage(5, 0, 5, 5); mBubble.grid[2] = sbImage->getSubImage(10, 0, 5, 5); @@ -161,15 +161,15 @@ void Text::draw(gcn::Graphics *graphics, int xOff, int yOff) 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::Color color) : + Text(text, x, y, alignment, color), mTime(0) { } @@ -40,7 +40,7 @@ class Text */ Text(const std::string &text, int x, int y, gcn::Graphics::Alignment alignment, - gcn::Color colour, bool isSpeech = false); + gcn::Color color, bool isSpeech = false); /** * Destructor. The text is removed from the screen. @@ -65,7 +65,7 @@ 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. */ bool mIsSpeech; /**< Is this text a speech bubble? */ protected: @@ -78,7 +78,7 @@ class FlashText : public Text public: FlashText(const std::string &text, int x, int y, gcn::Graphics::Alignment alignment, - gcn::Color colour); + gcn::Color color); /** * Remove the text from the screen @@ -125,8 +125,8 @@ <Unit filename="src\gui\chatinput.h" /> <Unit filename="src\gui\checkbox.cpp" /> <Unit filename="src\gui\checkbox.h" /> - <Unit filename="src\gui\colour.cpp" /> - <Unit filename="src\gui\colour.h" /> + <Unit filename="src\gui\color.cpp" /> + <Unit filename="src\gui\color.h" /> <Unit filename="src\gui\confirm_dialog.cpp" /> <Unit filename="src\gui\confirm_dialog.h" /> <Unit filename="src\gui\connection.cpp" /> @@ -208,8 +208,8 @@ <Unit filename="src\gui\setup.h" /> <Unit filename="src\gui\setup_audio.cpp" /> <Unit filename="src\gui\setup_audio.h" /> - <Unit filename="src\gui\setup_colours.cpp" /> - <Unit filename="src\gui\setup_colours.h" /> + <Unit filename="src\gui\setup_colors.cpp" /> + <Unit filename="src\gui\setup_colors.h" /> <Unit filename="src\gui\setup_joystick.cpp" /> <Unit filename="src\gui\setup_joystick.h" /> <Unit filename="src\gui\setup_keyboard.cpp" /> |