Using the mouse cursor in a game
Okay so I want the main menu in my game to use the mouse cursor. There are some problems that I've notice with this. Firstly, whenever the player clicks out of the window of a packaged game, it begins to slow down and drop frames a lot. (I know/think this is a feature to save power, but I really want the option to disable it.) This means that if at any point in my game's main menu, the player could just click out of the window and make the game look like garbage. Secondly, I'm wondering if there can be text boxes in unreal where a player can click in and type something (Or would I have to make an event for every key on the keyboard?) Any answer or response would be greatly appreciated! Thanks!
asked Aug 26 '17 at 02:12 PM in Using UE4
Hey, to your question,
Firstly the frametate. This is fixed in editor quite easily, though I have not double checked this propagates to a packaged project. If you go to your editor preferences, general>misc. (4.16) or performance (4.17) You can disable "use less cpu when in background"
Secondly, the click boxes. In the UMG widget editor, theres a widget called "text box" This one, unlike text, allows you to enter text at runtime as a input box. Theres an event for onTextCommited, which returns the text the user entered, ie playerName.
Update to your update.
The sound muting and especially the game input not working when clicked out of is expected behavior. The sound may be fixable by tweaking your defaultEngine.ini and adding this line.
The controller not working is probably not fixable, without being in focus your OS will see the input but there's nothing to consume the input.
Hope that helps
Follow this question
Once you sign in you will be able to subscribe for any updates here