Open mickvangelderen opened 2 weeks ago
Solution direction:
Add some data to the Action
struct in the capnp protocol:
struct Action {
keyEvents @0 :List(KeyPressType.Key);
mouseDx @1 :Int32;
mouseDy @2 :Int32;
inputString @3 : String; <-- something like this?
}
Then, at the right time (after the cmd
keypress takes effect), send an SEvent
or two to the right EventHandler
s.
if (m_key_was_pressed[keycache.key[KeyType::CMD]]) {
SEvent event;
event.EventType = irr::EET_STRING_INPUT_EVENT;
event.StringInput.Str = new core::stringw("max");
m_rendering_engine->get_gui_env()->postEventFromUser(event);
delete event.StringInput.Str;
}
Not needed for now because we implemented globo interactions through items instead: https://github.com/Astera-org/globo/pull/30
To enable environments that use commands, like https://github.com/Astera-org/dreamerv3/issues/7.