summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/beingpopup.cpp2
-rw-r--r--src/gui/beingpopup.h2
-rw-r--r--src/gui/buydialog.cpp2
-rw-r--r--src/gui/buydialog.h2
-rw-r--r--src/gui/buyselldialog.cpp2
-rw-r--r--src/gui/buyselldialog.h2
-rw-r--r--src/gui/changeemaildialog.cpp2
-rw-r--r--src/gui/changeemaildialog.h2
-rw-r--r--src/gui/changepassworddialog.cpp2
-rw-r--r--src/gui/changepassworddialog.h2
-rw-r--r--src/gui/charcreatedialog.cpp25
-rw-r--r--src/gui/charcreatedialog.h2
-rw-r--r--src/gui/charselectdialog.cpp2
-rw-r--r--src/gui/charselectdialog.h2
-rw-r--r--src/gui/chatwindow.cpp14
-rw-r--r--src/gui/chatwindow.h2
-rw-r--r--src/gui/confirmdialog.cpp2
-rw-r--r--src/gui/confirmdialog.h2
-rw-r--r--src/gui/connectiondialog.cpp2
-rw-r--r--src/gui/connectiondialog.h2
-rw-r--r--src/gui/debugwindow.cpp2
-rw-r--r--src/gui/debugwindow.h2
-rw-r--r--src/gui/didyouknowwindow.cpp2
-rw-r--r--src/gui/didyouknowwindow.h2
-rw-r--r--src/gui/emotepopup.cpp2
-rw-r--r--src/gui/emotepopup.h2
-rw-r--r--src/gui/equipmentwindow.cpp18
-rw-r--r--src/gui/equipmentwindow.h10
-rw-r--r--src/gui/focushandler.cpp2
-rw-r--r--src/gui/focushandler.h2
-rw-r--r--src/gui/gui.cpp21
-rw-r--r--src/gui/gui.h2
-rw-r--r--src/gui/helpwindow.cpp2
-rw-r--r--src/gui/helpwindow.h2
-rw-r--r--src/gui/inventorywindow.cpp4
-rw-r--r--src/gui/inventorywindow.h4
-rw-r--r--src/gui/itemamountwindow.cpp2
-rw-r--r--src/gui/itemamountwindow.h2
-rw-r--r--src/gui/itempopup.cpp2
-rw-r--r--src/gui/itempopup.h2
-rw-r--r--src/gui/killstats.cpp10
-rw-r--r--src/gui/logindialog.cpp14
-rw-r--r--src/gui/logindialog.h2
-rw-r--r--src/gui/minimap.cpp2
-rw-r--r--src/gui/minimap.h2
-rw-r--r--src/gui/ministatuswindow.cpp4
-rw-r--r--src/gui/ministatuswindow.h2
-rw-r--r--src/gui/npcdialog.cpp49
-rw-r--r--src/gui/npcdialog.h9
-rw-r--r--src/gui/npcpostdialog.cpp2
-rw-r--r--src/gui/npcpostdialog.h2
-rw-r--r--src/gui/okdialog.cpp2
-rw-r--r--src/gui/okdialog.h2
-rw-r--r--src/gui/outfitwindow.cpp11
-rw-r--r--src/gui/outfitwindow.h4
-rw-r--r--src/gui/palette.cpp2
-rw-r--r--src/gui/palette.h2
-rw-r--r--src/gui/popupmenu.cpp62
-rw-r--r--src/gui/popupmenu.h4
-rw-r--r--src/gui/quitdialog.cpp2
-rw-r--r--src/gui/quitdialog.h2
-rw-r--r--src/gui/register.cpp2
-rw-r--r--src/gui/register.h2
-rw-r--r--src/gui/sdlfont.cpp2
-rw-r--r--src/gui/sdlfont.h2
-rw-r--r--src/gui/sdlinput.cpp2
-rw-r--r--src/gui/selldialog.cpp2
-rw-r--r--src/gui/selldialog.h2
-rw-r--r--src/gui/serverdialog.cpp23
-rw-r--r--src/gui/serverdialog.h2
-rw-r--r--src/gui/setup.cpp6
-rw-r--r--src/gui/setup.h2
-rw-r--r--src/gui/setup_audio.cpp2
-rw-r--r--src/gui/setup_audio.h2
-rw-r--r--src/gui/setup_chat.cpp2
-rw-r--r--src/gui/setup_chat.h2
-rw-r--r--src/gui/setup_colors.cpp2
-rw-r--r--src/gui/setup_colors.h2
-rw-r--r--src/gui/setup_joystick.cpp2
-rw-r--r--src/gui/setup_joystick.h2
-rw-r--r--src/gui/setup_keyboard.cpp2
-rw-r--r--src/gui/setup_other.cpp2
-rw-r--r--src/gui/setup_other.h2
-rw-r--r--src/gui/setup_perfomance.cpp2
-rw-r--r--src/gui/setup_perfomance.h2
-rw-r--r--src/gui/setup_players.cpp2
-rw-r--r--src/gui/setup_players.h2
-rw-r--r--src/gui/setup_relations.cpp2
-rw-r--r--src/gui/setup_relations.h2
-rw-r--r--src/gui/setup_video.cpp2
-rw-r--r--src/gui/setup_video.h2
-rw-r--r--src/gui/shopwindow.cpp2
-rw-r--r--src/gui/shopwindow.h2
-rw-r--r--src/gui/shortcutwindow.cpp44
-rw-r--r--src/gui/shortcutwindow.h6
-rw-r--r--src/gui/skilldialog.cpp10
-rw-r--r--src/gui/skilldialog.h2
-rw-r--r--src/gui/socialwindow.cpp147
-rw-r--r--src/gui/socialwindow.h3
-rw-r--r--src/gui/specialswindow.cpp2
-rw-r--r--src/gui/specialswindow.h2
-rw-r--r--src/gui/speechbubble.cpp2
-rw-r--r--src/gui/speechbubble.h2
-rw-r--r--src/gui/statuswindow.cpp21
-rw-r--r--src/gui/statuswindow.h4
-rw-r--r--src/gui/textdialog.cpp2
-rw-r--r--src/gui/textdialog.h4
-rw-r--r--src/gui/textpopup.cpp2
-rw-r--r--src/gui/textpopup.h2
-rw-r--r--src/gui/theme.cpp20
-rw-r--r--src/gui/theme.h2
-rw-r--r--src/gui/tradewindow.cpp2
-rw-r--r--src/gui/tradewindow.h2
-rw-r--r--src/gui/unregisterdialog.cpp2
-rw-r--r--src/gui/unregisterdialog.h2
-rw-r--r--src/gui/updaterwindow.cpp23
-rw-r--r--src/gui/updaterwindow.h2
-rw-r--r--src/gui/userpalette.cpp2
-rw-r--r--src/gui/userpalette.h2
-rw-r--r--src/gui/viewport.cpp57
-rw-r--r--src/gui/viewport.h16
-rw-r--r--src/gui/whoisonline.cpp20
-rw-r--r--src/gui/whoisonline.h1
-rw-r--r--src/gui/widgets/avatarlistbox.cpp2
-rw-r--r--src/gui/widgets/avatarlistbox.h2
-rw-r--r--src/gui/widgets/battletab.cpp2
-rw-r--r--src/gui/widgets/battletab.h2
-rw-r--r--src/gui/widgets/browserbox.cpp5
-rw-r--r--src/gui/widgets/browserbox.h2
-rw-r--r--src/gui/widgets/button.cpp2
-rw-r--r--src/gui/widgets/button.h2
-rw-r--r--src/gui/widgets/channeltab.cpp2
-rw-r--r--src/gui/widgets/channeltab.h2
-rw-r--r--src/gui/widgets/chattab.cpp2
-rw-r--r--src/gui/widgets/chattab.h2
-rw-r--r--src/gui/widgets/checkbox.cpp2
-rw-r--r--src/gui/widgets/checkbox.h2
-rw-r--r--src/gui/widgets/container.cpp2
-rw-r--r--src/gui/widgets/container.h2
-rw-r--r--src/gui/widgets/desktop.cpp8
-rw-r--r--src/gui/widgets/dropdown.cpp2
-rw-r--r--src/gui/widgets/dropdown.h4
-rw-r--r--src/gui/widgets/flowcontainer.cpp2
-rw-r--r--src/gui/widgets/flowcontainer.h2
-rw-r--r--src/gui/widgets/guildchattab.cpp2
-rw-r--r--src/gui/widgets/guildchattab.h2
-rw-r--r--src/gui/widgets/guitable.cpp2
-rw-r--r--src/gui/widgets/guitable.h2
-rw-r--r--src/gui/widgets/horizontcontainer.cpp2
-rw-r--r--src/gui/widgets/horizontcontainer.h2
-rw-r--r--src/gui/widgets/icon.cpp2
-rw-r--r--src/gui/widgets/icon.h2
-rw-r--r--src/gui/widgets/inttextfield.cpp2
-rw-r--r--src/gui/widgets/inttextfield.h2
-rw-r--r--src/gui/widgets/inventoryfilter.cpp2
-rw-r--r--src/gui/widgets/inventoryfilter.h2
-rw-r--r--src/gui/widgets/itemcontainer.cpp2
-rw-r--r--src/gui/widgets/itemcontainer.h2
-rw-r--r--src/gui/widgets/itemlinkhandler.cpp2
-rw-r--r--src/gui/widgets/itemlinkhandler.h2
-rw-r--r--src/gui/widgets/itemshortcutcontainer.cpp2
-rw-r--r--src/gui/widgets/itemshortcutcontainer.h2
-rw-r--r--src/gui/widgets/layout.cpp2
-rw-r--r--src/gui/widgets/layout.h2
-rw-r--r--src/gui/widgets/layouthelper.cpp2
-rw-r--r--src/gui/widgets/layouthelper.h2
-rw-r--r--src/gui/widgets/linkhandler.h2
-rw-r--r--src/gui/widgets/listbox.cpp2
-rw-r--r--src/gui/widgets/listbox.h2
-rw-r--r--src/gui/widgets/mouseevent.h2
-rw-r--r--src/gui/widgets/passwordfield.cpp2
-rw-r--r--src/gui/widgets/passwordfield.h2
-rw-r--r--src/gui/widgets/playerbox.cpp2
-rw-r--r--src/gui/widgets/playerbox.h6
-rw-r--r--src/gui/widgets/popup.cpp2
-rw-r--r--src/gui/widgets/popup.h2
-rw-r--r--src/gui/widgets/progressbar.cpp2
-rw-r--r--src/gui/widgets/progressbar.h2
-rw-r--r--src/gui/widgets/progressindicator.cpp6
-rw-r--r--src/gui/widgets/progressindicator.h2
-rw-r--r--src/gui/widgets/radiobutton.cpp2
-rw-r--r--src/gui/widgets/radiobutton.h2
-rw-r--r--src/gui/widgets/resizegrip.cpp2
-rw-r--r--src/gui/widgets/resizegrip.h2
-rw-r--r--src/gui/widgets/scrollarea.cpp2
-rw-r--r--src/gui/widgets/scrollarea.h2
-rw-r--r--src/gui/widgets/setupitem.cpp2
-rw-r--r--src/gui/widgets/setupitem.h2
-rw-r--r--src/gui/widgets/setuptab.cpp2
-rw-r--r--src/gui/widgets/setuptab.h2
-rw-r--r--src/gui/widgets/setuptabscroll.cpp2
-rw-r--r--src/gui/widgets/setuptabscroll.h2
-rw-r--r--src/gui/widgets/shopitems.cpp2
-rw-r--r--src/gui/widgets/shopitems.h2
-rw-r--r--src/gui/widgets/shoplistbox.cpp2
-rw-r--r--src/gui/widgets/shoplistbox.h2
-rw-r--r--src/gui/widgets/shortcutcontainer.cpp2
-rw-r--r--src/gui/widgets/shortcutcontainer.h2
-rw-r--r--src/gui/widgets/slider.cpp2
-rw-r--r--src/gui/widgets/slider.h2
-rw-r--r--src/gui/widgets/tab.cpp2
-rw-r--r--src/gui/widgets/tab.h2
-rw-r--r--src/gui/widgets/tabbedarea.cpp14
-rw-r--r--src/gui/widgets/tabbedarea.h10
-rw-r--r--src/gui/widgets/tablemodel.cpp2
-rw-r--r--src/gui/widgets/tablemodel.h2
-rw-r--r--src/gui/widgets/textbox.cpp2
-rw-r--r--src/gui/widgets/textbox.h2
-rw-r--r--src/gui/widgets/textfield.cpp2
-rw-r--r--src/gui/widgets/textfield.h2
-rw-r--r--src/gui/widgets/textpreview.cpp2
-rw-r--r--src/gui/widgets/textpreview.h2
-rw-r--r--src/gui/widgets/tradetab.cpp2
-rw-r--r--src/gui/widgets/tradetab.h2
-rw-r--r--src/gui/widgets/vertcontainer.cpp4
-rw-r--r--src/gui/widgets/vertcontainer.h2
-rw-r--r--src/gui/widgets/whispertab.cpp2
-rw-r--r--src/gui/widgets/whispertab.h2
-rw-r--r--src/gui/widgets/window.cpp2
-rw-r--r--src/gui/widgets/window.h2
-rw-r--r--src/gui/widgets/windowcontainer.cpp2
-rw-r--r--src/gui/widgets/windowcontainer.h2
-rw-r--r--src/gui/windowmenu.cpp4
-rw-r--r--src/gui/windowmenu.h2
-rw-r--r--src/gui/worldselectdialog.cpp2
-rw-r--r--src/gui/worldselectdialog.h2
226 files changed, 732 insertions, 367 deletions
diff --git a/src/gui/beingpopup.cpp b/src/gui/beingpopup.cpp
index 759d4c245..eff4652ce 100644
--- a/src/gui/beingpopup.cpp
+++ b/src/gui/beingpopup.cpp
@@ -1,7 +1,7 @@
/*
* The ManaPlus Client
* Copyright (C) 2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/beingpopup.h b/src/gui/beingpopup.h
index 2aeb6c20c..a029f739a 100644
--- a/src/gui/beingpopup.h
+++ b/src/gui/beingpopup.h
@@ -1,7 +1,7 @@
/*
* The ManaPlus Client
* Copyright (C) 2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/buydialog.cpp b/src/gui/buydialog.cpp
index f5e556848..c41f22de7 100644
--- a/src/gui/buydialog.cpp
+++ b/src/gui/buydialog.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/buydialog.h b/src/gui/buydialog.h
index 6bc10a103..57f66c922 100644
--- a/src/gui/buydialog.h
+++ b/src/gui/buydialog.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/buyselldialog.cpp b/src/gui/buyselldialog.cpp
index 2a614ed74..5aa421bad 100644
--- a/src/gui/buyselldialog.cpp
+++ b/src/gui/buyselldialog.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/buyselldialog.h b/src/gui/buyselldialog.h
index 2c7e5c101..d8e4444d8 100644
--- a/src/gui/buyselldialog.h
+++ b/src/gui/buyselldialog.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/changeemaildialog.cpp b/src/gui/changeemaildialog.cpp
index 3c412b424..518ed3da1 100644
--- a/src/gui/changeemaildialog.cpp
+++ b/src/gui/changeemaildialog.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2008-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/changeemaildialog.h b/src/gui/changeemaildialog.h
index fccb5cb1c..acbd6b55a 100644
--- a/src/gui/changeemaildialog.h
+++ b/src/gui/changeemaildialog.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2008-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/changepassworddialog.cpp b/src/gui/changepassworddialog.cpp
index a7ebaebca..8082b8d58 100644
--- a/src/gui/changepassworddialog.cpp
+++ b/src/gui/changepassworddialog.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/changepassworddialog.h b/src/gui/changepassworddialog.h
index fca8b4946..525384a09 100644
--- a/src/gui/changepassworddialog.h
+++ b/src/gui/changepassworddialog.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/charcreatedialog.cpp b/src/gui/charcreatedialog.cpp
index d621caa96..a1233fdcc 100644
--- a/src/gui/charcreatedialog.cpp
+++ b/src/gui/charcreatedialog.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -124,24 +124,24 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *parent, int slot):
mAttributesLeft = new Label(
strprintf(_("Please distribute %d points"), 99));
- int w = 200;
+ int w = 280;
int h = 330;
setContentSize(w, h);
- mPlayerBox->setDimension(gcn::Rectangle(80, 30, 110, 85));
+ mPlayerBox->setDimension(gcn::Rectangle(145, 35, 110, 87));
mNameLabel->setPosition(5, 5);
mNameField->setDimension(
- gcn::Rectangle(45, 5, w - 45 - 7, mNameField->getHeight()));
- mPrevHairColorButton->setPosition(90, 35);
- mNextHairColorButton->setPosition(165, 35);
+ gcn::Rectangle(60, 5, w - 60 - 7, mNameField->getHeight()));
+ mPrevHairColorButton->setPosition(155, 35);
+ mNextHairColorButton->setPosition(230, 35);
mHairColorLabel->setPosition(5, 40);
- mPrevHairStyleButton->setPosition(90, 64);
- mNextHairStyleButton->setPosition(165, 64);
+ mPrevHairStyleButton->setPosition(155, 64);
+ mNextHairStyleButton->setPosition(230, 64);
mHairStyleLabel->setPosition(5, 70);
if (serverVersion >= 2)
{
- mPrevRaceButton->setPosition(90, 93);
- mNextRaceButton->setPosition(165, 93);
+ mPrevRaceButton->setPosition(155, 93);
+ mNextRaceButton->setPosition(230, 93);
mRaceLabel->setPosition(5, 100);
}
@@ -365,17 +365,18 @@ void CharCreateDialog::setAttributes(const std::vector<std::string> &labels,
mAttributeLabel[i] = new Label(labels[i]);
mAttributeLabel[i]->setWidth(70);
mAttributeLabel[i]->setPosition(5, 140 + i*20);
+ mAttributeLabel[i]->adjustSize();
add(mAttributeLabel[i]);
mAttributeSlider[i] = new Slider(min, max);
- mAttributeSlider[i]->setDimension(gcn::Rectangle(75, 140 + i * 20,
+ mAttributeSlider[i]->setDimension(gcn::Rectangle(140, 140 + i * 20,
100, 10));
mAttributeSlider[i]->setActionEventId("statslider");
mAttributeSlider[i]->addActionListener(this);
add(mAttributeSlider[i]);
mAttributeValue[i] = new Label(toString(min));
- mAttributeValue[i]->setPosition(180, 140 + i*20);
+ mAttributeValue[i]->setPosition(245, 140 + i*20);
add(mAttributeValue[i]);
}
diff --git a/src/gui/charcreatedialog.h b/src/gui/charcreatedialog.h
index c7010d6b1..e369f1777 100644
--- a/src/gui/charcreatedialog.h
+++ b/src/gui/charcreatedialog.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/charselectdialog.cpp b/src/gui/charselectdialog.cpp
index 401c9ae33..638691bab 100644
--- a/src/gui/charselectdialog.cpp
+++ b/src/gui/charselectdialog.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/charselectdialog.h b/src/gui/charselectdialog.h
index 9ebab0126..1e32fb311 100644
--- a/src/gui/charselectdialog.h
+++ b/src/gui/charselectdialog.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp
index 84d61cf65..899bbdc36 100644
--- a/src/gui/chatwindow.cpp
+++ b/src/gui/chatwindow.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -305,6 +305,7 @@ void ChatWindow::fillCommands()
mCommands.push_back("/serverignoreall");
mCommands.push_back("/serverunignoreall");
mCommands.push_back("/dumpg");
+ mCommands.push_back("/dumpt");
mCommands.push_back("/pseudoaway ");
mCommands.push_back("<PLAYER>");
mCommands.push_back("<MONSTER>");
@@ -419,11 +420,11 @@ void ChatWindow::prevTab()
int tab = mChatTabs->getSelectedTabIndex();
- if (tab == 0)
+ if (tab <= 0)
tab = mChatTabs->getNumberOfTabs();
tab--;
- mChatTabs->setSelectedTab(tab);
+ mChatTabs->setSelectedTabByPos(tab);
}
void ChatWindow::nextTab()
@@ -437,7 +438,7 @@ void ChatWindow::nextTab()
if (tab == mChatTabs->getNumberOfTabs())
tab = 0;
- mChatTabs->setSelectedTab(tab);
+ mChatTabs->setSelectedTabByPos(tab);
}
void ChatWindow::closeTab()
@@ -459,7 +460,7 @@ void ChatWindow::closeTab()
void ChatWindow::defaultTab()
{
if (mChatTabs)
- mChatTabs->setSelectedTab(static_cast<unsigned>(0));
+ mChatTabs->setSelectedTabByPos(static_cast<unsigned>(0));
}
void ChatWindow::action(const gcn::ActionEvent &event)
@@ -1179,7 +1180,8 @@ void ChatWindow::autoComplete()
ChatTab *cTab = static_cast<ChatTab*>(mChatTabs->getSelectedTab());
std::vector<std::string> nameList;
- cTab->getAutoCompleteList(nameList);
+ if (cTab)
+ cTab->getAutoCompleteList(nameList);
newName = autoComplete(nameList, name);
if (newName == "" && actorSpriteManager)
diff --git a/src/gui/chatwindow.h b/src/gui/chatwindow.h
index 3c1195e8f..82e3d31f2 100644
--- a/src/gui/chatwindow.h
+++ b/src/gui/chatwindow.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/confirmdialog.cpp b/src/gui/confirmdialog.cpp
index 298855563..cf9d541ad 100644
--- a/src/gui/confirmdialog.cpp
+++ b/src/gui/confirmdialog.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/confirmdialog.h b/src/gui/confirmdialog.h
index 2b5febed0..421be7f96 100644
--- a/src/gui/confirmdialog.h
+++ b/src/gui/confirmdialog.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/connectiondialog.cpp b/src/gui/connectiondialog.cpp
index da98ea5ac..ba1330881 100644
--- a/src/gui/connectiondialog.cpp
+++ b/src/gui/connectiondialog.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/connectiondialog.h b/src/gui/connectiondialog.h
index 7c0b59faf..76d8a952b 100644
--- a/src/gui/connectiondialog.h
+++ b/src/gui/connectiondialog.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/debugwindow.cpp b/src/gui/debugwindow.cpp
index 56a63c72d..d13545bea 100644
--- a/src/gui/debugwindow.cpp
+++ b/src/gui/debugwindow.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/debugwindow.h b/src/gui/debugwindow.h
index b955209a5..ff86eaf74 100644
--- a/src/gui/debugwindow.h
+++ b/src/gui/debugwindow.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/didyouknowwindow.cpp b/src/gui/didyouknowwindow.cpp
index b5a7da634..db0878360 100644
--- a/src/gui/didyouknowwindow.cpp
+++ b/src/gui/didyouknowwindow.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/didyouknowwindow.h b/src/gui/didyouknowwindow.h
index d9734e8fe..f3fb61c70 100644
--- a/src/gui/didyouknowwindow.h
+++ b/src/gui/didyouknowwindow.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/emotepopup.cpp b/src/gui/emotepopup.cpp
index a8c92ed47..a286f78e8 100644
--- a/src/gui/emotepopup.cpp
+++ b/src/gui/emotepopup.cpp
@@ -3,7 +3,7 @@
* Copyright (C) 2009 Aethyra Development Team
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/emotepopup.h b/src/gui/emotepopup.h
index a80562fea..453c4e669 100644
--- a/src/gui/emotepopup.h
+++ b/src/gui/emotepopup.h
@@ -3,7 +3,7 @@
* Copyright (C) 2009 Aethyra Development Team
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp
index cb3ace0c7..275bf19bb 100644
--- a/src/gui/equipmentwindow.cpp
+++ b/src/gui/equipmentwindow.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -65,7 +65,7 @@ EquipmentWindow::EquipmentWindow(Equipment *equipment, Being *being,
mEquipment(equipment),
mSelected(-1),
mForing(foring),
- mImageSet(0)
+ mImageSet(nullptr)
{
mBeing = being;
mItemPopup = new ItemPopup;
@@ -355,7 +355,7 @@ void EquipmentWindow::resetBeing(Being *being)
void EquipmentWindow::fillBoxes()
{
XML::Document *doc = new XML::Document("equipmentwindow.xml");
- xmlNodePtr root = doc->rootNode();
+ XmlNodePtr root = doc->rootNode();
if (!root)
{
delete doc;
@@ -371,23 +371,23 @@ void EquipmentWindow::fillBoxes()
for_each_xml_child_node(node, root)
{
- if (xmlStrEqual(node->name, BAD_CAST "window"))
+ if (xmlNameEqual(node, "window"))
loadWindow(node);
- else if (xmlStrEqual(node->name, BAD_CAST "playerbox"))
+ else if (xmlNameEqual(node, "playerbox"))
loadPlayerBox(node);
- else if (xmlStrEqual(node->name, BAD_CAST "slot"))
+ else if (xmlNameEqual(node, "slot"))
loadSlot(node, mImageSet);
}
delete doc;
}
-void EquipmentWindow::loadWindow(xmlNodePtr windowNode)
+void EquipmentWindow::loadWindow(XmlNodePtr windowNode)
{
setDefaultSize(XML::getProperty(windowNode, "width", 180),
XML::getProperty(windowNode, "height", 345), ImageRect::CENTER);
}
-void EquipmentWindow::loadPlayerBox(xmlNodePtr playerBoxNode)
+void EquipmentWindow::loadPlayerBox(XmlNodePtr playerBoxNode)
{
mPlayerBox->setDimension(gcn::Rectangle(
XML::getProperty(playerBoxNode, "x", 50),
@@ -396,7 +396,7 @@ void EquipmentWindow::loadPlayerBox(xmlNodePtr playerBoxNode)
XML::getProperty(playerBoxNode, "height", 168)));
}
-void EquipmentWindow::loadSlot(xmlNodePtr slotNode, ImageSet *imageset)
+void EquipmentWindow::loadSlot(XmlNodePtr slotNode, ImageSet *imageset)
{
int slot = parseSlotName(XML::getProperty(slotNode, "name", ""));
if (slot < 0)
diff --git a/src/gui/equipmentwindow.h b/src/gui/equipmentwindow.h
index 0a3c2da20..daeaeb3d7 100644
--- a/src/gui/equipmentwindow.h
+++ b/src/gui/equipmentwindow.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -85,7 +85,7 @@ class EquipmentWindow : public Window, public gcn::ActionListener
void mousePressed(gcn::MouseEvent& mouseEvent);
Item* getEquipment(int i)
- { return mEquipment ? mEquipment->getEquipment(i) : 0; }
+ { return mEquipment ? mEquipment->getEquipment(i) : nullptr; }
void setBeing(Being *being);
@@ -108,11 +108,11 @@ class EquipmentWindow : public Window, public gcn::ActionListener
void addBox(int idx, int x, int y, int imageIndex);
- void loadWindow(xmlNodePtr windowNode);
+ void loadWindow(XmlNodePtr windowNode);
- void loadPlayerBox(xmlNodePtr playerBoxNode);
+ void loadPlayerBox(XmlNodePtr playerBoxNode);
- void loadSlot(xmlNodePtr slotNode, ImageSet *imageset);
+ void loadSlot(XmlNodePtr slotNode, ImageSet *imageset);
int parseSlotName(std::string name);
diff --git a/src/gui/focushandler.cpp b/src/gui/focushandler.cpp
index 40fa2f4ed..0e98c3473 100644
--- a/src/gui/focushandler.cpp
+++ b/src/gui/focushandler.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/focushandler.h b/src/gui/focushandler.h
index 9d814bb69..064f04697 100644
--- a/src/gui/focushandler.h
+++ b/src/gui/focushandler.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index b3154fb25..3d79f0cdf 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -105,14 +105,14 @@ Gui::Gui(Graphics *graphics):
Window::setWindowContainer(guiTop);
setTop(guiTop);
+ const std::vector<std::string> langs = getLang();
+ const bool isJapan = (!langs.empty() && langs[0].size() > 3
+ && langs[0].substr(0, 3) == "ja_");
+
// Set global font
const int fontSize = config.getIntValue("fontSize");
-
std::string fontFile = config.getValue("font", "");
-
- std::vector<std::string> langs = getLang();
- if (!langs.empty() && langs[0].size() > 3
- && langs[0].substr(0, 3) == "ja_")
+ if (isJapan)
{
fontFile = config.getValue("japanFont", "");
if (fontFile.empty())
@@ -134,6 +134,15 @@ Gui::Gui(Graphics *graphics):
// Set particle font
fontFile = config.getValue("particleFont", "");
+
+ if (isJapan)
+ {
+ fontFile = config.getValue("japanFont", "");
+ if (fontFile.empty())
+ fontFile = branding.getStringValue("japanFont");
+ }
+
+
if (fontFile.empty())
fontFile = branding.getStringValue("particleFont");
diff --git a/src/gui/gui.h b/src/gui/gui.h
index 578202b17..cadcc89ac 100644
--- a/src/gui/gui.h
+++ b/src/gui/gui.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/helpwindow.cpp b/src/gui/helpwindow.cpp
index b1175d709..a099c7a7a 100644
--- a/src/gui/helpwindow.cpp
+++ b/src/gui/helpwindow.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/helpwindow.h b/src/gui/helpwindow.h
index 178ae1e16..a6d83e91d 100644
--- a/src/gui/helpwindow.h
+++ b/src/gui/helpwindow.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index 8ffebebff..01e2bdd17 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -98,7 +98,7 @@ InventoryWindow::WindowList InventoryWindow::instances;
InventoryWindow::InventoryWindow(Inventory *inventory):
Window("Inventory", false, nullptr, "inventory.xml"),
mInventory(inventory),
- mDropButton(0),
+ mDropButton(nullptr),
mSplit(false),
mCompactMode(false)
{
diff --git a/src/gui/inventorywindow.h b/src/gui/inventorywindow.h
index aa78705b8..2b35ec9c4 100644
--- a/src/gui/inventorywindow.h
+++ b/src/gui/inventorywindow.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -128,7 +128,7 @@ class InventoryWindow : public Window,
void processEvent(Mana::Channels channel, const Mana::Event &event);
- void updateButtons(Item *item = 0);
+ void updateButtons(Item *item = nullptr);
bool isInputFocused() const;
diff --git a/src/gui/itemamountwindow.cpp b/src/gui/itemamountwindow.cpp
index a80434ac0..9e2a97681 100644
--- a/src/gui/itemamountwindow.cpp
+++ b/src/gui/itemamountwindow.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/itemamountwindow.h b/src/gui/itemamountwindow.h
index bacd4cfd0..076101c0f 100644
--- a/src/gui/itemamountwindow.h
+++ b/src/gui/itemamountwindow.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp
index 2e87cd544..9a9e5f50d 100644
--- a/src/gui/itempopup.cpp
+++ b/src/gui/itempopup.cpp
@@ -3,7 +3,7 @@
* Copyright (C) 2008 The Legend of Mazzeroth Development Team
* Copyright (C) 2008-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/itempopup.h b/src/gui/itempopup.h
index 66d7e91a2..89f6355fe 100644
--- a/src/gui/itempopup.h
+++ b/src/gui/itempopup.h
@@ -3,7 +3,7 @@
* Copyright (C) 2008 The Legend of Mazzeroth Development Team
* Copyright (C) 2008-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/killstats.cpp b/src/gui/killstats.cpp
index fa6241ef6..972c660ec 100644
--- a/src/gui/killstats.cpp
+++ b/src/gui/killstats.cpp
@@ -70,8 +70,8 @@ KillStats::KillStats():
xpNextLevel = 1;
mLine1 = new Label(strprintf(_("Level: %d at %f%%"),
- player_node->getLevel(), static_cast<float>(xp)
- / static_cast<float>(xpNextLevel) * 100.0f));
+ player_node->getLevel(), static_cast<double>(xp)
+ / static_cast<double>(xpNextLevel) * 100.0));
mLine2 = new Label(strprintf(_("Exp: %d/%d Left: %d"),
xp, xpNextLevel, xpNextLevel - xp));
@@ -206,9 +206,9 @@ void KillStats::gainXp(int xp)
timeDiff = 1;
mLine1->setCaption(strprintf(_("Level: %d at %f%%"),
- player_node->getLevel(), static_cast<float>(
- PlayerInfo::getAttribute(EXP)) / static_cast<float>(
- xpNextLevel) * 100.0f));
+ player_node->getLevel(), static_cast<double>(
+ PlayerInfo::getAttribute(EXP)) / static_cast<double>(
+ xpNextLevel) * 100.0));
mLine2->setCaption(strprintf(_("Exp: %d/%d Left: %d"),
PlayerInfo::getAttribute(EXP), xpNextLevel,
diff --git a/src/gui/logindialog.cpp b/src/gui/logindialog.cpp
index 86b3dc28b..b1c80b102 100644
--- a/src/gui/logindialog.cpp
+++ b/src/gui/logindialog.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -184,8 +184,16 @@ void LoginDialog::action(const gcn::ActionEvent &event)
serverConfig.setValue("customUpdateHost",
mUpdateHostText->getText());
- mLoginData->updateHost = mUpdateHostText->getText();
- *mUpdateHost = mUpdateHostText->getText();
+ if (checkPath(mUpdateHostText->getText()))
+ {
+ mLoginData->updateHost = mUpdateHostText->getText();
+ *mUpdateHost = mUpdateHostText->getText();
+ }
+ else
+ {
+ mLoginData->updateHost = "";
+ *mUpdateHost = "";
+ }
}
mLoginData->updateType = updateType;
serverConfig.setValue("updateType", updateType);
diff --git a/src/gui/logindialog.h b/src/gui/logindialog.h
index 0696bc680..08799b1c2 100644
--- a/src/gui/logindialog.h
+++ b/src/gui/logindialog.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp
index d890a462f..74da37341 100644
--- a/src/gui/minimap.cpp
+++ b/src/gui/minimap.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/minimap.h b/src/gui/minimap.h
index 86996f51c..8b7da5849 100644
--- a/src/gui/minimap.h
+++ b/src/gui/minimap.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/ministatuswindow.cpp b/src/gui/ministatuswindow.cpp
index 665d2b61b..00df97813 100644
--- a/src/gui/ministatuswindow.cpp
+++ b/src/gui/ministatuswindow.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -188,7 +188,7 @@ void MiniStatusWindow::updateBars()
void MiniStatusWindow::setIcon(int index, AnimatedSprite *sprite)
{
if (index >= static_cast<int>(mIcons.size()))
- mIcons.resize(index + 1, 0);
+ mIcons.resize(index + 1, nullptr);
delete mIcons[index];
diff --git a/src/gui/ministatuswindow.h b/src/gui/ministatuswindow.h
index 6fb8f7652..ca18e1b92 100644
--- a/src/gui/ministatuswindow.h
+++ b/src/gui/ministatuswindow.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp
index 66a30c8a7..eadd99c21 100644
--- a/src/gui/npcdialog.cpp
+++ b/src/gui/npcdialog.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -26,6 +26,7 @@
#include "client.h"
#include "gui/setup.h"
+#include "gui/viewport.h"
#include "gui/widgets/browserbox.h"
#include "gui/widgets/button.h"
@@ -48,7 +49,7 @@
#include "debug.h"
-#define CAPTION_WAITING _("Waiting for server")
+#define CAPTION_WAITING _("Stop waiting")
#define CAPTION_NEXT _("Next")
#define CAPTION_CLOSE _("Close")
#define CAPTION_SUBMIT _("Submit")
@@ -62,7 +63,10 @@ NpcDialog::NpcDialog(int npcId) :
mDefaultInt(0),
mInputState(NPC_INPUT_NONE),
mActionState(NPC_ACTION_WAIT),
- mLastNextTime(0)
+ mLastNextTime(0),
+ mCameraMode(-1),
+ mCameraX(0),
+ mCameraY(0)
{
// Basic Window Setup
setWindowName("NpcText");
@@ -220,9 +224,9 @@ void NpcDialog::action(const gcn::ActionEvent &event)
return;
nextDialog();
- addText(_("> Next"), false);
}
- else if (mActionState == NPC_ACTION_CLOSE)
+ else if (mActionState == NPC_ACTION_CLOSE
+ || mActionState == NPC_ACTION_WAIT)
{
closeDialog();
}
@@ -301,6 +305,7 @@ void NpcDialog::nextDialog()
void NpcDialog::closeDialog()
{
+ restoreCamera();
Net::getNpcHandler()->closeDialog(mNpcId);
}
@@ -501,9 +506,37 @@ void NpcDialog::buildLayout()
Layout &layout = getLayout();
layout.setRowHeight(0, Layout::AUTO_SET);
- mButton->setEnabled(mActionState != NPC_ACTION_WAIT);
-
redraw();
mScrollArea->setVerticalScrollAmount(mScrollArea->getVerticalMaxScroll());
-} \ No newline at end of file
+}
+
+void NpcDialog::saveCamera()
+{
+ if (!viewport || mCameraMode >= 0)
+ return;
+
+ mCameraMode = viewport->getCameraMode();
+ mCameraX = viewport->getCameraRelativeX();
+ mCameraY = viewport->getCameraRelativeY();
+}
+
+void NpcDialog::restoreCamera()
+{
+ if (!viewport || mCameraMode == -1)
+ return;
+
+ if (!mCameraMode)
+ {
+ if (viewport->getCameraMode() != mCameraMode)
+ viewport->toggleCameraMode();
+ }
+ else
+ {
+ if (viewport->getCameraMode() != mCameraMode)
+ viewport->toggleCameraMode();
+ viewport->setCameraRelativeX(mCameraX);
+ viewport->setCameraRelativeY(mCameraY);
+ }
+ mCameraMode = -1;
+}
diff --git a/src/gui/npcdialog.h b/src/gui/npcdialog.h
index 7e9ea7e10..4d919a3f2 100644
--- a/src/gui/npcdialog.h
+++ b/src/gui/npcdialog.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -172,6 +172,10 @@ class NpcDialog : public Window, public gcn::ActionListener,
*/
static void destroyAll();
+ void saveCamera();
+
+ void restoreCamera();
+
private:
typedef std::list<NpcDialog*> DialogList;
static DialogList instances;
@@ -230,6 +234,9 @@ class NpcDialog : public Window, public gcn::ActionListener,
NpcInputState mInputState;
NpcActionState mActionState;
int mLastNextTime;
+ int mCameraMode;
+ int mCameraX;
+ int mCameraY;
};
#endif // NPCDIALOG_H
diff --git a/src/gui/npcpostdialog.cpp b/src/gui/npcpostdialog.cpp
index ada48e832..6bcb62baf 100644
--- a/src/gui/npcpostdialog.cpp
+++ b/src/gui/npcpostdialog.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2008-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/npcpostdialog.h b/src/gui/npcpostdialog.h
index bc329096b..b00f7bda0 100644
--- a/src/gui/npcpostdialog.h
+++ b/src/gui/npcpostdialog.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2008-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/okdialog.cpp b/src/gui/okdialog.cpp
index 5a6ee4846..4a3bdf731 100644
--- a/src/gui/okdialog.cpp
+++ b/src/gui/okdialog.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/okdialog.h b/src/gui/okdialog.h
index 2f32d0d65..5705be568 100644
--- a/src/gui/okdialog.h
+++ b/src/gui/okdialog.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/outfitwindow.cpp b/src/gui/outfitwindow.cpp
index c33c753bc..74e8dbe46 100644
--- a/src/gui/outfitwindow.cpp
+++ b/src/gui/outfitwindow.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2007-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -985,3 +985,12 @@ void OutfitWindow::setItemSelected(Item *item)
mItemColorSelected = 1;
}
}
+
+void OutfitWindow::clearCurrentOutfit()
+{
+ for (unsigned f = 0; f < OUTFIT_ITEM_COUNT; f++)
+ {
+ mItems[mCurrentOutfit][f] = -1;
+ mItemColors[mCurrentOutfit][f] = 1;
+ }
+}
diff --git a/src/gui/outfitwindow.h b/src/gui/outfitwindow.h
index 8dd5fd6a3..b2b46c7e7 100644
--- a/src/gui/outfitwindow.h
+++ b/src/gui/outfitwindow.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2007-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -108,6 +108,8 @@ class OutfitWindow : public Window, gcn::ActionListener
std::string keyName(int number) A_PURE;
+ void clearCurrentOutfit();
+
private:
Button *mPreviousButton;
Button *mNextButton;
diff --git a/src/gui/palette.cpp b/src/gui/palette.cpp
index 348f97de8..fe14cd2d4 100644
--- a/src/gui/palette.cpp
+++ b/src/gui/palette.cpp
@@ -3,7 +3,7 @@
* Copyright (C) 2008 Douglas Boffey <dougaboffey@netscape.net>
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/palette.h b/src/gui/palette.h
index d46a3c57c..36d87e305 100644
--- a/src/gui/palette.h
+++ b/src/gui/palette.h
@@ -3,7 +3,7 @@
* Copyright (C) 2008 Douglas Boffey <dougaboffey@netscape.net>
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index 15afc7600..cd3a4c5ad 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -85,7 +85,7 @@ std::string tradePartnerName("");
PopupMenu::PopupMenu():
Popup("PopupMenu", "popupmenu.xml"),
mBeingId(0),
- mFloorItem(nullptr),
+ mFloorItemId(0),
mItem(nullptr),
mItemId(0),
mItemColor(1),
@@ -367,7 +367,7 @@ void PopupMenu::showPopup(int x, int y, std::vector<ActorSprite*> &beings)
being->getId(), (being->getName()
+ being->getGenderSignWithSpace()).c_str()));
}
- else if(actor->getType() == ActorSprite::FLOOR_ITEM)
+ else if (actor->getType() == ActorSprite::FLOOR_ITEM)
{
FloorItem *floorItem = static_cast<FloorItem*>(actor);
const ItemInfo &info = floorItem->getInfo();
@@ -529,7 +529,7 @@ void PopupMenu::showPopup(int x, int y, FloorItem *floorItem)
if (!floorItem)
return;
- mFloorItem = floorItem;
+ mFloorItemId = floorItem->getId();
mX = x;
mY = y;
const ItemInfo &info = floorItem->getInfo();
@@ -586,7 +586,7 @@ void PopupMenu::showOutfitsPopup(int x, int y)
mBrowserBox->clearRows();
mBrowserBox->addRow(_("Outfits"));
- mBrowserBox->addRow("load old outfits", _("Load old outfits"));
+ mBrowserBox->addRow("clear outfit", _("Clear outfit"));
mBrowserBox->addRow("##3---");
mBrowserBox->addRow("cancel", _("Cancel"));
@@ -871,7 +871,7 @@ void PopupMenu::showChangePos(int x, int y)
else
{
mBeingId = 0;
- mFloorItem = nullptr;
+ mFloorItemId = 0;
mItem = nullptr;
mMapItem = nullptr;
mNick = "";
@@ -1038,10 +1038,14 @@ void PopupMenu::handleLink(const std::string &link,
player_node->setImitate(mNick);
}
// Pick Up Floor Item action
- else if ((link == "pickup") && mFloorItem)
+ else if ((link == "pickup") && mFloorItemId)
{
- if (player_node)
- player_node->pickUp(mFloorItem);
+ if (player_node && actorSpriteManager)
+ {
+ FloorItem *item = actorSpriteManager->findItem(mFloorItemId);
+ if (item)
+ player_node->pickUp(item);
+ }
}
// Look To action
else if (link == "look")
@@ -1106,16 +1110,21 @@ void PopupMenu::handleLink(const std::string &link,
chatWindow->addItemText(mItem->getInfo().getName());
}
}
- else if (mFloorItem)
+ else if (mFloorItemId && actorSpriteManager)
{
- if (serverVersion > 0)
- {
- chatWindow->addItemText(mFloorItem->getInfo().getName(
- mFloorItem->getColor()));
- }
- else
+ FloorItem *item = actorSpriteManager->findItem(mFloorItemId);
+
+ if (item)
{
- chatWindow->addItemText(mFloorItem->getInfo().getName());
+ if (serverVersion > 0)
+ {
+ chatWindow->addItemText(item->getInfo().getName(
+ item->getColor()));
+ }
+ else
+ {
+ chatWindow->addItemText(item->getInfo().getName());
+ }
}
}
}
@@ -1331,11 +1340,6 @@ void PopupMenu::handleLink(const std::string &link,
mDialog->setActionEventId("ok");
mDialog->addActionListener(&mRenameListener);
}
- else if (link == "load old outfits")
- {
- if (outfitWindow)
- outfitWindow->load(true);
- }
else if (link == "load old spells")
{
if (spellManager)
@@ -1673,6 +1677,11 @@ void PopupMenu::handleLink(const std::string &link,
showChangePos(getX(), getY());
return;
}
+ else if (link == "clear outfit")
+ {
+ if (outfitWindow)
+ outfitWindow->clearCurrentOutfit();
+ }
else if (!link.compare(0, 10, "guild-pos-"))
{
if (player_node)
@@ -1706,10 +1715,11 @@ void PopupMenu::handleLink(const std::string &link,
int id = atoi(link.substr(10).c_str());
if (id)
{
- mFloorItem = actorSpriteManager->findItem(id);
- if (mFloorItem)
+ FloorItem *item = actorSpriteManager->findItem(id);
+ if (item)
{
- showPopup(getX(), getY(), mFloorItem);
+ mFloorItemId = item->getId();
+ showPopup(getX(), getY(), item);
return;
}
}
@@ -1744,7 +1754,7 @@ void PopupMenu::handleLink(const std::string &link,
setVisible(false);
mBeingId = 0;
- mFloorItem = nullptr;
+ mFloorItemId = 0;
mItem = nullptr;
mItemId = 0;
mItemColor = 1;
diff --git a/src/gui/popupmenu.h b/src/gui/popupmenu.h
index 2db565ab7..8b9107300 100644
--- a/src/gui/popupmenu.h
+++ b/src/gui/popupmenu.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -160,7 +160,7 @@ class PopupMenu : public Popup, public LinkHandler
BrowserBox* mBrowserBox;
int mBeingId;
- FloorItem* mFloorItem;
+ int mFloorItemId;
Item *mItem;
int mItemId;
unsigned char mItemColor;
diff --git a/src/gui/quitdialog.cpp b/src/gui/quitdialog.cpp
index 450cfd86e..dff5a570c 100644
--- a/src/gui/quitdialog.cpp
+++ b/src/gui/quitdialog.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/quitdialog.h b/src/gui/quitdialog.h
index 5456be26b..dd881d283 100644
--- a/src/gui/quitdialog.h
+++ b/src/gui/quitdialog.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/register.cpp b/src/gui/register.cpp
index 29030aa72..2122e0d6b 100644
--- a/src/gui/register.cpp
+++ b/src/gui/register.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/register.h b/src/gui/register.h
index b0137f141..ecda27d28 100644
--- a/src/gui/register.h
+++ b/src/gui/register.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/sdlfont.cpp b/src/gui/sdlfont.cpp
index 001a8671a..0e69db026 100644
--- a/src/gui/sdlfont.cpp
+++ b/src/gui/sdlfont.cpp
@@ -3,7 +3,7 @@
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
* Copyright (C) 2009 Aethyra Development Team
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/sdlfont.h b/src/gui/sdlfont.h
index e0aac7785..6fcad34d4 100644
--- a/src/gui/sdlfont.h
+++ b/src/gui/sdlfont.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
* Copyright (C) 2009 Aethyra Development Team
*
* This file is part of The ManaPlus Client.
diff --git a/src/gui/sdlinput.cpp b/src/gui/sdlinput.cpp
index 7c5ddb055..e8660f861 100644
--- a/src/gui/sdlinput.cpp
+++ b/src/gui/sdlinput.cpp
@@ -8,7 +8,7 @@
*
* Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
* Copyright (C) 2007-2010 The Mana World Development Team
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* Js_./
* Per Larsson a.k.a finalman _RqZ{a<^_aa
diff --git a/src/gui/selldialog.cpp b/src/gui/selldialog.cpp
index e1a77f6c9..0e1b16de7 100644
--- a/src/gui/selldialog.cpp
+++ b/src/gui/selldialog.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/selldialog.h b/src/gui/selldialog.h
index a775cf0e0..877b74cd8 100644
--- a/src/gui/selldialog.h
+++ b/src/gui/selldialog.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp
index 3fd298159..39ff19a89 100644
--- a/src/gui/serverdialog.cpp
+++ b/src/gui/serverdialog.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -365,7 +365,7 @@ ServerDialog::ServerDialog(ServerInfo *serverInfo, const std::string &dir):
mConnectButton->requestFocus();
}
- loadServers(false);
+ loadServers(true);
if (mServers.empty())
downloadServerList();
@@ -558,7 +558,7 @@ void ServerDialog::logic()
else if (mDownloadStatus == DOWNLOADING_IN_PROGRESS)
{
mDescription->setCaption(strprintf(_("Downloading server list..."
- "%2.2f%%"), mDownloadProgress * 100));
+ "%2.2f%%"), static_cast<double>(mDownloadProgress * 100)));
}
else if (mDownloadStatus == DOWNLOADING_IDLE)
{
@@ -609,9 +609,12 @@ void ServerDialog::downloadServerList()
if (listFile.empty())
listFile = config.getStringValue("onlineServerList");
- // Fall back to manasource.org when neither branding nor config set it
+ // Fall back to manaplus.evolonline.org when neither branding nor config set it
if (listFile.empty())
- listFile = "http://manasource.org/serverlist.xml";
+ {
+ listFile = "http://manaplus.evolonline.org/"
+ "serverlist.xml/serverlist.xml";
+ }
if (mDownload)
{
@@ -628,9 +631,9 @@ void ServerDialog::downloadServerList()
void ServerDialog::loadServers(bool addNew)
{
XML::Document doc(mDir + "/serverlist.xml", false);
- xmlNodePtr rootNode = doc.rootNode();
+ XmlNodePtr rootNode = doc.rootNode();
- if (!rootNode || !xmlStrEqual(rootNode->name, BAD_CAST "serverlist"))
+ if (!rootNode || !xmlNameEqual(rootNode, "serverlist"))
{
logger->log1("Error loading server list!");
return;
@@ -646,7 +649,7 @@ void ServerDialog::loadServers(bool addNew)
for_each_xml_child_node(serverNode, rootNode)
{
- if (!xmlStrEqual(serverNode->name, BAD_CAST "server"))
+ if (!xmlNameEqual(serverNode, "server"))
continue;
ServerInfo server;
@@ -681,7 +684,7 @@ void ServerDialog::loadServers(bool addNew)
for_each_xml_child_node(subNode, serverNode)
{
- if (xmlStrEqual(subNode->name, BAD_CAST "connection"))
+ if (xmlNameEqual(subNode, "connection"))
{
server.hostname = XML::getProperty(subNode, "hostname", "");
server.port = static_cast<short unsigned>(
@@ -693,7 +696,7 @@ void ServerDialog::loadServers(bool addNew)
server.port = defaultPortForServerType(server.type);
}
}
- else if (xmlStrEqual(subNode->name, BAD_CAST "description"))
+ else if (xmlNameEqual(subNode, "description"))
{
server.description = reinterpret_cast<const char*>(
subNode->xmlChildrenNode->content);
diff --git a/src/gui/serverdialog.h b/src/gui/serverdialog.h
index 39c6f94f7..d2fe0d25b 100644
--- a/src/gui/serverdialog.h
+++ b/src/gui/serverdialog.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp
index d305824d5..bac474950 100644
--- a/src/gui/setup.cpp
+++ b/src/gui/setup.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -201,7 +201,7 @@ void Setup::doCancel()
void Setup::activateTab(const std::string &name)
{
std::string tmp = gettext(name.c_str());
- mPanel->setSelectedTab(tmp);
+ mPanel->setSelectedTabByName(tmp);
/*
for (std::list<SetupTab*>::const_iterator it = mTabs.begin();
it != mTabs.end(); ++it)
@@ -212,7 +212,7 @@ void Setup::activateTab(const std::string &name)
logger->log("check tab: " + tab->getName());
if (tab->getName() == tmp)
{
- mPanel->setSelectedTab(name);
+ mPanel->setSelectedTabByName(name);
return;
}
}
diff --git a/src/gui/setup.h b/src/gui/setup.h
index b499da4ee..3a6f66297 100644
--- a/src/gui/setup.h
+++ b/src/gui/setup.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/setup_audio.cpp b/src/gui/setup_audio.cpp
index 1737e9004..bc058faf9 100644
--- a/src/gui/setup_audio.cpp
+++ b/src/gui/setup_audio.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/setup_audio.h b/src/gui/setup_audio.h
index 53aa017b6..88869d730 100644
--- a/src/gui/setup_audio.h
+++ b/src/gui/setup_audio.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/setup_chat.cpp b/src/gui/setup_chat.cpp
index 1b8209c8f..7e81acaa9 100644
--- a/src/gui/setup_chat.cpp
+++ b/src/gui/setup_chat.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 Andrei Karas
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/setup_chat.h b/src/gui/setup_chat.h
index 402235d99..238021cca 100644
--- a/src/gui/setup_chat.h
+++ b/src/gui/setup_chat.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 Andrei Karas
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/setup_colors.cpp b/src/gui/setup_colors.cpp
index 6f1a4afce..d5885143c 100644
--- a/src/gui/setup_colors.cpp
+++ b/src/gui/setup_colors.cpp
@@ -1,7 +1,7 @@
/*
* Configurable text colors
* Copyright (C) 2008 Douglas Boffey <dougaboffey@netscape.net>
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/setup_colors.h b/src/gui/setup_colors.h
index b6d5209e2..cbcca6dfa 100644
--- a/src/gui/setup_colors.h
+++ b/src/gui/setup_colors.h
@@ -1,7 +1,7 @@
/*
* Configurable text colors
* Copyright (C) 2008 Douglas Boffey <dougaboffey@netscape.net>
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/setup_joystick.cpp b/src/gui/setup_joystick.cpp
index 7899247e3..290607be4 100644
--- a/src/gui/setup_joystick.cpp
+++ b/src/gui/setup_joystick.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/setup_joystick.h b/src/gui/setup_joystick.h
index 5bd72cdad..d93d7e821 100644
--- a/src/gui/setup_joystick.h
+++ b/src/gui/setup_joystick.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/setup_keyboard.cpp b/src/gui/setup_keyboard.cpp
index fa7a63b8c..bdd7c2083 100644
--- a/src/gui/setup_keyboard.cpp
+++ b/src/gui/setup_keyboard.cpp
@@ -3,7 +3,7 @@
* Copyright (C) 2007 Joshua Langley <joshlangley@optusnet.com.au>
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/setup_other.cpp b/src/gui/setup_other.cpp
index bd445cfa0..d6f5e9972 100644
--- a/src/gui/setup_other.cpp
+++ b/src/gui/setup_other.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 Andrei Karas
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/setup_other.h b/src/gui/setup_other.h
index a13bf4ba3..4144a02ab 100644
--- a/src/gui/setup_other.h
+++ b/src/gui/setup_other.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 Andrei Karas
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/setup_perfomance.cpp b/src/gui/setup_perfomance.cpp
index dd634d1f3..95703fa4c 100644
--- a/src/gui/setup_perfomance.cpp
+++ b/src/gui/setup_perfomance.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 Andrei Karas
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/setup_perfomance.h b/src/gui/setup_perfomance.h
index f355c9691..097c1e28c 100644
--- a/src/gui/setup_perfomance.h
+++ b/src/gui/setup_perfomance.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 Andrei Karas
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/setup_players.cpp b/src/gui/setup_players.cpp
index a6bf5b81c..f0bf4c0ea 100644
--- a/src/gui/setup_players.cpp
+++ b/src/gui/setup_players.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 Andrei Karas
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/setup_players.h b/src/gui/setup_players.h
index c9ce7b3b3..ebfc78db6 100644
--- a/src/gui/setup_players.h
+++ b/src/gui/setup_players.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 Andrei Karas
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/setup_relations.cpp b/src/gui/setup_relations.cpp
index 8ac61f90c..9ddef9e1a 100644
--- a/src/gui/setup_relations.cpp
+++ b/src/gui/setup_relations.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2008-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/setup_relations.h b/src/gui/setup_relations.h
index 2c23d4dba..76ea26875 100644
--- a/src/gui/setup_relations.h
+++ b/src/gui/setup_relations.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2008-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp
index 794fd3324..259388fd0 100644
--- a/src/gui/setup_video.cpp
+++ b/src/gui/setup_video.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/setup_video.h b/src/gui/setup_video.h
index 509deb2fd..0c82ab272 100644
--- a/src/gui/setup_video.h
+++ b/src/gui/setup_video.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/shopwindow.cpp b/src/gui/shopwindow.cpp
index a50a485ec..b6b87edb7 100644
--- a/src/gui/shopwindow.cpp
+++ b/src/gui/shopwindow.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/shopwindow.h b/src/gui/shopwindow.h
index e1fd8a2a0..53ed7690c 100644
--- a/src/gui/shopwindow.h
+++ b/src/gui/shopwindow.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/shortcutwindow.cpp b/src/gui/shortcutwindow.cpp
index eff28def7..0e968efef 100644
--- a/src/gui/shortcutwindow.cpp
+++ b/src/gui/shortcutwindow.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2007-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -23,6 +23,7 @@
#include "gui/shortcutwindow.h"
#include "configuration.h"
+#include "logger.h"
#include "gui/setup.h"
@@ -58,12 +59,15 @@ ShortcutWindow::ShortcutWindow(const std::string &title,
{
setWindowName(title);
// no title presented, title bar is padding so window can be moved.
- gcn::Window::setTitleBarHeight(gcn::Window::getPadding());
+ gcn::Window::setTitleBarHeight(gcn::Window::getPadding() + 1);
setShowTitle(false);
setResizable(true);
setDefaultVisible(false);
setSaveVisible(true);
+ mDragOffsetX = 0;
+ mDragOffsetY = 0;
+
setupWindow->registerWindowForReset(this);
mTabs = nullptr;
@@ -104,12 +108,15 @@ ShortcutWindow::ShortcutWindow(const std::string &title, std::string skinFile,
{
setWindowName(title);
// no title presented, title bar is padding so window can be moved.
- gcn::Window::setTitleBarHeight(gcn::Window::getPadding());
+ gcn::Window::setTitleBarHeight(gcn::Window::getPadding() + 1);
setShowTitle(false);
setResizable(true);
setDefaultVisible(false);
setSaveVisible(true);
+ mDragOffsetX = 0;
+ mDragOffsetY = 0;
+
setupWindow->registerWindowForReset(this);
mTabs = new TabbedArea;
@@ -178,3 +185,34 @@ void ShortcutWindow::widgetHidden(const gcn::Event &event)
}
}
}
+
+void ShortcutWindow::mousePressed(gcn::MouseEvent &event)
+{
+ Window::mousePressed(event);
+
+ if (event.isConsumed())
+ return;
+
+ if (event.getButton() == gcn::MouseEvent::LEFT)
+ {
+ mDragOffsetX = event.getX();
+ mDragOffsetY = event.getY();
+ }
+}
+
+void ShortcutWindow::mouseDragged(gcn::MouseEvent &event)
+{
+ Window::mouseDragged(event);
+
+ if (event.isConsumed())
+ return;
+
+ if (canMove() && isMovable() && mMoved)
+ {
+ int newX = std::max(0, getX() + event.getX() - mDragOffsetX);
+ int newY = std::max(0, getY() + event.getY() - mDragOffsetY);
+ newX = std::min(mainGraphics->mWidth - getWidth(), newX);
+ newY = std::min(mainGraphics->mHeight - getHeight(), newY);
+ setPosition(newX, newY);
+ }
+}
diff --git a/src/gui/shortcutwindow.h b/src/gui/shortcutwindow.h
index 8627a5dce..bdff5ab0d 100644
--- a/src/gui/shortcutwindow.h
+++ b/src/gui/shortcutwindow.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2007-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -58,6 +58,10 @@ class ShortcutWindow : public Window
void widgetHidden(const gcn::Event &event);
+ void mousePressed(gcn::MouseEvent &event);
+
+ void mouseDragged(gcn::MouseEvent &event);
+
private:
ShortcutWindow();
ShortcutContainer *mItems;
diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp
index 072a9cb85..4ee674325 100644
--- a/src/gui/skilldialog.cpp
+++ b/src/gui/skilldialog.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -362,7 +362,7 @@ void SkillDialog::loadSkills(const std::string &file)
return;
XML::Document doc(file);
- xmlNodePtr root = doc.rootNode();
+ XmlNodePtr root = doc.rootNode();
int setCount = 0;
std::string setName;
@@ -370,7 +370,7 @@ void SkillDialog::loadSkills(const std::string &file)
SkillListBox *listbox;
SkillTab *tab;
- if (!root || !xmlStrEqual(root->name, BAD_CAST "skills"))
+ if (!root || !xmlNameEqual(root, "skills"))
{
logger->log("Error loading skills file: %s", file.c_str());
@@ -413,7 +413,7 @@ void SkillDialog::loadSkills(const std::string &file)
for_each_xml_child_node(set, root)
{
- if (xmlStrEqual(set->name, BAD_CAST "set"))
+ if (xmlNameEqual(set, "set"))
{
setCount++;
setName = XML::getProperty(set, "name",
@@ -425,7 +425,7 @@ void SkillDialog::loadSkills(const std::string &file)
for_each_xml_child_node(node, set)
{
- if (xmlStrEqual(node->name, BAD_CAST "skill"))
+ if (xmlNameEqual(node, "skill"))
{
int id = atoi(XML::getProperty(node, "id", "-1").c_str());
std::string name = XML::getProperty(node, "name",
diff --git a/src/gui/skilldialog.h b/src/gui/skilldialog.h
index 63f7d1790..dcb40927a 100644
--- a/src/gui/skilldialog.h
+++ b/src/gui/skilldialog.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp
index 2bc8aba9b..a1a6c1cee 100644
--- a/src/gui/socialwindow.cpp
+++ b/src/gui/socialwindow.cpp
@@ -1,7 +1,7 @@
/*
* The ManaPlus Client
* Copyright (C) 2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -29,6 +29,8 @@
#include "logger.h"
#include "map.h"
#include "party.h"
+#include "playerrelations.h"
+#include "gui/whoisonline.h"
#include "gui/confirmdialog.h"
#include "gui/okdialog.h"
@@ -60,6 +62,30 @@
#include "debug.h"
+class SortFriendsFunctor
+{
+ public:
+ bool operator() (Avatar* m1, Avatar* m2)
+ {
+ if (!m1 || !m2)
+ return false;
+
+ if (m1->getOnline() != m2->getOnline())
+ return m1->getOnline() > m2->getOnline();
+
+ if (m1->getName() != m2->getName())
+ {
+ std::string s1 = m1->getName();
+ std::string s2 = m2->getName();
+ toLower(s1);
+ toLower(s2);
+ return s1 < s2;
+ }
+ return false;
+ }
+} friendSorter;
+
+
class SocialTab : public Tab
{
protected:
@@ -457,7 +483,6 @@ public:
mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_AUTO);
mScroll->setVerticalScrollPolicy(gcn::ScrollArea::SHOW_ALWAYS);
-// mBeings->getMembers().push_back(new Avatar("test"));
updateList();
setCaption(name);
}
@@ -550,7 +575,6 @@ public:
if (actorSpriteManager)
{
-// std::list<Being*> beings = actorSpriteManager->getAll();
std::vector<std::string> names;
actorSpriteManager->getPlayerNames(names, false);
@@ -650,7 +674,7 @@ public:
return;
Map* map = socialWindow->getMap();
- if (!map)
+ if (!map || map->empty())
return;
if (socialWindow->getProcessedPortals())
@@ -848,11 +872,11 @@ public:
std::vector<Avatar*> *avatars = mBeings->getMembers();
- std::vector<Avatar*>::iterator i = avatars->begin();
-
if (!avatars)
return;
+ std::vector<Avatar*>::iterator i = avatars->begin();
+
while (i != avatars->end())
{
Avatar *ava = (*i);
@@ -1058,6 +1082,103 @@ private:
};
+
+class SocialFriendsTab : public SocialTab
+{
+public:
+ SocialFriendsTab(std::string name)
+ {
+ mBeings = new BeingsListModal();
+
+ mList = new AvatarListBox(mBeings);
+ mScroll = new ScrollArea(mList);
+
+ mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_AUTO);
+ mScroll->setVerticalScrollPolicy(gcn::ScrollArea::SHOW_ALWAYS);
+
+ updateList();
+ setCaption(name);
+ }
+
+ ~SocialFriendsTab()
+ {
+ delete mList;
+ mList = nullptr;
+ delete mScroll;
+ mScroll = nullptr;
+ delete mBeings;
+ mBeings = nullptr;
+ }
+
+ void updateList()
+ {
+ getPlayersAvatars();
+ }
+
+ void updateAvatar(std::string name A_UNUSED)
+ {
+ }
+
+ void resetDamage(std::string name A_UNUSED)
+ {
+ }
+
+ void getPlayersAvatars()
+ {
+ if (!actorSpriteManager)
+ return;
+
+ std::vector<Avatar*> *avatars = mBeings->getMembers();
+ if (!avatars)
+ return;
+
+ std::vector<Avatar*>::iterator ia = avatars->begin();
+ while (ia != avatars->end())
+ {
+ delete *ia;
+ ++ ia;
+ }
+ avatars->clear();
+
+ std::vector<std::string> *players
+ = player_relations.getPlayersByRelation(PlayerRelation::FRIEND);
+
+ std::set<std::string> players2 = whoIsOnline->getOnlinePlayers();
+
+ if (!players)
+ return;
+
+ std::vector<std::string>::iterator it = players->begin();
+ std::vector<std::string>::iterator it_end = players->end();
+ for (; it != it_end; ++ it)
+ {
+ Avatar *ava = nullptr;
+ ava = new Avatar(*it);
+ if (actorSpriteManager->findBeingByName(*it, Being::PLAYER)
+ || players2.find(*it) != players2.end())
+ {
+ ava->setOnline(true);
+ }
+ avatars->push_back(ava);
+ }
+ std::sort(avatars->begin(), avatars->end(), friendSorter);
+ delete players;
+ }
+
+protected:
+ void invite()
+ {
+ }
+
+ void leave()
+ {
+ }
+
+private:
+ BeingsListModal *mBeings;
+};
+
+
class CreatePopup : public Popup, public LinkHandler
{
public:
@@ -1152,9 +1273,14 @@ SocialWindow::SocialWindow() :
loadWindowState();
- mPlayers = new SocialPlayersTab("P");
+ // TRANSLATORS: here P is title for visible players tab in social window
+ mPlayers = new SocialPlayersTab(_("P"));
mTabs->addTab(mPlayers, mPlayers->mScroll);
+ // TRANSLATORS: here F is title for friends tab in social window
+ mFriends = new SocialFriendsTab(_("F"));
+ mTabs->addTab(mFriends, mFriends->mScroll);
+
mNavigation = new SocialNavigationTab();
mTabs->addTab(mNavigation, mNavigation->mScroll);
@@ -1205,6 +1331,8 @@ SocialWindow::~SocialWindow()
mNavigation = nullptr;
delete mAttackFilter;
mAttackFilter = nullptr;
+ delete mFriends;
+ mFriends = nullptr;
}
bool SocialWindow::addTab(Guild *guild)
@@ -1523,6 +1651,7 @@ void SocialWindow::logic()
if (mNeedUpdate && nowTime - mLastUpdateTime > 1)
{
mPlayers->updateList();
+ mFriends->updateList();
mNeedUpdate = false;
mLastUpdateTime = nowTime;
}
@@ -1610,7 +1739,7 @@ void SocialWindow::nextTab()
if (tab == mTabs->getNumberOfTabs())
tab = 0;
- mTabs->setSelectedTab(tab);
+ mTabs->setSelectedTabByPos(tab);
}
void SocialWindow::prevTab()
@@ -1624,7 +1753,7 @@ void SocialWindow::prevTab()
tab = mTabs->getNumberOfTabs();
tab--;
- mTabs->setSelectedTab(tab);
+ mTabs->setSelectedTabByPos(tab);
}
void SocialWindow::updateAttackFilter()
diff --git a/src/gui/socialwindow.h b/src/gui/socialwindow.h
index dec8a6c26..1429866ee 100644
--- a/src/gui/socialwindow.h
+++ b/src/gui/socialwindow.h
@@ -1,7 +1,7 @@
/*
* The ManaPlus Client
* Copyright (C) 2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -141,6 +141,7 @@ protected:
SocialTab *mAttackFilter;
SocialTab *mPlayers;
SocialTab *mNavigation;
+ SocialTab *mFriends;
CreatePopup *mCreatePopup;
diff --git a/src/gui/specialswindow.cpp b/src/gui/specialswindow.cpp
index 6abff3796..4dd53cee1 100644
--- a/src/gui/specialswindow.cpp
+++ b/src/gui/specialswindow.cpp
@@ -1,7 +1,7 @@
/*
* The ManaPlus Client
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/specialswindow.h b/src/gui/specialswindow.h
index 4350a656b..a7eeeb5d5 100644
--- a/src/gui/specialswindow.h
+++ b/src/gui/specialswindow.h
@@ -1,7 +1,7 @@
/*
* The ManaPlus Client
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/speechbubble.cpp b/src/gui/speechbubble.cpp
index 7356cc633..877715137 100644
--- a/src/gui/speechbubble.cpp
+++ b/src/gui/speechbubble.cpp
@@ -3,7 +3,7 @@
* Copyright (C) 2008 The Legend of Mazzeroth Development Team
* Copyright (C) 2008-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/speechbubble.h b/src/gui/speechbubble.h
index 170f619e8..5342bd49e 100644
--- a/src/gui/speechbubble.h
+++ b/src/gui/speechbubble.h
@@ -3,7 +3,7 @@
* Copyright (C) 2008 The Legend of Mazzeroth Development Team
* Copyright (C) 2008-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/statuswindow.cpp b/src/gui/statuswindow.cpp
index 5ac14d132..a5fd12d40 100644
--- a/src/gui/statuswindow.cpp
+++ b/src/gui/statuswindow.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -431,10 +431,20 @@ void StatusWindow::addAttribute(int id, const std::string &name,
disp = new DerDisplay(id, name);
mDAttrCont->add(disp);
}
-
mAttrs[id] = disp;
}
+void StatusWindow::clearAttributes()
+{
+ mAttrCont->clear();
+ mDAttrCont->clear();
+ Attrs::iterator it = mAttrs.begin();
+ Attrs::iterator it_end = mAttrs.end();
+ for (; it != it_end; ++ it)
+ delete (*it).second;
+ mAttrs.clear();
+}
+
void StatusWindow::updateHPBar(ProgressBar *bar, bool showMax)
{
if (!bar)
@@ -512,9 +522,14 @@ void StatusWindow::updateProgressBar(ProgressBar *bar, int value, int max,
/ static_cast<float>(max);
if (percent)
- bar->setText(strprintf("%2.5f", 100 * progress) + "%");
+ {
+ bar->setText(strprintf("%2.5f%%",
+ static_cast<double>(100 * progress)));
+ }
else
+ {
bar->setText(toString(value) + "/" + toString(max));
+ }
bar->setProgress(progress);
}
diff --git a/src/gui/statuswindow.h b/src/gui/statuswindow.h
index d3a619bcb..8e110a354 100644
--- a/src/gui/statuswindow.h
+++ b/src/gui/statuswindow.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -75,6 +75,8 @@ class StatusWindow : public Window,
void action(const gcn::ActionEvent &event);
+ void clearAttributes();
+
private:
static std::string translateLetter(const char* letters);
diff --git a/src/gui/textdialog.cpp b/src/gui/textdialog.cpp
index a32b13aa4..b30c9eb82 100644
--- a/src/gui/textdialog.cpp
+++ b/src/gui/textdialog.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/textdialog.h b/src/gui/textdialog.h
index aed26c1e9..03deae8f6 100644
--- a/src/gui/textdialog.h
+++ b/src/gui/textdialog.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -44,7 +44,7 @@ public:
* @see Window::Window
*/
TextDialog(const std::string &title, const std::string &msg,
- Window *parent = 0, bool isPassword = false);
+ Window *parent = nullptr, bool isPassword = false);
~TextDialog();
diff --git a/src/gui/textpopup.cpp b/src/gui/textpopup.cpp
index 15b2618da..8cdbfa430 100644
--- a/src/gui/textpopup.cpp
+++ b/src/gui/textpopup.cpp
@@ -3,7 +3,7 @@
* Copyright (C) 2008 The Legend of Mazzeroth Development Team
* Copyright (C) 2008-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/textpopup.h b/src/gui/textpopup.h
index 9ac041389..6f418152c 100644
--- a/src/gui/textpopup.h
+++ b/src/gui/textpopup.h
@@ -3,7 +3,7 @@
* Copyright (C) 2008 The Legend of Mazzeroth Development Team
* Copyright (C) 2008-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index b3b28bffa..85fd215ac 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -4,7 +4,7 @@
* Copyright (C) 2009 Aethyra Development Team
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -315,9 +315,9 @@ Skin *Theme::readSkin(const std::string &filename)
// filename = resman->mapPathToSkin(filename0);
XML::Document doc(resolveThemePath(filename));
- xmlNodePtr rootNode = doc.rootNode();
+ XmlNodePtr rootNode = doc.rootNode();
- if (!rootNode || !xmlStrEqual(rootNode->name, BAD_CAST "skinset"))
+ if (!rootNode || !xmlNameEqual(rootNode, "skinset"))
return nullptr;
const std::string skinSetImage = XML::getProperty(rootNode, "image", "");
@@ -339,7 +339,7 @@ Skin *Theme::readSkin(const std::string &filename)
// iterate <widget>'s
for_each_xml_child_node(widgetNode, rootNode)
{
- if (!xmlStrEqual(widgetNode->name, BAD_CAST "widget"))
+ if (!xmlNameEqual(widgetNode, "widget"))
continue;
const std::string widgetType =
@@ -348,7 +348,7 @@ Skin *Theme::readSkin(const std::string &filename)
{
for_each_xml_child_node(partNode, widgetNode)
{
- if (xmlStrEqual(partNode->name, BAD_CAST "part"))
+ if (xmlNameEqual(partNode, "part"))
{
const std::string partType =
XML::getProperty(partNode, "type", "unknown");
@@ -477,7 +477,7 @@ Skin *Theme::readSkin(const std::string &filename)
"'%s'", partType.c_str());
}
}
- else if (xmlStrEqual(partNode->name, BAD_CAST "option"))
+ else if (xmlNameEqual(partNode, "option"))
{
const std::string name = XML::getProperty(
partNode, "name", "");
@@ -818,9 +818,9 @@ void Theme::loadColors(std::string file)
file += "/colors.xml";
XML::Document doc(resolveThemePath(file));
- xmlNodePtr root = doc.rootNode();
+ XmlNodePtr root = doc.rootNode();
- if (!root || !xmlStrEqual(root->name, BAD_CAST "colors"))
+ if (!root || !xmlNameEqual(root, "colors"))
{
logger->log("Error loading colors file: %s", file.c_str());
return;
@@ -835,7 +835,7 @@ void Theme::loadColors(std::string file)
for_each_xml_child_node(node, root)
{
- if (xmlStrEqual(node->name, BAD_CAST "color"))
+ if (xmlNameEqual(node, "color"))
{
type = readColorType(XML::getProperty(node, "id", ""));
if (type < 0) // invalid or no type given
@@ -850,7 +850,7 @@ void Theme::loadColors(std::string file)
mColors[type].set(type, color, grad, 10);
}
- else if (xmlStrEqual(node->name, BAD_CAST "progressbar"))
+ else if (xmlNameEqual(node, "progressbar"))
{
type = readProgressType(XML::getProperty(node, "id", ""));
if (type < 0) // invalid or no type given
diff --git a/src/gui/theme.h b/src/gui/theme.h
index 92b2c8878..3be6882a3 100644
--- a/src/gui/theme.h
+++ b/src/gui/theme.h
@@ -4,7 +4,7 @@
* Copyright (C) 2009 Aethyra Development Team
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/tradewindow.cpp b/src/gui/tradewindow.cpp
index 506bf65c9..43393fc09 100644
--- a/src/gui/tradewindow.cpp
+++ b/src/gui/tradewindow.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/tradewindow.h b/src/gui/tradewindow.h
index 16b3d9d6f..b055c90ce 100644
--- a/src/gui/tradewindow.h
+++ b/src/gui/tradewindow.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/unregisterdialog.cpp b/src/gui/unregisterdialog.cpp
index c43f28400..ca21263f1 100644
--- a/src/gui/unregisterdialog.cpp
+++ b/src/gui/unregisterdialog.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/unregisterdialog.h b/src/gui/unregisterdialog.h
index e68741e22..a89b3231b 100644
--- a/src/gui/unregisterdialog.h
+++ b/src/gui/unregisterdialog.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/updaterwindow.cpp b/src/gui/updaterwindow.cpp
index ac51cc76f..28bd8467c 100644
--- a/src/gui/updaterwindow.cpp
+++ b/src/gui/updaterwindow.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -67,9 +67,9 @@ std::vector<updateFile> loadXMLFile(const std::string &fileName)
{
std::vector<updateFile> files;
XML::Document doc(fileName, false);
- xmlNodePtr rootNode = doc.rootNode();
+ XmlNodePtr rootNode = doc.rootNode();
- if (!rootNode || !xmlStrEqual(rootNode->name, BAD_CAST "updates"))
+ if (!rootNode || !xmlNameEqual(rootNode, "updates"))
{
logger->log("Error loading update file: %s", fileName.c_str());
return files;
@@ -78,7 +78,7 @@ std::vector<updateFile> loadXMLFile(const std::string &fileName)
for_each_xml_child_node(fileNode, rootNode)
{
// Ignore all tags except for the "update" tags
- if (!xmlStrEqual(fileNode->name, BAD_CAST "update"))
+ if (!xmlNameEqual(fileNode, "update"))
continue;
updateFile file;
@@ -91,7 +91,8 @@ std::vector<updateFile> loadXMLFile(const std::string &fileName)
else
file.required = false;
- files.push_back(file);
+ if (checkPath(file.name))
+ files.push_back(file);
}
return files;
@@ -118,7 +119,7 @@ std::vector<updateFile> loadTxtFile(const std::string &fileName)
thisFile.required = true;
thisFile.desc = "";
- if (!thisFile.name.empty())
+ if (!thisFile.name.empty() && checkPath(thisFile.name))
files.push_back(thisFile);
}
}
@@ -154,6 +155,12 @@ UpdaterWindow::UpdaterWindow(const std::string &updateHost,
mLoadUpdates(applyUpdates),
mUpdateType(updateType)
{
+ setWindowName("UpdaterWindow");
+ setResizable(true);
+ setDefaultSize(450, 400, ImageRect::CENTER);
+ setMinWidth(320);
+ setMinHeight(240);
+
mBrowserBox = new BrowserBox;
mScrollArea = new ScrollArea(mBrowserBox);
mLabel = new Label(_("Connecting..."));
@@ -174,14 +181,12 @@ UpdaterWindow::UpdaterWindow(const std::string &updateHost,
placer(3, 5, mCancelButton);
placer(4, 5, mPlayButton);
- reflowLayout(450, 400);
-
Layout &layout = getLayout();
layout.setRowHeight(0, Layout::AUTO_SET);
addKeyListener(this);
- center();
+ loadWindowState();
setVisible(true);
mCancelButton->requestFocus();
diff --git a/src/gui/updaterwindow.h b/src/gui/updaterwindow.h
index e9a45241f..f8ee4e29c 100644
--- a/src/gui/updaterwindow.h
+++ b/src/gui/updaterwindow.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/userpalette.cpp b/src/gui/userpalette.cpp
index 62fd03c70..a3299fb7b 100644
--- a/src/gui/userpalette.cpp
+++ b/src/gui/userpalette.cpp
@@ -3,7 +3,7 @@
* Copyright (C) 2008 Douglas Boffey <dougaboffey@netscape.net>
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/userpalette.h b/src/gui/userpalette.h
index 3bf9c782a..cb0593fa7 100644
--- a/src/gui/userpalette.h
+++ b/src/gui/userpalette.h
@@ -3,7 +3,7 @@
* Copyright (C) 2008 Douglas Boffey <dougaboffey@netscape.net>
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index b6c55f2c4..f4c6c315f 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -481,6 +481,7 @@ void Viewport::mousePressed(gcn::MouseEvent &event)
if (mHoverBeing->canTalk())
{
mHoverBeing->talkTo();
+ return;
}
else
{
@@ -490,6 +491,9 @@ void Viewport::mousePressed(gcn::MouseEvent &event)
{
if (player_node != mHoverBeing || mSelfMouseHeal)
actorSpriteManager->heal(mHoverBeing);
+ if (player_node == mHoverBeing && mHoverItem)
+ player_node->pickUp(mHoverItem);
+ return;
}
}
else if (player_node->withinAttackRange(mHoverBeing) ||
@@ -499,17 +503,21 @@ void Viewport::mousePressed(gcn::MouseEvent &event)
{
player_node->attack(mHoverBeing,
!keyboard.isKeyActive(keyboard.KEY_TARGET));
+ return;
}
}
else if (!keyboard.isKeyActive(keyboard.KEY_ATTACK))
{
if (player_node != mHoverBeing)
+ {
player_node->setGotoTarget(mHoverBeing);
+ return;
+ }
}
}
- // Picks up a item if we clicked on one
}
- else if (mHoverItem)
+ // Picks up a item if we clicked on one
+ if (mHoverItem)
{
player_node->pickUp(mHoverItem);
}
@@ -739,7 +747,7 @@ void Viewport::mouseMoved(gcn::MouseEvent &event A_UNUSED)
}
mHoverItem = nullptr;
- if (!mHoverBeing && actorSpriteManager)
+ if (actorSpriteManager)
{
mHoverItem = actorSpriteManager->findItem(x / mMap->getTileWidth(),
y / mMap->getTileHeight());
@@ -867,3 +875,44 @@ bool Viewport::isPopupMenuVisible()
{
return mPopupMenu ? mPopupMenu->isVisible() : false;
}
+
+void Viewport::moveCameraToActor(int actorId, int x, int y)
+{
+ if (!player_node)
+ return;
+
+ Actor *actor = actorSpriteManager->findBeing(actorId);
+ if (!actor)
+ return;
+ Vector actorPos = actor->getPosition();
+ Vector playerPos = player_node->getPosition();
+ mCameraMode = 1;
+ mCameraRelativeX = actorPos.x - playerPos.x + x;
+ mCameraRelativeY = actorPos.y - playerPos.y + y;
+}
+
+void Viewport::moveCameraToPosition(int x, int y)
+{
+ if (!player_node)
+ return;
+
+ Vector playerPos = player_node->getPosition();
+ mCameraMode = 1;
+
+ mCameraRelativeX = x - playerPos.x;
+ mCameraRelativeY = y - playerPos.y;
+}
+
+void Viewport::moveCameraRelative(int x, int y)
+{
+ mCameraMode = 1;
+ mCameraRelativeX += x;
+ mCameraRelativeY += y;
+}
+
+void Viewport::returnCamera()
+{
+ mCameraMode = 0;
+ mCameraRelativeX = 0;
+ mCameraRelativeY = 0;
+}
diff --git a/src/gui/viewport.h b/src/gui/viewport.h
index 938988198..4ed80ed32 100644
--- a/src/gui/viewport.h
+++ b/src/gui/viewport.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -248,8 +248,22 @@ class Viewport : public WindowContainer, public gcn::MouseListener,
int getCameraRelativeY()
{ return mCameraRelativeY; }
+ void setCameraRelativeX(int n)
+ { mCameraRelativeX = n; }
+
+ void setCameraRelativeY(int n)
+ { mCameraRelativeY = n; }
+
bool isPopupMenuVisible();
+ void moveCameraToActor(int actorId, int x = 0, int y = 0);
+
+ void moveCameraToPosition(int x, int y);
+
+ void moveCameraRelative(int x, int y);
+
+ void returnCamera();
+
protected:
friend class ActorSpriteManager;
diff --git a/src/gui/whoisonline.cpp b/src/gui/whoisonline.cpp
index 6004f706e..a80fb4c89 100644
--- a/src/gui/whoisonline.cpp
+++ b/src/gui/whoisonline.cpp
@@ -21,14 +21,16 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "whoisonline.h"
+#include "gui/whoisonline.h"
#include <SDL.h>
#include <SDL_thread.h>
#include <vector>
#include <algorithm>
+#include "gui/socialwindow.h"
#include "gui/viewport.h"
+
#include "gui/widgets/button.h"
#include "gui/widgets/browserbox.h"
#include "gui/widgets/scrollarea.h"
@@ -288,6 +290,13 @@ void WhoIsOnline::loadList(std::vector<std::string> &list)
}
updateWindow(friends, neutral, disregard, enemy, numOnline);
+ if (!mOnlinePlayers.empty())
+ {
+ if (chatWindow)
+ chatWindow->updateOnline(mOnlinePlayers);
+ if (socialWindow)
+ socialWindow->updateActiveList();
+ }
}
void WhoIsOnline::loadWebList()
@@ -587,8 +596,13 @@ void WhoIsOnline::logic()
mUpdateButton->setEnabled(true);
mUpdateTimer = 0;
updateSize();
- if (!mOnlinePlayers.empty() && chatWindow)
- chatWindow->updateOnline(mOnlinePlayers);
+ if (!mOnlinePlayers.empty())
+ {
+ if (chatWindow)
+ chatWindow->updateOnline(mOnlinePlayers);
+ if (socialWindow)
+ socialWindow->updateActiveList();
+ }
}
break;
case UPDATE_COMPLETE:
diff --git a/src/gui/whoisonline.h b/src/gui/whoisonline.h
index 112ad35ba..ade391d5a 100644
--- a/src/gui/whoisonline.h
+++ b/src/gui/whoisonline.h
@@ -26,6 +26,7 @@
#include <string>
#include <set>
+#include <vector>
#include "configlistener.h"
diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp
index 8264f0fb9..1bf897301 100644
--- a/src/gui/widgets/avatarlistbox.cpp
+++ b/src/gui/widgets/avatarlistbox.cpp
@@ -1,7 +1,7 @@
/*
* The ManaPlus Client
* Copyright (C) 2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/avatarlistbox.h b/src/gui/widgets/avatarlistbox.h
index afb4abdf5..526db6ef5 100644
--- a/src/gui/widgets/avatarlistbox.h
+++ b/src/gui/widgets/avatarlistbox.h
@@ -1,7 +1,7 @@
/*
* The ManaPlus Client
* Copyright (C) 2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/battletab.cpp b/src/gui/widgets/battletab.cpp
index c5500e801..5ac13c78e 100644
--- a/src/gui/widgets/battletab.cpp
+++ b/src/gui/widgets/battletab.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2008-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/battletab.h b/src/gui/widgets/battletab.h
index 03c63da2c..8d85e739e 100644
--- a/src/gui/widgets/battletab.h
+++ b/src/gui/widgets/battletab.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index 7d30c10bf..5856a91b1 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
* Copyright (C) 2009 Aethyra Development Team
*
* This file is part of The ManaPlus Client.
@@ -451,6 +451,7 @@ int BrowserBox::calcHeight()
}
gcn::Color prevColor = selColor;
+ bold = false;
// TODO: Check if we must take texture size limits into account here
// TODO: Check if some of the O(n) calls can be removed
@@ -466,8 +467,6 @@ int BrowserBox::calcHeight()
wrapped = false;
}
- bold = false;
-
// "Tokenize" the string at control sequences
if (mUseLinksAndUserColors)
end = row.find("##", start + 1);
diff --git a/src/gui/widgets/browserbox.h b/src/gui/widgets/browserbox.h
index e26ae32e0..ab3049c0b 100644
--- a/src/gui/widgets/browserbox.h
+++ b/src/gui/widgets/browserbox.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
* Copyright (C) 2009 Aethyra Development Team
*
* This file is part of The ManaPlus Client.
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index 85e4eca17..2867e3d39 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h
index 1b62179b3..aed46bb55 100644
--- a/src/gui/widgets/button.h
+++ b/src/gui/widgets/button.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/channeltab.cpp b/src/gui/widgets/channeltab.cpp
index 87d87f7d1..f362cc28c 100644
--- a/src/gui/widgets/channeltab.cpp
+++ b/src/gui/widgets/channeltab.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2008-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/channeltab.h b/src/gui/widgets/channeltab.h
index 5d3b78094..4b56d2e05 100644
--- a/src/gui/widgets/channeltab.h
+++ b/src/gui/widgets/channeltab.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp
index c2db20574..aea367482 100644
--- a/src/gui/widgets/chattab.cpp
+++ b/src/gui/widgets/chattab.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2008-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/chattab.h b/src/gui/widgets/chattab.h
index 962c0b363..ddf10bf5e 100644
--- a/src/gui/widgets/chattab.h
+++ b/src/gui/widgets/chattab.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/checkbox.cpp b/src/gui/widgets/checkbox.cpp
index dcedc8951..0689c5395 100644
--- a/src/gui/widgets/checkbox.cpp
+++ b/src/gui/widgets/checkbox.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/checkbox.h b/src/gui/widgets/checkbox.h
index af38065f5..0c8e48553 100644
--- a/src/gui/widgets/checkbox.h
+++ b/src/gui/widgets/checkbox.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/container.cpp b/src/gui/widgets/container.cpp
index 558257507..80028a62f 100644
--- a/src/gui/widgets/container.cpp
+++ b/src/gui/widgets/container.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/container.h b/src/gui/widgets/container.h
index c011b8925..d927f5379 100644
--- a/src/gui/widgets/container.h
+++ b/src/gui/widgets/container.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/desktop.cpp b/src/gui/widgets/desktop.cpp
index beb232fb2..b40558c78 100644
--- a/src/gui/widgets/desktop.cpp
+++ b/src/gui/widgets/desktop.cpp
@@ -48,10 +48,14 @@ Desktop::Desktop() :
std::string appName = branding.getValue("appName", std::string(""));
if (appName.empty())
+ {
mVersionLabel = new Label(FULL_VERSION);
+ }
else
- mVersionLabel = new Label(strprintf("%s (Mana %s)", appName.c_str(),
- FULL_VERSION));
+ {
+ mVersionLabel = new Label(strprintf("%s (%s)", FULL_VERSION,
+ appName.c_str()));
+ }
mVersionLabel->setBackgroundColor(
Theme::getThemeColor(Theme::BACKGROUND, 128));
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index 2a17320de..91c983f26 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2006-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h
index 3559b634a..a769678ca 100644
--- a/src/gui/widgets/dropdown.h
+++ b/src/gui/widgets/dropdown.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2006-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -48,7 +48,7 @@ class DropDown : public gcn::DropDown
* @param listBox the listBox to use.
* @see ListModel, ScrollArea, ListBox.
*/
- DropDown(gcn::ListModel *listModel = 0,
+ DropDown(gcn::ListModel *listModel = nullptr,
gcn::ActionListener* listener = nullptr,
std::string eventId = "");
diff --git a/src/gui/widgets/flowcontainer.cpp b/src/gui/widgets/flowcontainer.cpp
index 7d3ddc0b4..acda5ad88 100644
--- a/src/gui/widgets/flowcontainer.cpp
+++ b/src/gui/widgets/flowcontainer.cpp
@@ -1,7 +1,7 @@
/*
* The ManaPlus Client
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/flowcontainer.h b/src/gui/widgets/flowcontainer.h
index d1f276b3c..677dd3661 100644
--- a/src/gui/widgets/flowcontainer.h
+++ b/src/gui/widgets/flowcontainer.h
@@ -1,7 +1,7 @@
/*
* The ManaPlus Client
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/guildchattab.cpp b/src/gui/widgets/guildchattab.cpp
index 0353ac23f..a95fca3cf 100644
--- a/src/gui/widgets/guildchattab.cpp
+++ b/src/gui/widgets/guildchattab.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2008-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/guildchattab.h b/src/gui/widgets/guildchattab.h
index 4f5ee3a8e..bebdaa1f3 100644
--- a/src/gui/widgets/guildchattab.h
+++ b/src/gui/widgets/guildchattab.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp
index 78ce14e56..d620cbb8d 100644
--- a/src/gui/widgets/guitable.cpp
+++ b/src/gui/widgets/guitable.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2008-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/guitable.h b/src/gui/widgets/guitable.h
index 17f517644..d5810fcbf 100644
--- a/src/gui/widgets/guitable.h
+++ b/src/gui/widgets/guitable.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2008-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/horizontcontainer.cpp b/src/gui/widgets/horizontcontainer.cpp
index dbb02498a..c128ea550 100644
--- a/src/gui/widgets/horizontcontainer.cpp
+++ b/src/gui/widgets/horizontcontainer.cpp
@@ -1,7 +1,7 @@
/*
* The ManaPlus Client
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/horizontcontainer.h b/src/gui/widgets/horizontcontainer.h
index 2a3f77d2b..7439672dc 100644
--- a/src/gui/widgets/horizontcontainer.h
+++ b/src/gui/widgets/horizontcontainer.h
@@ -1,7 +1,7 @@
/*
* The ManaPlus Client
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/icon.cpp b/src/gui/widgets/icon.cpp
index b8cc2ac3a..b35eb1d95 100644
--- a/src/gui/widgets/icon.cpp
+++ b/src/gui/widgets/icon.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2008-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/icon.h b/src/gui/widgets/icon.h
index 4b0d12342..6f05da3f7 100644
--- a/src/gui/widgets/icon.h
+++ b/src/gui/widgets/icon.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2008-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/inttextfield.cpp b/src/gui/widgets/inttextfield.cpp
index 89544e108..8a075000b 100644
--- a/src/gui/widgets/inttextfield.cpp
+++ b/src/gui/widgets/inttextfield.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/inttextfield.h b/src/gui/widgets/inttextfield.h
index b36b088a6..7284c9d03 100644
--- a/src/gui/widgets/inttextfield.h
+++ b/src/gui/widgets/inttextfield.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/inventoryfilter.cpp b/src/gui/widgets/inventoryfilter.cpp
index 795f0d31e..216c2bea0 100644
--- a/src/gui/widgets/inventoryfilter.cpp
+++ b/src/gui/widgets/inventoryfilter.cpp
@@ -1,6 +1,6 @@
/*
* The ManaPlus Client
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/inventoryfilter.h b/src/gui/widgets/inventoryfilter.h
index c3762189e..c4f2b6242 100644
--- a/src/gui/widgets/inventoryfilter.h
+++ b/src/gui/widgets/inventoryfilter.h
@@ -1,7 +1,7 @@
/*
* The ManaPlus Client
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 57c64093b..669d05a66 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h
index 2c465fdee..ae6e4a35d 100644
--- a/src/gui/widgets/itemcontainer.h
+++ b/src/gui/widgets/itemcontainer.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/itemlinkhandler.cpp b/src/gui/widgets/itemlinkhandler.cpp
index 549aa1616..61d929f0b 100644
--- a/src/gui/widgets/itemlinkhandler.cpp
+++ b/src/gui/widgets/itemlinkhandler.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/itemlinkhandler.h b/src/gui/widgets/itemlinkhandler.h
index bc3bdc51c..9f66da991 100644
--- a/src/gui/widgets/itemlinkhandler.h
+++ b/src/gui/widgets/itemlinkhandler.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp
index 3682ec448..130d641fe 100644
--- a/src/gui/widgets/itemshortcutcontainer.cpp
+++ b/src/gui/widgets/itemshortcutcontainer.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2007-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/itemshortcutcontainer.h b/src/gui/widgets/itemshortcutcontainer.h
index 587723279..59e52b5ae 100644
--- a/src/gui/widgets/itemshortcutcontainer.h
+++ b/src/gui/widgets/itemshortcutcontainer.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2007-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/layout.cpp b/src/gui/widgets/layout.cpp
index f0359062e..453e62a50 100644
--- a/src/gui/widgets/layout.cpp
+++ b/src/gui/widgets/layout.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2007-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/layout.h b/src/gui/widgets/layout.h
index 754d13a0b..02fed43b5 100644
--- a/src/gui/widgets/layout.h
+++ b/src/gui/widgets/layout.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2007-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/layouthelper.cpp b/src/gui/widgets/layouthelper.cpp
index 54c41635f..2b79609b9 100644
--- a/src/gui/widgets/layouthelper.cpp
+++ b/src/gui/widgets/layouthelper.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/layouthelper.h b/src/gui/widgets/layouthelper.h
index a01051595..b0f4d435d 100644
--- a/src/gui/widgets/layouthelper.h
+++ b/src/gui/widgets/layouthelper.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/linkhandler.h b/src/gui/widgets/linkhandler.h
index f8f195f2d..366899ffc 100644
--- a/src/gui/widgets/linkhandler.h
+++ b/src/gui/widgets/linkhandler.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/listbox.cpp b/src/gui/widgets/listbox.cpp
index 53299ca46..28fe9daa1 100644
--- a/src/gui/widgets/listbox.cpp
+++ b/src/gui/widgets/listbox.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/listbox.h b/src/gui/widgets/listbox.h
index 8ac0bbc3b..e4b6dd54e 100644
--- a/src/gui/widgets/listbox.h
+++ b/src/gui/widgets/listbox.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/mouseevent.h b/src/gui/widgets/mouseevent.h
index 9484be0a5..e41ed46b8 100644
--- a/src/gui/widgets/mouseevent.h
+++ b/src/gui/widgets/mouseevent.h
@@ -1,7 +1,7 @@
/*
* The ManaPlus Client
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/passwordfield.cpp b/src/gui/widgets/passwordfield.cpp
index 34639b063..6f339ddd7 100644
--- a/src/gui/widgets/passwordfield.cpp
+++ b/src/gui/widgets/passwordfield.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/passwordfield.h b/src/gui/widgets/passwordfield.h
index 5ba08094d..eca95e6ad 100644
--- a/src/gui/widgets/passwordfield.h
+++ b/src/gui/widgets/passwordfield.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/playerbox.cpp b/src/gui/widgets/playerbox.cpp
index fb72176bd..5e2412d3b 100644
--- a/src/gui/widgets/playerbox.cpp
+++ b/src/gui/widgets/playerbox.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/playerbox.h b/src/gui/widgets/playerbox.h
index 2bf010618..d2393ca08 100644
--- a/src/gui/widgets/playerbox.h
+++ b/src/gui/widgets/playerbox.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -25,6 +25,8 @@
#include <guichan/widgets/scrollarea.hpp>
+#include "localconsts.h"
+
class Being;
class ImageRect;
@@ -40,7 +42,7 @@ class PlayerBox : public gcn::ScrollArea
* Constructor. Takes the initial player character that this box should
* display, which defaults to <code>NULL</code>.
*/
- PlayerBox(const Being *being = 0);
+ PlayerBox(const Being *being = nullptr);
/**
* Destructor.
diff --git a/src/gui/widgets/popup.cpp b/src/gui/widgets/popup.cpp
index 78557d481..e206a3246 100644
--- a/src/gui/widgets/popup.cpp
+++ b/src/gui/widgets/popup.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
* Copyright (C) 2009 Aethyra Development Team
*
* This file is part of The ManaPlus Client.
diff --git a/src/gui/widgets/popup.h b/src/gui/widgets/popup.h
index 64e4b52ac..8ff21149a 100644
--- a/src/gui/widgets/popup.h
+++ b/src/gui/widgets/popup.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
* Copyright (C) 2009 Aethyra Development Team
*
* This file is part of The ManaPlus Client.
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp
index f9b6da153..8b2beb8d5 100644
--- a/src/gui/widgets/progressbar.cpp
+++ b/src/gui/widgets/progressbar.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/progressbar.h b/src/gui/widgets/progressbar.h
index 36ed96bd2..163310245 100644
--- a/src/gui/widgets/progressbar.h
+++ b/src/gui/widgets/progressbar.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/progressindicator.cpp b/src/gui/widgets/progressindicator.cpp
index e885aa0ec..6adb5a2fa 100644
--- a/src/gui/widgets/progressindicator.cpp
+++ b/src/gui/widgets/progressindicator.cpp
@@ -1,7 +1,7 @@
/*
* The ManaPlus Client
* Copyright (C) 2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -51,7 +51,7 @@ ProgressIndicator::ProgressIndicator()
}
else
{
- mIndicator = 0;
+ mIndicator = nullptr;
}
setSize(32, 32);
@@ -60,7 +60,7 @@ ProgressIndicator::ProgressIndicator()
ProgressIndicator::~ProgressIndicator()
{
delete mIndicator;
- mIndicator = 0;
+ mIndicator = nullptr;
}
void ProgressIndicator::logic()
diff --git a/src/gui/widgets/progressindicator.h b/src/gui/widgets/progressindicator.h
index e5fcaefda..6d55fd3ce 100644
--- a/src/gui/widgets/progressindicator.h
+++ b/src/gui/widgets/progressindicator.h
@@ -1,7 +1,7 @@
/*
* The ManaPlus Client
* Copyright (C) 2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/radiobutton.cpp b/src/gui/widgets/radiobutton.cpp
index 7d344b09d..94152a716 100644
--- a/src/gui/widgets/radiobutton.cpp
+++ b/src/gui/widgets/radiobutton.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/radiobutton.h b/src/gui/widgets/radiobutton.h
index d1c347acb..7692d478a 100644
--- a/src/gui/widgets/radiobutton.h
+++ b/src/gui/widgets/radiobutton.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/resizegrip.cpp b/src/gui/widgets/resizegrip.cpp
index c8822eea9..4a6adadb6 100644
--- a/src/gui/widgets/resizegrip.cpp
+++ b/src/gui/widgets/resizegrip.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/resizegrip.h b/src/gui/widgets/resizegrip.h
index 873d74058..ce4eb0770 100644
--- a/src/gui/widgets/resizegrip.h
+++ b/src/gui/widgets/resizegrip.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp
index 0ec4a2027..021bd3d15 100644
--- a/src/gui/widgets/scrollarea.cpp
+++ b/src/gui/widgets/scrollarea.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/scrollarea.h b/src/gui/widgets/scrollarea.h
index 105791080..86902b5c9 100644
--- a/src/gui/widgets/scrollarea.h
+++ b/src/gui/widgets/scrollarea.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp
index 8081f5d7b..92ff625c2 100644
--- a/src/gui/widgets/setupitem.cpp
+++ b/src/gui/widgets/setupitem.cpp
@@ -1,6 +1,6 @@
/*
* The ManaPlus Client
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/setupitem.h b/src/gui/widgets/setupitem.h
index 5b8a9df87..eb2680ede 100644
--- a/src/gui/widgets/setupitem.h
+++ b/src/gui/widgets/setupitem.h
@@ -1,6 +1,6 @@
/*
* The ManaPlus Client
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/setuptab.cpp b/src/gui/widgets/setuptab.cpp
index e98e9c3ac..b3863c134 100644
--- a/src/gui/widgets/setuptab.cpp
+++ b/src/gui/widgets/setuptab.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/setuptab.h b/src/gui/widgets/setuptab.h
index ddc0c8958..e47af8995 100644
--- a/src/gui/widgets/setuptab.h
+++ b/src/gui/widgets/setuptab.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/setuptabscroll.cpp b/src/gui/widgets/setuptabscroll.cpp
index 4fb092070..ab8f61a40 100644
--- a/src/gui/widgets/setuptabscroll.cpp
+++ b/src/gui/widgets/setuptabscroll.cpp
@@ -1,6 +1,6 @@
/*
* The ManaPlus Client
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/setuptabscroll.h b/src/gui/widgets/setuptabscroll.h
index 2b0c6f65e..4ad1f464b 100644
--- a/src/gui/widgets/setuptabscroll.h
+++ b/src/gui/widgets/setuptabscroll.h
@@ -1,6 +1,6 @@
/*
* The ManaPlus Client
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/shopitems.cpp b/src/gui/widgets/shopitems.cpp
index d3aac5c56..5f13e5f71 100644
--- a/src/gui/widgets/shopitems.cpp
+++ b/src/gui/widgets/shopitems.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/shopitems.h b/src/gui/widgets/shopitems.h
index 29d24cb64..c013f1810 100644
--- a/src/gui/widgets/shopitems.h
+++ b/src/gui/widgets/shopitems.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/shoplistbox.cpp b/src/gui/widgets/shoplistbox.cpp
index b649a81ef..71e373d70 100644
--- a/src/gui/widgets/shoplistbox.cpp
+++ b/src/gui/widgets/shoplistbox.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/shoplistbox.h b/src/gui/widgets/shoplistbox.h
index c5acbbefc..9b416d3a3 100644
--- a/src/gui/widgets/shoplistbox.h
+++ b/src/gui/widgets/shoplistbox.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/shortcutcontainer.cpp b/src/gui/widgets/shortcutcontainer.cpp
index 36f88da08..6c8397bbb 100644
--- a/src/gui/widgets/shortcutcontainer.cpp
+++ b/src/gui/widgets/shortcutcontainer.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2007-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/shortcutcontainer.h b/src/gui/widgets/shortcutcontainer.h
index 8587950c6..72f8b9cac 100644
--- a/src/gui/widgets/shortcutcontainer.h
+++ b/src/gui/widgets/shortcutcontainer.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2007-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/slider.cpp b/src/gui/widgets/slider.cpp
index 3822d40c9..ed667e194 100644
--- a/src/gui/widgets/slider.cpp
+++ b/src/gui/widgets/slider.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/slider.h b/src/gui/widgets/slider.h
index 9ac45d0a0..8eed984b1 100644
--- a/src/gui/widgets/slider.h
+++ b/src/gui/widgets/slider.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp
index 8e4b1fe6f..c09fb423d 100644
--- a/src/gui/widgets/tab.cpp
+++ b/src/gui/widgets/tab.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2008-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/tab.h b/src/gui/widgets/tab.h
index ba51e6c74..40b46ede5 100644
--- a/src/gui/widgets/tab.h
+++ b/src/gui/widgets/tab.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2008-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index fb9279343..fc6526a13 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2008-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -197,7 +197,7 @@ void TabbedArea::removeTab(gcn::Tab *tab)
}
else
{
- setSelectedTab(tabIndexToBeSelected);
+ setSelectedTabByPos(tabIndexToBeSelected);
}
adjustSize();
@@ -241,7 +241,7 @@ void TabbedArea::setSelectedTab(gcn::Tab *tab)
widgetResized(nullptr);
}
-void TabbedArea::setSelectedTab(const std::string &name)
+void TabbedArea::setSelectedTabByName(const std::string &name)
{
for (TabContainer::const_iterator itr = mTabs.begin(),
itr_end = mTabs.end(); itr != itr_end; ++itr)
@@ -254,6 +254,11 @@ void TabbedArea::setSelectedTab(const std::string &name)
}
}
+void TabbedArea::setSelectedTabByPos(int tab)
+{
+ gcn::TabbedArea::setSelectedTab(tab);
+}
+
void TabbedArea::widgetResized(const gcn::Event &event A_UNUSED)
{
int width = getWidth() - 2 * getFrameSize()
@@ -459,8 +464,7 @@ void TabbedArea::removeAll()
{
if (getSelectedTabIndex() != -1)
{
- setSelectedTab(static_cast<unsigned int>(0));
-
+ setSelectedTabByPos(static_cast<unsigned int>(0));
}
while (getNumberOfTabs() > 0)
{
diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h
index d71109dd3..b202dfc9d 100644
--- a/src/gui/widgets/tabbedarea.h
+++ b/src/gui/widgets/tabbedarea.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2008-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -78,8 +78,6 @@ class TabbedArea : public gcn::TabbedArea, public gcn::WidgetListener
*/
gcn::Widget *getCurrentWidget();
- using gcn::TabbedArea::addTab;
-
/**
* Add a tab. Overridden since it needs to size the widget.
*
@@ -112,11 +110,11 @@ class TabbedArea : public gcn::TabbedArea, public gcn::WidgetListener
int getContainerHeight() const
{ return mWidgetContainer->getHeight(); }
- using gcn::TabbedArea::setSelectedTab;
-
void setSelectedTab(gcn::Tab *tab);
- void setSelectedTab(const std::string &name);
+ void setSelectedTabByPos(int tab);
+
+ void setSelectedTabByName(const std::string &name);
void widgetResized(const gcn::Event &event);
diff --git a/src/gui/widgets/tablemodel.cpp b/src/gui/widgets/tablemodel.cpp
index f54b4281a..5216fb89c 100644
--- a/src/gui/widgets/tablemodel.cpp
+++ b/src/gui/widgets/tablemodel.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2008-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/tablemodel.h b/src/gui/widgets/tablemodel.h
index 810b2f4ac..40a350163 100644
--- a/src/gui/widgets/tablemodel.h
+++ b/src/gui/widgets/tablemodel.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2008-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/textbox.cpp b/src/gui/widgets/textbox.cpp
index f31c8d129..a4bc3bc09 100644
--- a/src/gui/widgets/textbox.cpp
+++ b/src/gui/widgets/textbox.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/textbox.h b/src/gui/widgets/textbox.h
index 27525fc85..6d2467b38 100644
--- a/src/gui/widgets/textbox.h
+++ b/src/gui/widgets/textbox.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp
index b4584947a..03fdb5378 100644
--- a/src/gui/widgets/textfield.cpp
+++ b/src/gui/widgets/textfield.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/textfield.h b/src/gui/widgets/textfield.h
index e530cfef2..bc1123f19 100644
--- a/src/gui/widgets/textfield.h
+++ b/src/gui/widgets/textfield.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/textpreview.cpp b/src/gui/widgets/textpreview.cpp
index 9be2d5b3f..f3ea962bc 100644
--- a/src/gui/widgets/textpreview.cpp
+++ b/src/gui/widgets/textpreview.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2006-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/textpreview.h b/src/gui/widgets/textpreview.h
index a3f623177..81e27fd06 100644
--- a/src/gui/widgets/textpreview.h
+++ b/src/gui/widgets/textpreview.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2006-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/tradetab.cpp b/src/gui/widgets/tradetab.cpp
index deec2aea6..5c893de1f 100644
--- a/src/gui/widgets/tradetab.cpp
+++ b/src/gui/widgets/tradetab.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2008-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/tradetab.h b/src/gui/widgets/tradetab.h
index f061778f3..06add3ee0 100644
--- a/src/gui/widgets/tradetab.h
+++ b/src/gui/widgets/tradetab.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/vertcontainer.cpp b/src/gui/widgets/vertcontainer.cpp
index 5e79b7c19..42ae97802 100644
--- a/src/gui/widgets/vertcontainer.cpp
+++ b/src/gui/widgets/vertcontainer.cpp
@@ -1,7 +1,7 @@
/*
* The ManaPlus Client
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -69,6 +69,8 @@ void VertContainer::clear()
Container::clear();
mCount = 0;
+ mNextY = 0;
+ mResizableWidgets.clear();
}
void VertContainer::widgetResized(const gcn::Event &event A_UNUSED)
diff --git a/src/gui/widgets/vertcontainer.h b/src/gui/widgets/vertcontainer.h
index 08546aa47..6e1305a06 100644
--- a/src/gui/widgets/vertcontainer.h
+++ b/src/gui/widgets/vertcontainer.h
@@ -1,7 +1,7 @@
/*
* The ManaPlus Client
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/whispertab.cpp b/src/gui/widgets/whispertab.cpp
index 33859d8be..625c8a392 100644
--- a/src/gui/widgets/whispertab.cpp
+++ b/src/gui/widgets/whispertab.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/whispertab.h b/src/gui/widgets/whispertab.h
index 8678c932c..72d407ac2 100644
--- a/src/gui/widgets/whispertab.h
+++ b/src/gui/widgets/whispertab.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index 273695a1a..3858b0d81 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h
index 6249626d3..65dbf196b 100644
--- a/src/gui/widgets/window.h
+++ b/src/gui/widgets/window.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/windowcontainer.cpp b/src/gui/widgets/windowcontainer.cpp
index 34a6b68c7..43aaea8a4 100644
--- a/src/gui/widgets/windowcontainer.cpp
+++ b/src/gui/widgets/windowcontainer.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/widgets/windowcontainer.h b/src/gui/widgets/windowcontainer.h
index b27ba927f..00ef04c19 100644
--- a/src/gui/widgets/windowcontainer.h
+++ b/src/gui/widgets/windowcontainer.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/windowmenu.cpp b/src/gui/windowmenu.cpp
index 3f41be466..138090075 100644
--- a/src/gui/windowmenu.cpp
+++ b/src/gui/windowmenu.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -299,7 +299,7 @@ void WindowMenu::mouseMoved(gcn::MouseEvent &event)
if (key != KeyboardConfig::KEY_NO_VALUE)
{
mTextPopup->show(x + getX(), y + getY(), btn->getDescription(),
- "Key: " + keyboard.getKeyValueString(key));
+ strprintf(_("Key: %s"), keyboard.getKeyValueString(key).c_str()));
}
else
{
diff --git a/src/gui/windowmenu.h b/src/gui/windowmenu.h
index 3f02ea851..8abc5e87a 100644
--- a/src/gui/windowmenu.h
+++ b/src/gui/windowmenu.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/worldselectdialog.cpp b/src/gui/worldselectdialog.cpp
index ae5345031..917605281 100644
--- a/src/gui/worldselectdialog.cpp
+++ b/src/gui/worldselectdialog.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/gui/worldselectdialog.h b/src/gui/worldselectdialog.h
index 61bcc4b51..1a469757f 100644
--- a/src/gui/worldselectdialog.h
+++ b/src/gui/worldselectdialog.h
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*