Search found 7 matches

by jurgel
Wed Oct 13, 2010 10:36 am
Forum: Beginners Help
Topic: Complete event handler
Replies: 18
Views: 2014

or should I put in this thread? please post here, that way future questions have the answers all in one place. ok, I'm divide your code to .h and .cpp here it's .h #ifndef __frameListener_h__ #define __frameListener_h__ #include <irrlicht.h> using namespace irr; using namespace core; using namespac...
by jurgel
Mon Oct 11, 2010 2:31 pm
Forum: Beginners Help
Topic: Complete event handler
Replies: 18
Views: 2014

ahh, finally I got the answer
I'm mix your code with "MastEventReceiver.cpp" from other thread,
and it's working perfectly now,

if someone want my code,
you can pm me :D

or should I put in this thread?
by jurgel
Mon Oct 11, 2010 1:22 pm
Forum: Beginners Help
Topic: Complete event handler
Replies: 18
Views: 2014

You don't need a compiler for that :) if (keyState[e.KeyInput.Key] != DOWN) // true if PRESSED keyState[e.KeyInput.Key] = PRESSED; else if (keyState[e.KeyInput.Key] == PRESSED) // so this is never executed keyState[e.KeyInput.Key] = DOWN; That's probably what you want: if (keyState[e.KeyInput.Key] ...
by jurgel
Mon Oct 11, 2010 12:07 pm
Forum: Beginners Help
Topic: Complete event handler
Replies: 18
Views: 2014

lol, :lol:

It wasting my time if my waiting for you back to your states,
it must be a looong time,

ok thanks :D

I'll check it by myself,

don't forget to tell me if you already back, ok :D
even it's several years later , lol :lol: :lol:
by jurgel
Mon Oct 11, 2010 11:31 am
Forum: Beginners Help
Topic: Complete event handler
Replies: 18
Views: 2014

hmmmm......... it seems that the keystate is never set to DOWN. Maybe this is better code. Seven the problem isn't the keystate is never set to DOWN, but keystate is never set to PRESSED, I've test your code and result the same as before. the result of function isKeyPress() is same as isKeyDown()
by jurgel
Mon Oct 11, 2010 8:38 am
Forum: Beginners Help
Topic: Complete event handler
Replies: 18
Views: 2014

hey Seven, I'm test your code, and I think there is a bug, what different between isKeyDown() and IsKeyPressed() ?? isKeyPressed give the same result as isKeyDown, it should be doing the action 1x not like as isKeyDown that doing the action every frame, I test your code using this: if (mReceiver->Is...
by jurgel
Wed Oct 06, 2010 3:51 pm
Forum: Beginners Help
Topic: Complete event handler
Replies: 18
Views: 2014

#pragma once #include "IrrLicht.h" class IrrEventHandler : public IEventReceiver { public: // Enumeration for UP, DOWN, PRESSED and RELEASED key states. Also used for mouse button states. enum keyStatesENUM {UP, DOWN, PRESSED, RELEASED}; // Keyboard key states. keyStatesENUM keyState[KEY_...