Device constants: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
This article is an overview of device related constants. | This article is an overview of device related constants. | ||
{| class=" | {| class="consttab" width="100%" | ||
|- | |- | ||
! '''Constant''' !! '''Description''' | |||
|- | |- | ||
|'''mb_left''' | |'''mb_left''' | ||
Line 22: | Line 21: | ||
|} | |} | ||
{| class=" | {| class="consttab" width="100%" | ||
|- | |- | ||
! '''Constant''' !! '''Description''' | |||
|- | |- | ||
|'''os_type''' | |'''os_type''' | ||
Line 61: | Line 59: | ||
|} | |} | ||
{| class=" | {| class="consttab" width="100%" | ||
|- | |- | ||
! '''Constant''' !! '''Description''' | |||
|- | |- | ||
|'''os_device''' | |'''os_device''' | ||
Line 94: | Line 91: | ||
|} | |} | ||
{| class=" | {| class="consttab" width="100%" | ||
|- | |- | ||
! '''Constant''' !! '''Description''' | |||
|- | |- | ||
|'''os_browser''' | |'''os_browser''' |
Revision as of 01:17, 1 May 2013
This article is an overview of device related constants.
Constant | Description |
---|---|
mb_left | left mouse button |
mb_middle | middle mouse button (this may not be valid on platforms without a middle mouse button) |
mb_right | right mouse button |
mb_none | no mouse button |
mb_any | any of the mouse buttons |
Constant | Description |
---|---|
os_type | Returns one of the following constants |
os_windows | Windows OS |
os_win32 | Windows 32bit OS |
os_symbian | Symbian OS |
os_android | Android |
os_psp | PlayStation Portable (PSP) |
os_linux | Linux |
os_macosx | Mac OS X |
os_ios | iOS (iPhone, iPad, iPod Touch) |
os_winphone | Windows 8 Phone |
os_unknown | unknown OS |
Constant | Description |
---|---|
os_device | Returns one of the following constants |
device_ios_ipad | iPad |
device_ios_ipad_retina | iPad with Retina display (2048x1536 screen) |
device_ios_iphone5 | iPhone5 with larger display (640x1136 screen) |
device_ios_iphone | iPhone/iPod Touch (480x320 screen) or Android phone |
device_ios_iphone_retina | iPhone/iPod Touch with Retina display (960x640 screen) |
device_emulator | emulator (Windows Phone or Android) |
device_tablet | Android tablet |
device_ios_unknown | Unknown or not iOS |
Constant | Description |
---|---|
os_browser | Returns one of the following constants |
browser_not_a_browser | Game is not being played in a browser |
browser_unknown | Unknown browser |
browser_ie | Internet Explorer |
browser_firefox | Mozilla Firefox |
browser_chrome | Google Chrome |
browser_safari | Safari |
browser_opera | Opera |
browser_safari_mobile | Safari Mobile |
browser_windows_store | Windows 8 App |
Operating System Version
The operating system version can be obtained with the os_version constant, it will return the corresponding values below.
- iOS version: (major_version * 16777216) + (minor_version * 4096) + build_number
- Max OS X version: (major_version * 16777216) + (minor_version * 4096) + build_number
- Windows version: majorVersion * 65536 + minorVersion)
- Windows phone version: majorVersion * 65536 + minorVersion
Max OS X Version | Value |
Cheetah (10.0.4) | 167772164 |
Puma (10.1.5) | 167776261 |
Jaguar (10.2.8) | 167780360 |
Panther (10.3.9) | 167784457 |
Tiger (10.4.11) | 167788555 |
Leopard (10.5.8) | 167792648 |
Snow Leopard (10.6.8) | 167796744 |
Lion (10.7.5) | 167800837 |
Mountain Lion (10.8.2) | 167804930 |
Windows Version | Value |
Windows 8 (6.2) | 393218 |
Windows Server 2012 (6.2) | 393218 |
Windows 7 (6.1) | 393217 |
Windows Server 2008 R2 (6.1) | 393217 |
Windows Server 2008 (6.0) | 393216 |
Windows Vista (6.0) | 393216 |
Windows Server 2003 R2 (5.2) | 327682 |
Windows Server 2003 (5.2) | 327682 |
Windows XP 64-Bit Edition (5.2) | 327682 |
Windows XP (5.1) | 327681 |
Windows 2000 (5.0) | 327680 |
Android Version | Value |
Cupcake (1.5) | 3 |
Donut (1.6) | 4 |
Eclair (2.0) | 5 |
Eclair (2.0.1) | 6 |
Eclair (2.1) | 7 |
Froyo (2.2.x) | 8 |
Gingerbread (2.3 - 2.3.2) | 9 |
Gingerbread (2.3.3 - 2.3.7) | 10 |
Honeycomb (3.0) | 11 |
Honeycomb (3.1) | 12 |
Honeycomb (3.2.x) | 13 |
Ice Cream Sandwich (4.0.1 - 4.0.2) | 14 |
Ice Cream Sandwich (4.0.3 - 4.0.4) | 15 |
Jelly Bean (4.1.x) | 16 |
iOS Version | Value |
iOS 3 (3.1.3) | 67117057 |
iOS 4 (4.2.1) | 83890177 |
iOS 5 (5.1.1) | 100663297 |
iOS 6 (6.0.1) | 100663298 |
iOS 6 (6.0.2) | 100667392 |
iOS 6 (6.1) |
Windows Phone Version | Value |
Windows Phone 8 (8.0) | |
Windows Phone 7.5 (7.1) | |
Windows Phone 7 (7.0) |