summaryrefslogtreecommitdiff
path: root/src/gui/outfitwindow.h
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-05-14 11:21:37 -0600
committerJared Adams <jaxad0127@gmail.com>2009-05-14 11:21:37 -0600
commitc316bd0a9ffdbeb85ea80dc3ca2e731062b45c85 (patch)
tree4dfe94803c7cf60ce8670622ac3bf9739092053d /src/gui/outfitwindow.h
parentb0475c40bb256107aa13919b8d020b172af9d788 (diff)
downloadmana-client-c316bd0a9ffdbeb85ea80dc3ca2e731062b45c85.tar.gz
mana-client-c316bd0a9ffdbeb85ea80dc3ca2e731062b45c85.tar.bz2
mana-client-c316bd0a9ffdbeb85ea80dc3ca2e731062b45c85.tar.xz
mana-client-c316bd0a9ffdbeb85ea80dc3ca2e731062b45c85.zip
Add missing windows
Diffstat (limited to 'src/gui/outfitwindow.h')
-rw-r--r--src/gui/outfitwindow.h92
1 files changed, 92 insertions, 0 deletions
diff --git a/src/gui/outfitwindow.h b/src/gui/outfitwindow.h
new file mode 100644
index 00000000..3e70815c
--- /dev/null
+++ b/src/gui/outfitwindow.h
@@ -0,0 +1,92 @@
+/*
+ * The Mana World
+ * Copyright (C) 2007 The Mana World Development Team
+ *
+ * This file is part of The Mana World.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef OUTFITWINDOW_H
+#define OUTFITWINDOW_H
+
+#include "gui/widgets/window.h"
+
+#include <guichan/actionlistener.hpp>
+
+class Button;
+class CheckBox;
+class Item;
+class Label;
+
+class OutfitWindow : public Window, gcn::ActionListener
+{
+ public:
+ /**
+ * Constructor.
+ */
+ OutfitWindow();
+
+ /**
+ * Destructor.
+ */
+ ~OutfitWindow();
+
+ void action(const gcn::ActionEvent &event);
+
+ void draw(gcn::Graphics *graphics);
+
+ void mousePressed(gcn::MouseEvent &event);
+
+ void mouseDragged(gcn::MouseEvent &event);
+
+ void mouseReleased(gcn::MouseEvent &event);
+
+ void load();
+
+ void setItemSelected(int itemId)
+ { mItemSelected = itemId; }
+
+ bool isItemSelected()
+ { return mItemSelected > -1; }
+
+ void wearOutfit(int outfit);
+
+ private:
+ Button *mPreviousButton;
+ Button *mNextButton;
+ Label *mCurrentLabel;
+ CheckBox *mUnequipCheck;
+
+ int getIndexFromGrid(int pointX, int pointY) const;
+
+ int mBoxWidth;
+ int mBoxHeight;
+ int mCursorPosX, mCursorPosY;
+ int mGridWidth, mGridHeight;
+ bool mItemClicked;
+ Item *mItemMoved;
+
+ void save();
+
+ int mItems[10][9];
+ int mItemSelected;
+
+ int mCurrentOutfit;
+};
+
+extern OutfitWindow *outfitWindow;
+
+#endif