summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-02 16:13:36 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-03 21:50:05 +0300
commitf651273ebf2a8b11aa01ed1434ecb613177ced6a (patch)
treec51d2bed1476270e27ad95c5a46e15af32eaccdd /src/gui/widgets
parent30846b7f68f1ad05a0719ae37f75fd2901a6545a (diff)
downloadplus-f651273ebf2a8b11aa01ed1434ecb613177ced6a.tar.gz
plus-f651273ebf2a8b11aa01ed1434ecb613177ced6a.tar.bz2
plus-f651273ebf2a8b11aa01ed1434ecb613177ced6a.tar.xz
plus-f651273ebf2a8b11aa01ed1434ecb613177ced6a.zip
Add gui mode for dyecmd. Now only basic code added.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/browserbox.cpp2
-rw-r--r--src/gui/widgets/textfield.cpp2
-rw-r--r--src/gui/widgets/window.cpp10
3 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index 068894418..67dbbe632 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -235,10 +235,12 @@ void BrowserBox::addRow(const std::string &row, const bool atTop)
bLink.y2 = bLink.y1 + font->getHeight();
if (bLink.caption.empty())
{
+#ifndef DYECMD
const int id = atoi(bLink.link.c_str());
if (id)
bLink.caption = ItemDB::get(id).getName();
else
+#endif
bLink.caption = bLink.link;
if (translator)
bLink.caption = translator->getStr(bLink.caption);
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp
index c7b9cd312..497f17d2f 100644
--- a/src/gui/widgets/textfield.cpp
+++ b/src/gui/widgets/textfield.cpp
@@ -748,8 +748,10 @@ void TextField::mousePressed(MouseEvent &event)
event.consume();
if (event.getButton() == MouseButton::RIGHT)
{
+#ifndef DYECMD
if (popupMenu)
popupMenu->showTextFieldPopup(this);
+#endif
}
else if (event.getButton() == MouseButton::LEFT)
{
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index 73355e3fc..cd8da96bf 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -67,7 +67,11 @@
#include "client.h"
#include "configuration.h"
+#ifndef DYECMD
#include "dragdrop.h"
+#else
+#include "resources/image.h"
+#endif
#include "graphicsvertexes.h"
#include "soundconsts.h"
#include "soundmanager.h"
@@ -236,8 +240,10 @@ Window::~Window()
if (gui)
gui->removeDragged(this);
+#ifndef DYECMD
if (setupWindow)
setupWindow->unregisterWindowForReset(this);
+#endif
client->windowRemoved(this);
@@ -848,6 +854,7 @@ void Window::mousePressed(MouseEvent &event)
else
mMoved = false;
}
+#ifndef DYECMD
else if (button == MouseButton::RIGHT)
{
if (popupMenu)
@@ -856,6 +863,7 @@ void Window::mousePressed(MouseEvent &event)
popupMenu->showWindowPopup(this);
}
}
+#endif
}
void Window::close()
@@ -891,8 +899,10 @@ void Window::updateResizeHandler(MouseEvent &event)
if (!gui)
return;
+#ifndef DYECMD
if (!dragDrop.isEmpty())
return;
+#endif
mResizeHandles = getResizeHandles(event);