Windows Phone 8...?
Monkey Targets Forums/Windows 8/Windows Phone 8...?
| ||
How do I know if I'm running on Windows 8, or Windows Phone 8? I know TARGET="win8", but how do I know it's the phone? I ask, because I want to hide my mouse cursor on the phone - but not on "win8 desktop". What would be the best solution to this? |
| ||
That's easy. You don't have a mouse pointer on the phone at all. ;) |
| ||
No, I draw a mouse pointer myself! I need to know if I'm on the phone or not, so I won't draw my "custom pointer" in the game. |
| ||
Well I use some #ifdef code (oh well how's that in Monkey? #If target="...") to make these platform specific stuff to compile or not. So you could do: #If TARGET_NAME = "Windows 8 Game" 'Draw your mouse pointer #End The target names can be found in the target.monkey files in the targets folders. "Windows 8 Game" is for Windows 8 apps. "Windows Phone 8 Game" is for Windows 8 phone apps. Or do you want to make the decision during runtime? Don't know about that in this case. Does that even work to build cross platform windows stuff which runs on the desktop AND phones? |
| ||
Oh, that's handy! thanks! |
| ||
Urg... finally went to test this, and Monkey (v73) doesn't recognize TARGET_NAME :( |
| ||
... |