Game Focus/Pause

by Flysbad
This system checks for users focus on the game window, and allows the game to be paused.
ID:1302165
 
Have you ever wanted to be able to Pause your game or have the game automatically pause when you click off? This system allows you to be able to do that!

How to use:

mob/Login()
src.screen_focus()
That's nice. o.o Good for single player games.
You should make a Auto AFK system when you look away from the game.
There are a few notable changes you could make.

Instead of disabling each direction individually, why not just disable it in client.Move() altogether?
client/Move()
if(mob.is_paused)
return 0
else ..()

Also, you're only enabling pause for clients only; what about other entities? Currently, if I were to add walk_rand() under an NPC, it would still move, regardless of the game being paused or not.
In response to Magnum2k
@Quadropus; That would be a good feature to have, if you used this for a multiplayer game.

@Magnum2; Thanks for pointing that stuff out to me, Maggy.


@everyone else; I'll try to get around to fixing this library up soon, and adding the requested features above. I've been bit busy working on Densetsu right now to bother with any other things. It might take sometime, but I'll eventually get around to it.