~ubuntu-branches/ubuntu/trusty/manaplus/trusty-proposed

« back to all changes in this revision

Viewing changes to src/gui/viewport.cpp

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi
  • Date: 2013-09-17 10:35:51 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20130917103551-az7p3nz9jgxwqjfn
Tags: 1.3.9.15-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#include "gui/viewport.h"
24
24
 
25
25
#include "actorspritemanager.h"
26
 
#include "client.h"
27
26
#include "configuration.h"
28
27
#include "game.h"
29
 
#include "itemshortcut.h"
30
 
#include "inputmanager.h"
31
 
#include "keyboardconfig.h"
32
 
#include "localplayer.h"
33
 
#include "playerinfo.h"
 
28
#include "maplayer.h"
34
29
#include "sdlshared.h"
35
30
#include "textmanager.h"
36
31
 
 
32
#include "being/localplayer.h"
 
33
#include "being/playerinfo.h"
 
34
 
 
35
#include "input/inputmanager.h"
 
36
 
37
37
#include "gui/beingpopup.h"
38
 
#include "gui/chatwindow.h"
39
38
#include "gui/gui.h"
40
39
#include "gui/ministatuswindow.h"
41
40
#include "gui/popupmenu.h"
42
 
#include "gui/statuspopup.h"
43
41
#include "gui/textpopup.h"
44
42
 
45
 
#include "gui/widgets/button.h"
46
 
#include "gui/widgets/chattab.h"
47
 
#include "gui/widgets/progressbar.h"
48
 
#include "gui/widgets/textfield.h"
49
 
 
50
 
#include "net/net.h"
51
 
 
52
 
#include "resources/resourcemanager.h"
53
 
 
54
43
#include <guichan/font.hpp>
55
44
 
56
45
#include "debug.h"
284
273
    if (mPlayerFollowMouse && (button & SDL_BUTTON(1)))
285
274
    {
286
275
        // We create a mouse event and send it to mouseDragged.
287
 
        const uint8_t *const keys = SDL_GetKeyState(nullptr);
288
276
        gcn::MouseEvent mouseEvent(nullptr,
289
 
            (keys[SDLK_LSHIFT] || keys[SDLK_RSHIFT]),
 
277
            0,
290
278
            false,
291
279
            false,
292
280
            false,
558
546
    if (!mMap || !player_node)
559
547
        return;
560
548
 
561
 
    if (mPlayerFollowMouse && !event.isShiftPressed())
 
549
    if (mPlayerFollowMouse && !inputManager.isActionActive(
 
550
        Input::KEY_STOP_ATTACK) && !inputManager.isActionActive(
 
551
        Input::KEY_UNTARGET))
562
552
    {
563
553
#ifdef MANASERV_SUPPORT
564
554
        if (Net::getNetworkType() == ServerInfo::MANASERV)