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

« back to all changes in this revision

Viewing changes to src/actionmanager.cpp

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi
  • Date: 2013-10-07 10:26:14 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20131007102614-tg2zjdz8vmtl6n7i
Tags: 1.3.9.29-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
#include "utils/gettext.h"
69
69
 
70
70
#ifdef ANDROID
 
71
#ifndef USE_SDL2
71
72
#include <SDL_screenkeyboard.h>
72
73
#endif
 
74
#endif
73
75
 
74
76
#include "debug.h"
75
77
 
371
373
{
372
374
    if (actorSpriteManager)
373
375
    {
 
376
        if (inputManager.isActionActive(Input::KEY_MOD))
 
377
        {
 
378
            Being *target = player_node->getTarget();
 
379
            if (!target || target->getType() != ActorSprite::PLAYER)
 
380
            {
 
381
                target = actorSpriteManager->findNearestLivingBeing(
 
382
                    player_node, 10, ActorSprite::PLAYER);
 
383
                if (target)
 
384
                    player_node->setTarget(target);
 
385
            }
 
386
        }
 
387
 
374
388
        actorSpriteManager->healTarget();
375
389
        if (Game::instance())
376
390
            Game::instance()->setValidSpeed();
1096
1110
impHandler0(showKeyboard)
1097
1111
{
1098
1112
#ifdef ANDROID
 
1113
#ifdef USE_SDL2
 
1114
    if (SDL_IsTextInputActive())
 
1115
        SDL_StopTextInput();
 
1116
    else
 
1117
        SDL_StartTextInput();
 
1118
#else
1099
1119
    SDL_ANDROID_ToggleScreenKeyboardTextInput(nullptr);
 
1120
#endif
1100
1121
    return true;
1101
1122
#else
1102
1123
    return false;