Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - tyrion

Pages: [1]
General discussions / Re: SFML 3 - What is your vision?
« on: September 15, 2014, 06:36:47 pm »
What would you do with a window with no GL context?
use another context :P
 (actually i am using ogre3d and commented out the glcontext stuff)
//#include <SFML/Window/ContextSettings.hpp>
//#include <SFML/Window/GlContext.hpp>

General discussions / Re: SFML 3 - What is your vision?
« on: September 12, 2014, 11:57:00 am »
  • Better support of multiple display setups
  • glcontext optional for windows
  • hardware cursor :P

SFML projects / Re: Thor 2.0
« on: September 11, 2014, 11:27:01 pm »
Back to my previous problem :)
PressOnce and ReleaseOnce denote events (they happen once), while Hold is a real-time state (a state you can query).

Maybe the functions thor::eventAction() and thor::realtimeAction() are interesting for you.

maybe u are interrested in how i solved my problem. If not sry for this post.

it was much easier than i thought to handle the "realtime actions".
After some debugging i found this line in sfml: 
return (GetAsyncKeyState(vkey) & 0x8000) != 0;

i always thought i need a window handle for key events .... :(

i have to send only the "GainedFocus" event to activate realtime actions and "LostFocus" to deactivate realtime actions ....
no manual sending of events (because it works without setting a window handle)!

SFML projects / Re: Thor 2.0
« on: August 26, 2014, 01:10:46 pm »
is the realtime input not checked per event?
sf::Event eventTest;
eventTest.type = sf::Event::EventType::KeyPressed;
eventTest.key.code = sf::Keyboard::Key::W;

by using a window handle all mapped actions are working as i wish  :)
actually i create a wpf editor and want to pass the sfml events to sfml ....
i thought it would be enough to just push the events to "thor" manually?

SFML projects / Re: Thor 2.0
« on: August 26, 2014, 02:02:14 am »

after a long time i have a new problem with thor, that i couldnt solve till now ....
I am trying to push an event manually in code:
void init()
thor::ActionMap<InputCmd::MyAction>::CallbackSystem system;
thor::ActionMap<InputCmd::MyAction> mMyActionmap;

mMyActionmap[InputCmd::KeyPressed] = Action(Event::KeyPressed);
mMyActionmap[InputCmd::Forward] = Action(toKeyboardKey("Key_W"), Action::Hold); //hold Action
system.connect(InputCmd::KeyPressed, ActionHandler(this));
system.connect(InputCmd::Forward, std::bind(&Controller::move, this, InputCmd::Forward));


void update()

// Forward actions to callbacks: Invokes onResize() in case of Event::Resized events
mMyActionmap.invokeCallbacks(system, mView.mWindow);

void manualEvent()
sf::Event eventTest;
eventTest.type = sf::Event::EventType::KeyPressed;
eventTest.key.code = sf::Keyboard::Key::W;
mMyActionmap.pushEvent(eventTest); //push event here


what works:
- pressing and holding the key "K" in the window triggers the "Forward" event
- calling manualEvent()  and change Action::Hold to Action::PressOnce fires the "Forward" event

what doesn't work:
- calling manualEvent() with Action::Hold doesn't trigger the "Forward" event, just the "Keypressed" event

Shouldn't the hold event fire, if the "keypressed" event is fired, without keyreleased?
do i miss somthing?

SFML projects / Re: Thor 2.0
« on: July 07, 2013, 04:06:52 pm »

how do i get the actions back from the map list?

map[Run] = (Action(XE::IPT::Keyboard::LShift) || Action(XE::IPT::Keyboard::RShift)) && Action(XE::IPT::Keyboard::R);

How do i get LShit ... RShift .. R back?

Thx!  :)

Pages: [1]