summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabs
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-09-23 22:01:44 +0300
committerAndrei Karas <akaras@inbox.ru>2016-09-23 22:01:44 +0300
commit3c404128c4669a1f4f190e20a89553677717fc50 (patch)
tree2db4e5031089c800c4e00fd6244e578f44a7c910 /src/gui/widgets/tabs
parent89b267d6d73bbc59f7c313b8a22b97fbb27f99a8 (diff)
downloadmanaverse-3c404128c4669a1f4f190e20a89553677717fc50.tar.gz
manaverse-3c404128c4669a1f4f190e20a89553677717fc50.tar.bz2
manaverse-3c404128c4669a1f4f190e20a89553677717fc50.tar.xz
manaverse-3c404128c4669a1f4f190e20a89553677717fc50.zip
Add missing comments into defines.
Diffstat (limited to 'src/gui/widgets/tabs')
-rw-r--r--src/gui/widgets/tabs/chat/chattab.cpp2
-rw-r--r--src/gui/widgets/tabs/debugwindowtabs.cpp31
-rw-r--r--src/gui/widgets/tabs/debugwindowtabs.h5
-rw-r--r--src/gui/widgets/tabs/setup_audio.cpp2
-rw-r--r--src/gui/widgets/tabs/setup_other.cpp4
-rw-r--r--src/gui/widgets/tabs/setup_perfomance.cpp4
-rw-r--r--src/gui/widgets/tabs/setup_video.cpp31
-rw-r--r--src/gui/widgets/tabs/setup_video.h3
-rw-r--r--src/gui/widgets/tabs/setup_visual.cpp6
9 files changed, 49 insertions, 39 deletions
diff --git a/src/gui/widgets/tabs/chat/chattab.cpp b/src/gui/widgets/tabs/chat/chattab.cpp
index fad52cfb4..fccd428f4 100644
--- a/src/gui/widgets/tabs/chat/chattab.cpp
+++ b/src/gui/widgets/tabs/chat/chattab.cpp
@@ -52,7 +52,7 @@
#ifdef WIN32
#include <sys/time.h>
-#endif
+#endif // WIN32
#include <sstream>
diff --git a/src/gui/widgets/tabs/debugwindowtabs.cpp b/src/gui/widgets/tabs/debugwindowtabs.cpp
index 2757d591c..4ee856ef4 100644
--- a/src/gui/widgets/tabs/debugwindowtabs.cpp
+++ b/src/gui/widgets/tabs/debugwindowtabs.cpp
@@ -36,7 +36,7 @@
#ifdef USE_OPENGL
#include "resources/imagehelper.h"
-#endif
+#endif // USE_OPENGL
#include "resources/map/map.h"
@@ -75,12 +75,12 @@ MapDebugTab::MapDebugTab(const Widget2 *const widget) :
mDrawCallsLabel(new Label(this, strprintf("%s %s",
// TRANSLATORS: debug window label
_("Draw calls:"), "?"))),
-#endif
+#endif // DEBUG_DRAW_CALLS
#ifdef DEBUG_BIND_TEXTURE
mBindsLabel(new Label(this, strprintf("%s %s",
// TRANSLATORS: debug window label
_("Texture binds:"), "?"))),
-#endif
+#endif // DEBUG_BIND_TEXTURE
// TRANSLATORS: debug window label, frames per second
mFPSLabel(new Label(this, strprintf(_("%d FPS"), 0))),
// TRANSLATORS: debug window label, logic per second
@@ -125,10 +125,11 @@ MapDebugTab::MapDebugTab(const Widget2 *const widget) :
mFPSText = _("%d FPS (SDL2 default)");
break;
};
-#else
+#else // USE_OPENGL
+
// TRANSLATORS: debug window label
mFPSText = _("%d FPS (Software)");
-#endif
+#endif // USE_OPENGL
place(0, 0, mFPSLabel, 2);
place(0, 1, mLPSLabel, 2);
@@ -144,22 +145,24 @@ MapDebugTab::MapDebugTab(const Widget2 *const widget) :
#if defined (DEBUG_OPENGL_LEAKS) || defined(DEBUG_DRAW_CALLS) \
|| defined(DEBUG_BIND_TEXTURE)
int n = 10;
-#endif
+#endif // defined (DEBUG_OPENGL_LEAKS) || defined(DEBUG_DRAW_CALLS)
+ // || defined(DEBUG_BIND_TEXTURE)
#ifdef DEBUG_OPENGL_LEAKS
mTexturesLabel = new Label(this, strprintf("%s %s",
// TRANSLATORS: debug window label
_("Textures count:"), "?"));
place(0, n, mTexturesLabel, 2);
n ++;
-#endif
+#endif // DEBUG_OPENGL_LEAKS
#ifdef DEBUG_DRAW_CALLS
place(0, n, mDrawCallsLabel, 2);
n ++;
-#endif
+#endif // DEBUG_DRAW_CALLS
#ifdef DEBUG_BIND_TEXTURE
place(0, n, mBindsLabel, 2);
-#endif
-#endif
+#endif // DEBUG_BIND_TEXTURE
+#endif // USE_OPENGL
+
place.getCell().matchColWidth(0, 0);
place = h.getPlacer(0, 1);
setDimension(Rect(0, 0, 600, 300));
@@ -221,7 +224,7 @@ void MapDebugTab::logic()
mTexturesLabel->setCaption(strprintf("%s %d",
// TRANSLATORS: debug window label
_("Textures count:"), textures_count));
-#endif
+#endif // DEBUG_OPENGL_LEAKS
#ifdef DEBUG_DRAW_CALLS
if (mainGraphics)
{
@@ -229,7 +232,7 @@ void MapDebugTab::logic()
// TRANSLATORS: debug window label
_("Draw calls:"), mainGraphics->getDrawCalls()));
}
-#endif
+#endif // DEBUG_DRAW_CALLS
#ifdef DEBUG_BIND_TEXTURE
if (mainGraphics)
{
@@ -237,8 +240,8 @@ void MapDebugTab::logic()
// TRANSLATORS: debug window label
_("Texture binds:"), mainGraphics->getBinds()));
}
-#endif
-#endif
+#endif // DEBUG_BIND_TEXTURE
+#endif // USE_OPENGL
}
}
else
diff --git a/src/gui/widgets/tabs/debugwindowtabs.h b/src/gui/widgets/tabs/debugwindowtabs.h
index 044a2884c..a526d71f3 100644
--- a/src/gui/widgets/tabs/debugwindowtabs.h
+++ b/src/gui/widgets/tabs/debugwindowtabs.h
@@ -71,10 +71,11 @@ class MapDebugTab final : public DebugTab
time_t mUpdateTime;
#ifdef DEBUG_DRAW_CALLS
Label *mDrawCallsLabel A_NONNULLPOINTER;
-#endif
+#endif // DEBUG_DRAW_CALLS
#ifdef DEBUG_BIND_TEXTURE
Label *mBindsLabel A_NONNULLPOINTER;
-#endif
+#endif // DEBUG_BIND_TEXTURE
+
Label *mFPSLabel A_NONNULLPOINTER;
Label *mLPSLabel A_NONNULLPOINTER;
std::string mFPSText;
diff --git a/src/gui/widgets/tabs/setup_audio.cpp b/src/gui/widgets/tabs/setup_audio.cpp
index af23ad2fe..f4b9534df 100644
--- a/src/gui/widgets/tabs/setup_audio.cpp
+++ b/src/gui/widgets/tabs/setup_audio.cpp
@@ -158,7 +158,7 @@ Setup_Audio::Setup_Audio(const Widget2 *const widget) :
// TRANSLATORS: settings option
new SetupItemCheckBox(_("Enable mumble voice chat"), "",
"enableMumble", this, "enableMumbleEvent");
-#endif
+#endif // USE_MUMBLE
// TRANSLATORS: settings option
new SetupItemCheckBox(_("Download music"), "",
diff --git a/src/gui/widgets/tabs/setup_other.cpp b/src/gui/widgets/tabs/setup_other.cpp
index 186e76fc2..4008a42af 100644
--- a/src/gui/widgets/tabs/setup_other.cpp
+++ b/src/gui/widgets/tabs/setup_other.cpp
@@ -415,7 +415,7 @@ Setup_Other::Setup_Other(const Widget2 *const widget) :
// TRANSLATORS: settings option
new SetupItemCheckBox(_("Use FBO for screenshots (only for opengl)"),
"", "usefbo", this, "usefboEvent");
-#endif
+#endif // ANDROID
#ifndef WIN32
// TRANSLATORS: settings option
@@ -423,7 +423,7 @@ Setup_Other::Setup_Other(const Widget2 *const widget) :
"screenshotDirectory3", this, "screenshotDirectory3Event",
MainConfig_true,
UseBase64_true);
-#endif
+#endif // WIN32
// TRANSLATORS: settings option
new SetupItemIntTextField(_("Network delay between sub servers"),
diff --git a/src/gui/widgets/tabs/setup_perfomance.cpp b/src/gui/widgets/tabs/setup_perfomance.cpp
index 25f25a4c7..a55d264f0 100644
--- a/src/gui/widgets/tabs/setup_perfomance.cpp
+++ b/src/gui/widgets/tabs/setup_perfomance.cpp
@@ -78,7 +78,7 @@ Setup_Perfomance::Setup_Perfomance(const Widget2 *const widget) :
// TRANSLATORS: settings option
new SetupItemCheckBox(_("Enable map reduce (Software)"), "",
"enableMapReduce", this, "enableMapReduceEvent");
-#endif
+#endif // USE_SDL2
// TRANSLATORS: settings option
new SetupItemCheckBox(_("Enable compound sprite delay (Software)"), "",
@@ -127,7 +127,7 @@ Setup_Perfomance::Setup_Perfomance(const Widget2 *const widget) :
// TRANSLATORS: settings option
new SetupItemCheckBox(_("Disable beings caching (Software)"), "",
"disableBeingCaching", this, "disableBeingCachingEvent");
-#endif
+#endif // USE_SDL2
// TRANSLATORS: settings group
new SetupItemLabel(_("Different options (enable or disable can "
diff --git a/src/gui/widgets/tabs/setup_video.cpp b/src/gui/widgets/tabs/setup_video.cpp
index 3797884a3..85927cd0e 100644
--- a/src/gui/widgets/tabs/setup_video.cpp
+++ b/src/gui/widgets/tabs/setup_video.cpp
@@ -48,11 +48,11 @@
#if defined(ANDROID) || defined(__APPLE__) || !defined(USE_OPENGL)
#include "configuration.h"
-#endif
+#endif // defined(ANDROID) || defined(__APPLE__) || !defined(USE_OPENGL)
#if defined(ANDROID) || defined(__APPLE__)
#include "utils/stringutils.h"
-#endif
+#endif // defined(ANDROID) || defined(__APPLE__)
#include "gui/models/modelistmodel.h"
#include "gui/models/opengllistmodel.h"
@@ -86,7 +86,8 @@ Setup_Video::Setup_Video(const Widget2 *const widget) :
#if !defined(ANDROID) && !defined(__APPLE__) && !defined(__native_client__)
// TRANSLATORS: video settings button
mDetectButton(new Button(this, _("Detect best mode"), "detect", this)),
-#endif
+#endif // !defined(ANDROID) && !defined(__APPLE__) &&
+ // !defined(__native_client__)
mDialog(nullptr),
mCustomCursorEnabled(config.getBoolValue("customcursor")),
mEnableResize(config.getBoolValue("enableresize")),
@@ -95,11 +96,11 @@ Setup_Video::Setup_Video(const Widget2 *const widget) :
#ifdef ANDROID
// TRANSLATORS: video settings checkbox
_("Show cursor"),
-#else
+#else // ANDROID
// TRANSLATORS: video settings checkbox
_("Custom cursor"),
-#endif
- mCustomCursorEnabled)),
+#endif // ANDROID
+ mCustomCursorEnabled)),
// TRANSLATORS: video settings checkbox
mEnableResizeCheckBox(new CheckBox(this, _("Enable resize"),
mEnableResize)),
@@ -179,13 +180,15 @@ Setup_Video::Setup_Video(const Widget2 *const widget) :
#if !defined(ANDROID) && !defined(__APPLE__) && !defined(__native_client__)
place(0, 8, mDetectButton);
-#else
+#else // !defined(ANDROID) && !defined(__APPLE__) &&
+ // !defined(__native_client__)
mNoFrameCheckBox->setEnabled(false);
mEnableResizeCheckBox->setEnabled(false);
#ifndef __native_client__
mFsCheckBox->setEnabled(false);
#endif // __native_client__
-#endif
+#endif // !defined(ANDROID) && !defined(__APPLE__) &&
+ // !defined(__native_client__)
int width = 600;
@@ -220,7 +223,7 @@ void Setup_Video::apply()
// checks for opengl usage
if (intToRenderType(config.getIntValue("opengl")) == RENDER_SOFTWARE)
{
-#endif
+#endif // defined(WIN32) || defined(__APPLE__) || defined(ANDROID)
if (!WindowManager::setFullScreen(fullscreen))
{
fullscreen = !fullscreen;
@@ -261,7 +264,8 @@ void Setup_Video::apply()
nullptr,
260);
}
-#endif
+#endif // defined(WIN32) || defined(__APPLE__) || defined(ANDROID)
+
config.setValue("screen", fullscreen);
}
@@ -425,10 +429,11 @@ void Setup_Video::action(const ActionEvent &event)
260);
}
}
-#else
+#else // defined(WIN32) || defined(__APPLE__) || defined(ANDROID)
+
mainGraphics->setWindowSize(width, height);
WindowManager::doResizeVideo(width, height, false);
-#endif
+#endif // defined(WIN32) || defined(__APPLE__) || defined(ANDROID)
}
config.setValue("oldscreen", config.getBoolValue("screen"));
@@ -501,5 +506,5 @@ void Setup_Video::action(const ActionEvent &event)
delete test;
}
}
-#endif
+#endif // defined(USE_OPENGL) && !defined(ANDROID) && !defined(__APPLE__)
}
diff --git a/src/gui/widgets/tabs/setup_video.h b/src/gui/widgets/tabs/setup_video.h
index e1a94557e..5cc519315 100644
--- a/src/gui/widgets/tabs/setup_video.h
+++ b/src/gui/widgets/tabs/setup_video.h
@@ -70,7 +70,8 @@ class Setup_Video final : public SetupTab,
Label *mAltFpsLabel;
#if !defined(ANDROID) && !defined(__APPLE__) && !defined(__native_client__)
Button *mDetectButton;
-#endif
+#endif // !defined(ANDROID) && !defined(__APPLE__) &&
+ // !defined(__native_client__)
TextDialog *mDialog;
bool mCustomCursorEnabled;
bool mEnableResize;
diff --git a/src/gui/widgets/tabs/setup_visual.cpp b/src/gui/widgets/tabs/setup_visual.cpp
index 6cb00ad17..a8b783af2 100644
--- a/src/gui/widgets/tabs/setup_visual.cpp
+++ b/src/gui/widgets/tabs/setup_visual.cpp
@@ -133,7 +133,7 @@ Setup_Visual::Setup_Visual(const Widget2 *const widget) :
// TRANSLATORS: settings option
new SetupItemCheckBox(_("Grab mouse and keyboard input"),
"", "grabinput", this, "grabinputEvent");
-#endif
+#endif // ANDROID
// TRANSLATORS: settings option
new SetupItemCheckBox(_("Blurring textures (OpenGL)"),
@@ -211,7 +211,7 @@ Setup_Visual::Setup_Visual(const Widget2 *const widget) :
// TRANSLATORS: settings option
new SetupItemCheckBox(_("Center game window"),
"", "centerwindow", this, "centerwindowEvent");
-#endif
+#endif // defined(WIN32) || defined(__APPLE__)
// TRANSLATORS: settings option
new SetupItemCheckBox(_("Allow screensaver to run"),
@@ -244,5 +244,5 @@ void Setup_Visual::apply()
WindowManager::applyGrabMode();
#ifndef WIN32
WindowManager::applyScale();
-#endif
+#endif // WIN32
}