~ubuntu-branches/ubuntu/wily/box2d/wily

« back to all changes in this revision

Viewing changes to Box2D/Testbed/Tests/ShapeEditing.h

  • Committer: Package Import Robot
  • Author(s): Markus Koschany
  • Date: 2014-05-30 18:42:02 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20140530184202-hosw11agojg02ac3
Tags: 2.3.1+ds-1
* Imported Upstream version 2.3.1+ds.
* Fix debian/watch to determine new releases by parsing
  the SVN tags of upstream's version control system.
* Update get-orig-source target for new release.
* dh_strip override: Replace $VER variable with 2.3.0 string.
* debian/copyright: Add new Public Domain and Apache 2.0 license.
* libbox2d-dev.install:
  - Install *.cmake files in /usr/lib/$(DEB_HOST_MULTIARCH)/cmake/Box2D.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
                m_sensor = false;
49
49
        }
50
50
 
51
 
        void Keyboard(unsigned char key)
 
51
        void Keyboard(int key)
52
52
        {
53
53
                switch (key)
54
54
                {
55
 
                case 'c':
 
55
                case GLFW_KEY_C:
56
56
                        if (m_fixture2 == NULL)
57
57
                        {
58
58
                                b2CircleShape shape;
63
63
                        }
64
64
                        break;
65
65
 
66
 
                case 'd':
 
66
                case GLFW_KEY_D:
67
67
                        if (m_fixture2 != NULL)
68
68
                        {
69
69
                                m_body->DestroyFixture(m_fixture2);
72
72
                        }
73
73
                        break;
74
74
 
75
 
                case 's':
 
75
                case GLFW_KEY_S:
76
76
                        if (m_fixture2 != NULL)
77
77
                        {
78
78
                                m_sensor = !m_sensor;
85
85
        void Step(Settings* settings)
86
86
        {
87
87
                Test::Step(settings);
88
 
                m_debugDraw.DrawString(5, m_textLine, "Press: (c) create a shape, (d) destroy a shape.");
 
88
                g_debugDraw.DrawString(5, m_textLine, "Press: (c) create a shape, (d) destroy a shape.");
89
89
                m_textLine += DRAW_STRING_NEW_LINE;
90
 
                m_debugDraw.DrawString(5, m_textLine, "sensor = %d", m_sensor);
 
90
                g_debugDraw.DrawString(5, m_textLine, "sensor = %d", m_sensor);
91
91
                m_textLine += DRAW_STRING_NEW_LINE;
92
92
        }
93
93