summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2008-11-12 16:33:17 +0000
committerDavid Athay <ko2fan@gmail.com>2008-11-12 16:33:17 +0000
commit87607bbc8bf97d8204be4b3eae6eeb5a51bb0ea4 (patch)
tree499689cb9691b7bb04f9f88be9bbd355e55f47ea
parentd2bf248c7623324dc6a133b1e5eb0e71235d883a (diff)
downloadmana-client-87607bbc8bf97d8204be4b3eae6eeb5a51bb0ea4.tar.gz
mana-client-87607bbc8bf97d8204be4b3eae6eeb5a51bb0ea4.tar.bz2
mana-client-87607bbc8bf97d8204be4b3eae6eeb5a51bb0ea4.tar.xz
mana-client-87607bbc8bf97d8204be4b3eae6eeb5a51bb0ea4.zip
Fixed chat transparency and icon loading.
-rw-r--r--ChangeLog5
-rw-r--r--src/gui/chat.cpp1
-rw-r--r--src/main.cpp33
3 files changed, 23 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index f5e90e1b..1845501f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-12 David Athay <ko2fan@gmail.com>
+
+ * src/main.cpp: Fixed Icon loading.
+ * src/gui/chat.cpp: Fixed chat window transparency.
+
2008-11-11 Philipp Sehmisch <tmw@crushnet.org>
* src/main.cpp, src/main.h, src/gui/serverdialog.cpp, data/branding.xml:
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp
index bda31427..82e7d372 100644
--- a/src/gui/chat.cpp
+++ b/src/gui/chat.cpp
@@ -56,6 +56,7 @@ ChatWindow::ChatWindow():
{
setResizable(true);
setDefaultSize(0, (windowContainer->getHeight() - 105), 400, 100);
+ setOpaque(false);
mChatInput = new ChatInput();
mChatInput->setActionEventId("chatinput");
diff --git a/src/main.cpp b/src/main.cpp
index 67eeccd6..ede00d57 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -267,22 +267,6 @@ void initEngine(const Options &options)
SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
SDL_WM_SetCaption(branding.getValue("appName", "The Mana World").c_str(), NULL);
-#ifdef WIN32
- static SDL_SysWMinfo pInfo;
- SDL_GetWMInfo(&pInfo);
- HICON icon = LoadIcon(GetModuleHandle(NULL), "A");
- if (icon)
- {
- SetClassLong(pInfo.window, GCL_HICON, (LONG) icon);
- }
-#else
- SDL_Surface *icon = IMG_Load(TMW_DATADIR branding.getValue("appIcon", "data/icons/tmw.png"));
- if (icon)
- {
- SDL_SetAlpha(icon, SDL_SRCALPHA, SDL_ALPHA_OPAQUE);
- SDL_WM_SetIcon(icon, NULL);
- }
-#endif
ResourceManager *resman = ResourceManager::getInstance();
@@ -354,6 +338,23 @@ void initEngine(const Options &options)
resman->addToSearchPath(TMW_DATADIR "data", true);
#endif
+#ifdef WIN32
+ static SDL_SysWMinfo pInfo;
+ SDL_GetWMInfo(&pInfo);
+ HICON icon = LoadIcon(GetModuleHandle(NULL), "A");
+ if (icon)
+ {
+ SetClassLong(pInfo.window, GCL_HICON, (LONG) icon);
+ }
+#else
+ SDL_Surface *icon = IMG_Load(resman->getPath(branding.getValue("appIcon", "data/icons/tmw.png")).c_str());
+ if (icon)
+ {
+ SDL_SetAlpha(icon, SDL_SRCALPHA, SDL_ALPHA_OPAQUE);
+ SDL_WM_SetIcon(icon, NULL);
+ }
+#endif
+
#ifdef USE_OPENGL
bool useOpenGL = (config.getValue("opengl", 0) == 1);