~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to source/gameengine/BlenderRoutines/KX_BlenderKeyboardDevice.cpp

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
 */
31
31
 
32
32
 
33
 
#if defined(WIN32) && !defined(FREE_WINDOWS)
34
 
// annoying warnings about truncated STL debug info
35
 
#pragma warning (disable :4786)
 
33
#ifdef _MSC_VER
 
34
   /* annoying warnings about truncated STL debug info */
 
35
#  pragma warning (disable:4786)
36
36
#endif 
37
37
 
38
38
#include "KX_BlenderKeyboardDevice.h"
49
49
}
50
50
 
51
51
/**
52
 
        IsPressed gives boolean information about keyboard status, true if pressed, false if not
53
 
*/
 
52
 * IsPressed gives boolean information about keyboard status, true if pressed, false if not
 
53
 */
54
54
 
55
55
bool KX_BlenderKeyboardDevice::IsPressed(SCA_IInputDevice::KX_EnumInputs inputcode)
56
56
{
64
64
        return m_eventStatusTables[m_currentTable][inputcode];
65
65
}
66
66
*/
67
 
/** 
68
 
        NextFrame toggles currentTable with previousTable,
69
 
        and copy relevant event information from previous to current
70
 
        (pressed keys need to be remembered)
71
 
*/
 
67
/**
 
68
 * NextFrame toggles currentTable with previousTable,
 
69
 * and copy relevant event information from previous to current
 
70
 * (pressed keys need to be remembered)
 
71
 */
72
72
void    KX_BlenderKeyboardDevice::NextFrame()
73
73
{
74
74
        SCA_IInputDevice::NextFrame();
87
87
        }
88
88
}
89
89
 
90
 
/** 
91
 
        ConvertBlenderEvent translates blender keyboard events into ketsji kbd events
92
 
        extra event information is stored, like ramp-mode (just released/pressed)
 
90
/**
 
91
 * ConvertBlenderEvent translates blender keyboard events into ketsji kbd events
 
92
 * extra event information is stored, like ramp-mode (just released/pressed)
93
93
*/
94
 
 
95
 
 
96
 
bool    KX_BlenderKeyboardDevice::ConvertBlenderEvent(unsigned short incode,short val)
 
94
bool KX_BlenderKeyboardDevice::ConvertBlenderEvent(unsigned short incode, short val)
97
95
{
98
96
        bool result = false;
99
97
        
105
103
        {
106
104
                int previousTable = 1-m_currentTable;
107
105
 
108
 
                if (val == KM_PRESS)
 
106
                if (val == KM_PRESS || val == KM_DBL_CLICK)
109
107
                {
110
108
                        if (kxevent == KX_KetsjiEngine::GetExitKey() && val != 0 && !m_hookesc)
111
109
                                result = true;