summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-02-04 18:15:23 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-02-04 18:15:23 +0000
commit41cee6568c7c005ed54d665b82cc5f251b23ab59 (patch)
tree523bee39d465782e5ffe8a2ad7cfbb66b6177e3e
parentf1f39503544d480fee09a87070eea05c1e9ce9f9 (diff)
downloadmana-41cee6568c7c005ed54d665b82cc5f251b23ab59.tar.gz
mana-41cee6568c7c005ed54d665b82cc5f251b23ab59.tar.bz2
mana-41cee6568c7c005ed54d665b82cc5f251b23ab59.tar.xz
mana-41cee6568c7c005ed54d665b82cc5f251b23ab59.zip
Fixed a small glitch when dragging the menu window.
-rw-r--r--ChangeLog13
-rw-r--r--src/gui/menuwindow.cpp25
-rw-r--r--src/gui/updatewindow.h57
3 files changed, 42 insertions, 53 deletions
diff --git a/ChangeLog b/ChangeLog
index d7b67db4..880a3b9d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
-2007-02-03 Philipp Sehmisch <tmw@crushnet.org>
+2007-02-04 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/menuwindow.cpp: Fixed a small glitch when dragging the menu
+ window.
+
+2007-02-03 Philipp Sehmisch <tmw@crushnet.org>
* data/graphics/sprites/player-female-base.png: Made the standing and
walking of the female characters more feminine.
@@ -9,8 +14,8 @@
data/graphics/sprites/leg-jeans-male.png,
data/graphics/sprites/leg-jeans-male.xml,
data/graphics/sprites/leg-jeans-female.png,
- data/graphics/sprites/leg-jeans-female.xml: Added different sprites for
- male and female pants.
+ data/graphics/sprites/leg-jeans-female.xml: Added different sprites
+ for male and female pants.
2007-02-02 Bjørn Lindeijer <bjorn@lindeijer.nl>
@@ -3973,4 +3978,4 @@
restore some doxygen comments, improved size adaption and made the
window a shorter.
* data/graphics/images/login_wallpaper.png: New login wallpaper by
- Momotaro. \ No newline at end of file
+ Momotaro.
diff --git a/src/gui/menuwindow.cpp b/src/gui/menuwindow.cpp
index a5b5c99e..943cc6f0 100644
--- a/src/gui/menuwindow.cpp
+++ b/src/gui/menuwindow.cpp
@@ -30,8 +30,11 @@
#include "button.h"
#include "windowcontainer.h"
-extern Window *setupWindow, *inventoryWindow, *equipmentWindow,
- *skillDialog, *statusWindow;
+extern Window *setupWindow;
+extern Window *inventoryWindow;
+extern Window *equipmentWindow;
+extern Window *skillDialog;
+extern Window *statusWindow;
namespace {
struct MenuWindowListener : public gcn::ActionListener
@@ -52,9 +55,14 @@ MenuWindow::MenuWindow():
setTitleBarHeight(0);
// Buttons
- // ------------
- const char *buttonNames[] = {
- "Status", "Equipment", "Inventory", "Skills", "Setup", 0
+ const char *buttonNames[] =
+ {
+ "Status",
+ "Equipment",
+ "Inventory",
+ "Skills",
+ "Setup",
+ 0
};
int x = 0, y = 3, h = 0;
@@ -67,7 +75,11 @@ MenuWindow::MenuWindow():
h = btn->getHeight();
}
- setDefaultSize((windowContainer->getWidth() - x - 2), 0, x, (y + h));
+ setContentSize(x - 3, h);
+ setDefaultSize(windowContainer->getWidth() - getWidth() - 1,
+ 0,
+ x - 3,
+ y + h);
}
void MenuWindow::draw(gcn::Graphics *graphics)
@@ -79,6 +91,7 @@ void MenuWindow::draw(gcn::Graphics *graphics)
void MenuWindowListener::action(const gcn::ActionEvent &event)
{
Window *window = NULL;
+
if (event.getId() == "Status")
{
window = statusWindow;
diff --git a/src/gui/updatewindow.h b/src/gui/updatewindow.h
index dcbb51b3..adc96078 100644
--- a/src/gui/updatewindow.h
+++ b/src/gui/updatewindow.h
@@ -120,75 +120,46 @@ class UpdaterWindow : public Window, public gcn::ActionListener
UPDATE_RESOURCES
};
- /**
- * A thread that use libcurl to download updates.
- */
+ /** A thread that use libcurl to download updates. */
SDL_Thread *mThread;
- /**
- * Status of the current download.
- */
+ /** Status of the current download. */
DownloadStatus mDownloadStatus;
- /**
- * Host where we get the updated files.
- */
+ /** Host where we get the updated files. */
std::string mUpdateHost;
- /**
- * The file currently downloading.
- */
+ /** The file currently downloading. */
std::string mCurrentFile;
- /**
- * The Adler32 checksum of the file currently downloading.
- */
+ /** The Adler32 checksum of the file currently downloading. */
unsigned long mCurrentChecksum;
- /**
- * Absolute path to locally save downloaded files.
- */
+ /** Absolute path to locally save downloaded files. */
std::string mBasePath;
- /**
- * A flag to know if we must write the downloaded file to a memory buffer
- * instead of a regular file.
- */
+ /** A flag to indicate whether to use a memory buffer or a regular file. */
bool mStoreInMemory;
- /**
- * Flag that show if current download is complete.
- */
+ /** Flag that show if current download is complete. */
bool mDownloadComplete;
- /**
- * Flag that show if the user has canceled the update
- */
+ /** Flag that show if the user has canceled the update. */
bool mUserCancel;
- /**
- * Byte count currently downloaded in mMemoryBuffer.
- */
+ /** Byte count currently downloaded in mMemoryBuffer. */
int mDownloadedBytes;
- /**
- * Buffer where to put downloaded file which are not stored in file system.
- */
+ /** Buffer for files downloaded to memory. */
char *mMemoryBuffer;
- /**
- * Buffer to handler human readable error provided by curl.
- */
+ /** Buffer to handler human readable error provided by curl. */
char *mCurlError;
- /**
- * List of files to download
- */
+ /** List of files to download. */
std::vector<std::string> mLines;
- /**
- * Index of the file to be downloaded
- */
+ /** Index of the file to be downloaded. */
unsigned int mLineIndex;
gcn::Label *mLabel; /**< Progress bar caption. */