Jump to content

Handling keyboard input from UIScreenListener extension?


aflorin

Recommended Posts

I know how to handle keyboard input from an an inherited screen class using OnUnrealCommand. However, I am at a loss on how to do it from a UIScreenListner extension class. That guy exposes only a handful of events, and that one isn't one of them.

My mod (Tech Tree) spawns a button on UIAvengerHud that displays and hides a Tech Tree image with a scrollbar. It's all working and published and all fine. However, I would like to also be able to hide the image when the user hits the ESC key.

 

At this point, the only alternative I can think of is instead of spawning my TechTree controls onto UIAvengerHUD is to create my own custom screen class which inherits from UIScreen, UISimpleScreen or something, push it onto the Movie Stack and spawn my controls there. I would then have the OnUnrealCommand available. That seems like a lot of work for just trapping the ESC key.

 

Any and all help would be greatly appreciated.

 

Thanks.

 

Update: I wound up implementing exactly what I described above and successfully captured the keystrokes. It wasn't bad actually and it brought along some nice effects the engine does when screens are overlayed.

Edited by aflorin
Link to comment
Share on other sites

I know how to handle keyboard input from an an inherited screen class using OnUnrealCommand. However, I am at a loss on how to do it from a UIScreenListner extension class. That guy exposes only a handful of events, and that one isn't one of them.

 

Any and all help would be greatly appreciated.

 

Thanks.

You'd probably have to instance a UI screen, even a dummy class to do so.

Edited by Guest
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...