"Import MaxGui.Drivers" messing up KeyHit/KeyDown ?

Started by Rooster, June 30, 2017, 08:19:47

Previous topic - Next topic

Rooster

I've been working on my entry for Qube's competition, and to get access to some MaxGUI commands I added "Import MaxGui.Drivers" to my program.
However, just adding that to my program has made KeyHit/KeyDown stop working, except for the few times it randomly does work.

The command I'm trying to use is ClientWidth(Desktop()), and ClientHeight(Desktop()).

Does anyone know how to fix this, or a alternative way to get the screen width and height?

Thanks!

TomToad

non maxgui way to get desktop res
Print DesktopWidth() + " " + DesktopHeight()


Reason why MouseDown() n longer works in MaxGUI is because MaxGUI disables polling so you can handle these calls through events.  You can manually poll input by placing PollSystem() in your main loop, then KeyDown and MouseDown will work again.
------------------------------------------------
8 rabbits equals 1 rabbyte.

Rooster

Thank you TomToad. :)

For some reason I couldn't find those commands in the documentation.