From c5fe99dcfd22b7e4d455ab8961d5f6c6210872d7 Mon Sep 17 00:00:00 2001 From: Philipp Sehmisch Date: Tue, 10 Feb 2009 16:56:05 +0100 Subject: Changed spelling from colour to color. --- po/POTFILES.in | 4 +- src/CMakeLists.txt | 8 +- src/Makefile.am | 8 +- src/being.cpp | 6 +- src/gui/browserbox.cpp | 8 +- src/gui/color.cpp | 146 +++++++++++++++++++++++++ src/gui/color.h | 136 +++++++++++++++++++++++ src/gui/colour.cpp | 146 ------------------------- src/gui/colour.h | 136 ----------------------- src/gui/gui.cpp | 2 +- src/gui/listbox.cpp | 8 +- src/gui/setup.cpp | 4 +- src/gui/setup_colors.cpp | 249 +++++++++++++++++++++++++++++++++++++++++++ src/gui/setup_colors.h | 75 +++++++++++++ src/gui/setup_colours.cpp | 249 ------------------------------------------- src/gui/setup_colours.h | 75 ------------- src/gui/shoplistbox.cpp | 8 +- src/gui/table.cpp | 30 +++--- src/gui/widgets/dropdown.cpp | 6 +- src/main.cpp | 8 +- src/text.cpp | 12 +-- src/text.h | 6 +- tmw.cbp | 8 +- 23 files changed, 669 insertions(+), 669 deletions(-) create mode 100644 src/gui/color.cpp create mode 100644 src/gui/color.h delete mode 100644 src/gui/colour.cpp delete mode 100644 src/gui/colour.h create mode 100644 src/gui/setup_colors.cpp create mode 100644 src/gui/setup_colors.h delete mode 100644 src/gui/setup_colours.cpp delete mode 100644 src/gui/setup_colours.h 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 #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/color.cpp b/src/gui/color.cpp new file mode 100644 index 00000000..ebbfc638 --- /dev/null +++ b/src/gui/color.cpp @@ -0,0 +1,146 @@ +/* + * Configurable text colors + * Copyright (C) 2008 Douglas Boffey + * + * This file is part of The Mana World. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "color.h" + +#include "../configuration.h" + +#include "../utils/gettext.h" +#include "../utils/tostring.h" + +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")); + commit(); +} + +color::~color() +{ + for (ColVector::iterator col = mColVector.begin(), + colEnd = mColVector.end(); + col != colEnd; + ++col) + { + config.setValue("color" + col->text, toString(col->rgb)); + } +} + +void color::setcolor(const char c, const int rgb) +{ + for (ColVector::iterator col = mColVector.begin(), + colEnd = mColVector.end(); + col != colEnd; + ++col) + { + if (col->ch == c) + { + col->rgb = rgb; + return; + } + } +} + +int color::getcolor(const char c, bool &valid) const +{ + for (ColVector::const_iterator col = mColVector.begin(), + colEnd = mColVector.end(); + col != colEnd; + ++col) + { + if (col->ch == c) + { + valid = true; + return col->rgb; + } + } + valid = false; + return 0x000000; +} + +std::string color::getElementAt(int i) +{ + if (i < 0 || i >= getNumberOfElements()) + { + return ""; + } + return mColVector[i].text; +} + +char color::getcolorCharAt(int i) +{ + if (i < 0 || i >= getNumberOfElements()) + { + return 'C'; + } + return mColVector[i].ch; +} + +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) +{ + if (i < 0 || i >= getNumberOfElements()) + { + return 0; + } + return mColVector[i].rgb; +} + +void color::setcolorAt(int i, int rgb) +{ + if (i >= 0 && i < getNumberOfElements()) + { + mColVector[i].rgb = rgb; + } +} + +void color::commit() +{ + for (ColVector::iterator i = mColVector.begin(), iEnd = mColVector.end(); + i != iEnd; + ++i) + { + i->committedRgb = i->rgb; + } +} + +void color::rollback() +{ + for (ColVector::iterator i = mColVector.begin(), iEnd = mColVector.end(); + i != iEnd; + ++i) + { + i->rgb = i->committedRgb; + } +} diff --git a/src/gui/color.h b/src/gui/color.h new file mode 100644 index 00000000..2539c085 --- /dev/null +++ b/src/gui/color.h @@ -0,0 +1,136 @@ +/* + * Configurable text colors + * Copyright (C) 2008 Douglas Boffey + * + * This file is part of The Mana World. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef COLOUR_H +#define COLOUR_H + +#include +#include + +#include + +class color : public gcn::ListModel +{ + public: + /** + * Constructor + */ + color(); + + /** + * Destructor + */ + ~color(); + + /** + * Define the color replacement for a character + * + * @param c charater to be replaced + * @param rgb color to replace character + */ + void setcolor(const char c, const int rgb); + + /** + * 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 setcolor(const char c, const int r, const int g, const int b) + { + setcolor(c, (r << 16) | (g << 8) | b); + } + + /** + * Return the color associated with a character, if exists + * + * @param c character requested + * @param valid indicate whether character is known + */ + int getcolor(const char c, bool &valid) const; + + /** + * Return the number of colors known + */ + int getNumberOfElements() {return mColVector.size(); } + + /** + * Return the name of the ith color + * + * @param i index of color interested in + */ + std::string getElementAt(int i); + + /** + * Get the color for the element at index i in the current color + * model + */ + 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); + + /** + * Set the color for the element at index i + */ + void setcolorAt(int i, int rgb); + + /** + * Commit the colors + */ + void commit(); + + /** + * Rollback the colors + */ + void rollback(); + + private: + struct colorElem + { + 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 ColVector; + ColVector mColVector; + + /** + * Initialise color + * + * @param c character that needs initialising + * @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); +}; + +extern color *textcolor; + +#endif diff --git a/src/gui/colour.cpp b/src/gui/colour.cpp deleted file mode 100644 index cdb5a3fd..00000000 --- a/src/gui/colour.cpp +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Configurable text colors - * Copyright (C) 2008 Douglas Boffey - * - * This file is part of The Mana World. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "colour.h" - -#include "../configuration.h" - -#include "../utils/gettext.h" -#include "../utils/tostring.h" - -Colour::Colour() -{ - 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")); - commit(); -} - -Colour::~Colour() -{ - for (ColVector::iterator col = mColVector.begin(), - colEnd = mColVector.end(); - col != colEnd; - ++col) - { - config.setValue("Colour" + col->text, toString(col->rgb)); - } -} - -void Colour::setColour(const char c, const int rgb) -{ - for (ColVector::iterator col = mColVector.begin(), - colEnd = mColVector.end(); - col != colEnd; - ++col) - { - if (col->ch == c) - { - col->rgb = rgb; - return; - } - } -} - -int Colour::getColour(const char c, bool &valid) const -{ - for (ColVector::const_iterator col = mColVector.begin(), - colEnd = mColVector.end(); - col != colEnd; - ++col) - { - if (col->ch == c) - { - valid = true; - return col->rgb; - } - } - valid = false; - return 0x000000; -} - -std::string Colour::getElementAt(int i) -{ - if (i < 0 || i >= getNumberOfElements()) - { - return ""; - } - return mColVector[i].text; -} - -char Colour::getColourCharAt(int i) -{ - if (i < 0 || i >= getNumberOfElements()) - { - return 'C'; - } - return mColVector[i].ch; -} - -void Colour::addColour(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 Colour::getColourAt(int i) -{ - if (i < 0 || i >= getNumberOfElements()) - { - return 0; - } - return mColVector[i].rgb; -} - -void Colour::setColourAt(int i, int rgb) -{ - if (i >= 0 && i < getNumberOfElements()) - { - mColVector[i].rgb = rgb; - } -} - -void Colour::commit() -{ - for (ColVector::iterator i = mColVector.begin(), iEnd = mColVector.end(); - i != iEnd; - ++i) - { - i->committedRgb = i->rgb; - } -} - -void Colour::rollback() -{ - for (ColVector::iterator i = mColVector.begin(), iEnd = mColVector.end(); - i != iEnd; - ++i) - { - i->rgb = i->committedRgb; - } -} diff --git a/src/gui/colour.h b/src/gui/colour.h deleted file mode 100644 index 6ea02840..00000000 --- a/src/gui/colour.h +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Configurable text colors - * Copyright (C) 2008 Douglas Boffey - * - * This file is part of The Mana World. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef COLOUR_H -#define COLOUR_H - -#include -#include - -#include - -class Colour : public gcn::ListModel -{ - public: - /** - * Constructor - */ - Colour(); - - /** - * Destructor - */ - ~Colour(); - - /** - * Define the colour replacement for a character - * - * @param c charater to be replaced - * @param rgb colour to replace character - */ - void setColour(const char c, const int rgb); - - /** - * Define the colour 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) - { - setColour(c, (r << 16) | (g << 8) | b); - } - - /** - * Return the colour 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; - - /** - * Return the number of colours known - */ - int getNumberOfElements() {return mColVector.size(); } - - /** - * Return the name of the ith colour - * - * @param i index of colour interested in - */ - std::string getElementAt(int i); - - /** - * Get the colour for the element at index i in the current colour - * model - */ - int getColourAt(int i); - - /** - * Get the character used by the colour for the element at index i in - * the current colour model - */ - char getColourCharAt(int i); - - /** - * Set the colour for the element at index i - */ - void setColourAt(int i, int rgb); - - /** - * Commit the colours - */ - void commit(); - - /** - * Rollback the colours - */ - void rollback(); - - private: - struct ColourElem - { - ColourElem(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 ColVector; - ColVector mColVector; - - /** - * Initialise colour - * - * @param c character that needs initialising - * @param rgb default colour if not found in config - * @param text identifier of colour - */ - void addColour(const char c, const int rgb, const std::string &text); -}; - -extern Colour *textColour; - -#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 #include -#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_colors.cpp b/src/gui/setup_colors.cpp new file mode 100644 index 00000000..6b06b3f1 --- /dev/null +++ b/src/gui/setup_colors.cpp @@ -0,0 +1,249 @@ +/* + * Configurable text colors + * Copyright (C) 2008 Douglas Boffey + * + * This file is part of The Mana World. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include + +#include +#include +#include + +#include "browserbox.h" +#include "color.h" +#include "itemlinkhandler.h" +#include "listbox.h" +#include "scrollarea.h" +#include "setup_colors.h" +#include "slider.h" +#include "textfield.h" + +#include "widgets/layouthelper.h" + +#include "../configuration.h" + +#include "../utils/gettext.h" +#include "../utils/tostring.h" + +Setup_colors::Setup_colors() : + mSelected(-1) +{ + setOpaque(false); + + mcolorBox = new ListBox(textcolor); + mcolorBox->setActionEventId("color_box"); + mcolorBox->addActionListener(this); + + mScroll = new ScrollArea(mcolorBox); + mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER); + + mPreview = new BrowserBox(BrowserBox::AUTO_WRAP); + mPreview->setOpaque(false); + + // Replace this later with a more appropriate link handler. For now, this'll + // do, as it'll do nothing when clicked on. + mPreview->setLinkHandler(new ItemLinkHandler()); + + mPreviewBox = new ScrollArea(mPreview); + mPreviewBox->setHeight(20); + mPreviewBox->setScrollPolicy(gcn::ScrollArea::SHOW_NEVER, + gcn::ScrollArea::SHOW_NEVER); + + mRedLabel = new gcn::Label(_("Red: ")); + + mRedText = new TextField(); + mRedText->setWidth(40); + mRedText->setRange(0, 255); + mRedText->setNumeric(true); + mRedText->addListener(this); + + mRedSlider = new Slider(0, 255); + mRedSlider->setWidth(160); + mRedSlider->setValue(mRedText->getValue()); + mRedSlider->setActionEventId("slider_red"); + mRedSlider->addActionListener(this); + + mGreenLabel = new gcn::Label(_("Green: ")); + + mGreenText = new TextField(); + mGreenText->setWidth(40); + mGreenText->setRange(0, 255); + mGreenText->setNumeric(true); + mGreenText->addListener(this); + + mGreenSlider = new Slider(0, 255); + mGreenSlider->setWidth(160); + mGreenSlider->setValue(mGreenText->getValue()); + mGreenSlider->setActionEventId("slider_green"); + mGreenSlider->addActionListener(this); + + mBlueLabel = new gcn::Label(_("Blue: ")); + + mBlueText = new TextField(); + mBlueText->setWidth(40); + mBlueText->setRange(0, 255); + mBlueText->setNumeric(true); + mBlueText->addListener(this); + + mBlueSlider = new Slider(0, 255); + mBlueSlider->setWidth(160); + mBlueSlider->setValue(mBlueText->getValue()); + mBlueSlider->setActionEventId("slider_blue"); + mBlueSlider->addActionListener(this); + + setOpaque(false); + + // Do the layout + LayoutHelper h(this); + ContainerPlacer place = h.getPlacer(0, 0); + + place(0, 0, mScroll, 4, 7).setPadding(2); + place(0, 7, mPreviewBox, 4).setPadding(2); + place(0, 8, mRedLabel, 2); + place(2, 8, mRedSlider); + place(3, 8, mRedText).setPadding(1); + place(0, 9, mGreenLabel, 2); + place(2, 9, mGreenSlider); + place(3, 9, mGreenText).setPadding(1); + place(0, 10, mBlueLabel, 2); + place(2, 10, mBlueSlider); + place(3, 10, mBlueText).setPadding(1); + + setDimension(gcn::Rectangle(0, 0, 290, 250)); +} + +Setup_colors::~Setup_colors() +{ + delete mRedLabel; + delete mRedSlider; + delete mRedText; + + delete mGreenLabel; + delete mGreenSlider; + delete mGreenText; + + delete mBlueLabel; + delete mBlueSlider; + delete mBlueText; + + delete mScroll; +} + +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); + std::string msg; + + if (ch == '<') + msg = toString("@@|") + + _("This is what the color looks like") + "@@"; + else + msg = "##" + toString(ch) + + _("This is what the color looks like"); + + mPreview->clearRows(); + mPreview->addRow(msg); + setEntry(mRedSlider, mRedText, col >> 16); + setEntry(mGreenSlider, mGreenText, (col >> 8) & 0xff); + setEntry(mBlueSlider, mBlueText, col & 0xff); + return; + } + + if (event.getId() == "slider_red") + { + mRedText->setText(toString(std::floor(mRedSlider->getValue()))); + updatecolor(); + return; + } + + if (event.getId() == "slider_green") + { + mGreenText->setText(toString(std::floor(mGreenSlider->getValue()))); + updatecolor(); + return; + } + + if (event.getId() == "slider_blue") + { + mBlueText->setText(toString(std::floor(mBlueSlider->getValue()))); + updatecolor(); + return; + } +} + +void Setup_colors::setEntry(gcn::Slider *s, TextField *t, int value) +{ + s->setValue(value); + char buffer[100]; + sprintf(buffer, "%d", value); + t->setText(buffer); +} + +void Setup_colors::apply() +{ + textcolor->commit(); +} + +void Setup_colors::cancel() +{ + 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_colors::listen(const TextField *tf) +{ + if (tf == mRedText) + { + mRedSlider->setValue(tf->getValue()); + updatecolor(); + return; + } + if (tf == mGreenText) + { + mGreenSlider->setValue(tf->getValue()); + updatecolor(); + return; + } + if (tf == mBlueText) + { + mBlueSlider->setValue(tf->getValue()); + updatecolor(); + return; + } +} + +void Setup_colors::updatecolor() +{ + if (mSelected == -1) + { + return; + } + int rgb = static_cast(mRedSlider->getValue()) << 16 | + static_cast(mGreenSlider->getValue()) << 8 | + static_cast(mBlueSlider->getValue()); + textcolor->setcolorAt(mSelected, rgb); +} diff --git a/src/gui/setup_colors.h b/src/gui/setup_colors.h new file mode 100644 index 00000000..7a224249 --- /dev/null +++ b/src/gui/setup_colors.h @@ -0,0 +1,75 @@ +/* + * Configurable text colors + * Copyright (C) 2008 Douglas Boffey + * + * This file is part of The Mana World. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef SETUP_COLOURS_H +#define SETUP_COLOURS_H + +#include + +#include + +#include +#include + +#include "setuptab.h" +#include "textfield.h" + +#include "../guichanfwd.h" + +class BrowserBox; + +class Setup_colors : public SetupTab, public gcn::ActionListener, + public TextFieldListener +{ + public: + Setup_colors(); + ~Setup_colors(); + void apply(); + void cancel(); + void action(const gcn::ActionEvent &event); + + void listen(const TextField *tf); + private: + gcn::ListBox *mcolorBox; + gcn::ScrollArea *mScroll; + BrowserBox *mPreview; + gcn::ScrollArea *mPreviewBox; + int mSelected; + + gcn::Label *mRedLabel; + gcn::Slider *mRedSlider; + TextField *mRedText; + int mRedValue; + + gcn::Label *mGreenLabel; + gcn::Slider *mGreenSlider; + TextField *mGreenText; + int mGreenValue; + + gcn::Label *mBlueLabel; + gcn::Slider *mBlueSlider; + TextField *mBlueText; + int mBlueValue; + + void setEntry(gcn::Slider *s, TextField *t, int value); + void updatecolor(); +}; +#endif diff --git a/src/gui/setup_colours.cpp b/src/gui/setup_colours.cpp deleted file mode 100644 index f986fded..00000000 --- a/src/gui/setup_colours.cpp +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Configurable text colors - * Copyright (C) 2008 Douglas Boffey - * - * This file is part of The Mana World. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include - -#include -#include -#include - -#include "browserbox.h" -#include "colour.h" -#include "itemlinkhandler.h" -#include "listbox.h" -#include "scrollarea.h" -#include "setup_colours.h" -#include "slider.h" -#include "textfield.h" - -#include "widgets/layouthelper.h" - -#include "../configuration.h" - -#include "../utils/gettext.h" -#include "../utils/tostring.h" - -Setup_Colours::Setup_Colours() : - mSelected(-1) -{ - setOpaque(false); - - mColourBox = new ListBox(textColour); - mColourBox->setActionEventId("colour_box"); - mColourBox->addActionListener(this); - - mScroll = new ScrollArea(mColourBox); - mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER); - - mPreview = new BrowserBox(BrowserBox::AUTO_WRAP); - mPreview->setOpaque(false); - - // Replace this later with a more appropriate link handler. For now, this'll - // do, as it'll do nothing when clicked on. - mPreview->setLinkHandler(new ItemLinkHandler()); - - mPreviewBox = new ScrollArea(mPreview); - mPreviewBox->setHeight(20); - mPreviewBox->setScrollPolicy(gcn::ScrollArea::SHOW_NEVER, - gcn::ScrollArea::SHOW_NEVER); - - mRedLabel = new gcn::Label(_("Red: ")); - - mRedText = new TextField(); - mRedText->setWidth(40); - mRedText->setRange(0, 255); - mRedText->setNumeric(true); - mRedText->addListener(this); - - mRedSlider = new Slider(0, 255); - mRedSlider->setWidth(160); - mRedSlider->setValue(mRedText->getValue()); - mRedSlider->setActionEventId("slider_red"); - mRedSlider->addActionListener(this); - - mGreenLabel = new gcn::Label(_("Green: ")); - - mGreenText = new TextField(); - mGreenText->setWidth(40); - mGreenText->setRange(0, 255); - mGreenText->setNumeric(true); - mGreenText->addListener(this); - - mGreenSlider = new Slider(0, 255); - mGreenSlider->setWidth(160); - mGreenSlider->setValue(mGreenText->getValue()); - mGreenSlider->setActionEventId("slider_green"); - mGreenSlider->addActionListener(this); - - mBlueLabel = new gcn::Label(_("Blue: ")); - - mBlueText = new TextField(); - mBlueText->setWidth(40); - mBlueText->setRange(0, 255); - mBlueText->setNumeric(true); - mBlueText->addListener(this); - - mBlueSlider = new Slider(0, 255); - mBlueSlider->setWidth(160); - mBlueSlider->setValue(mBlueText->getValue()); - mBlueSlider->setActionEventId("slider_blue"); - mBlueSlider->addActionListener(this); - - setOpaque(false); - - // Do the layout - LayoutHelper h(this); - ContainerPlacer place = h.getPlacer(0, 0); - - place(0, 0, mScroll, 4, 7).setPadding(2); - place(0, 7, mPreviewBox, 4).setPadding(2); - place(0, 8, mRedLabel, 2); - place(2, 8, mRedSlider); - place(3, 8, mRedText).setPadding(1); - place(0, 9, mGreenLabel, 2); - place(2, 9, mGreenSlider); - place(3, 9, mGreenText).setPadding(1); - place(0, 10, mBlueLabel, 2); - place(2, 10, mBlueSlider); - place(3, 10, mBlueText).setPadding(1); - - setDimension(gcn::Rectangle(0, 0, 290, 250)); -} - -Setup_Colours::~Setup_Colours() -{ - delete mRedLabel; - delete mRedSlider; - delete mRedText; - - delete mGreenLabel; - delete mGreenSlider; - delete mGreenText; - - delete mBlueLabel; - delete mBlueSlider; - delete mBlueText; - - delete mScroll; -} - -void Setup_Colours::action(const gcn::ActionEvent &event) -{ - if (event.getId() == "colour_box") - { - mSelected = mColourBox->getSelected(); - int col = textColour->getColourAt(mSelected); - char ch = textColour->getColourCharAt(mSelected); - std::string msg; - - if (ch == '<') - msg = toString("@@|") + - _("This is what the color looks like") + "@@"; - else - msg = "##" + toString(ch) + - _("This is what the color looks like"); - - mPreview->clearRows(); - mPreview->addRow(msg); - setEntry(mRedSlider, mRedText, col >> 16); - setEntry(mGreenSlider, mGreenText, (col >> 8) & 0xff); - setEntry(mBlueSlider, mBlueText, col & 0xff); - return; - } - - if (event.getId() == "slider_red") - { - mRedText->setText(toString(std::floor(mRedSlider->getValue()))); - updateColour(); - return; - } - - if (event.getId() == "slider_green") - { - mGreenText->setText(toString(std::floor(mGreenSlider->getValue()))); - updateColour(); - return; - } - - if (event.getId() == "slider_blue") - { - mBlueText->setText(toString(std::floor(mBlueSlider->getValue()))); - updateColour(); - return; - } -} - -void Setup_Colours::setEntry(gcn::Slider *s, TextField *t, int value) -{ - s->setValue(value); - char buffer[100]; - sprintf(buffer, "%d", value); - t->setText(buffer); -} - -void Setup_Colours::apply() -{ - textColour->commit(); -} - -void Setup_Colours::cancel() -{ - textColour->rollback(); - int col = textColour->getColourAt(mSelected); - setEntry(mRedSlider, mRedText, col >> 16); - setEntry(mGreenSlider, mGreenText, (col >> 8) & 0xff); - setEntry(mBlueSlider, mBlueText, col & 0xff); -} - -void Setup_Colours::listen(const TextField *tf) -{ - if (tf == mRedText) - { - mRedSlider->setValue(tf->getValue()); - updateColour(); - return; - } - if (tf == mGreenText) - { - mGreenSlider->setValue(tf->getValue()); - updateColour(); - return; - } - if (tf == mBlueText) - { - mBlueSlider->setValue(tf->getValue()); - updateColour(); - return; - } -} - -void Setup_Colours::updateColour() -{ - if (mSelected == -1) - { - return; - } - int rgb = static_cast(mRedSlider->getValue()) << 16 | - static_cast(mGreenSlider->getValue()) << 8 | - static_cast(mBlueSlider->getValue()); - textColour->setColourAt(mSelected, rgb); -} diff --git a/src/gui/setup_colours.h b/src/gui/setup_colours.h deleted file mode 100644 index 57d9e304..00000000 --- a/src/gui/setup_colours.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Configurable text colors - * Copyright (C) 2008 Douglas Boffey - * - * This file is part of The Mana World. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef SETUP_COLOURS_H -#define SETUP_COLOURS_H - -#include - -#include - -#include -#include - -#include "setuptab.h" -#include "textfield.h" - -#include "../guichanfwd.h" - -class BrowserBox; - -class Setup_Colours : public SetupTab, public gcn::ActionListener, - public TextFieldListener -{ - public: - Setup_Colours(); - ~Setup_Colours(); - void apply(); - void cancel(); - void action(const gcn::ActionEvent &event); - - void listen(const TextField *tf); - private: - gcn::ListBox *mColourBox; - gcn::ScrollArea *mScroll; - BrowserBox *mPreview; - gcn::ScrollArea *mPreviewBox; - int mSelected; - - gcn::Label *mRedLabel; - gcn::Slider *mRedSlider; - TextField *mRedText; - int mRedValue; - - gcn::Label *mGreenLabel; - gcn::Slider *mGreenSlider; - TextField *mGreenText; - int mGreenValue; - - gcn::Label *mBlueLabel; - gcn::Slider *mBlueSlider; - TextField *mBlueText; - int mBlueValue; - - void setEntry(gcn::Slider *s, TextField *t, int value); - void updateColour(); -}; -#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 #include -#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(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 #include -#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 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) { } diff --git a/src/text.h b/src/text.h index 6dcfd90a..550c00a5 100644 --- a/src/text.h +++ b/src/text.h @@ -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 diff --git a/tmw.cbp b/tmw.cbp index ed2ce411..7fcfdd92 100644 --- a/tmw.cbp +++ b/tmw.cbp @@ -125,8 +125,8 @@ - - + + @@ -208,8 +208,8 @@ - - + + -- cgit v1.2.3-70-g09d2