ISKernel:display (Data Type)

From Lavish Software Wiki
Revision as of 23:30, 4 May 2005 by Lax (talk | contribs)
Jump to navigation Jump to search

Description

Members

  • string System: Name of the current display system (e.g. Direct3D9)
  • bool Windowed: TRUE if the application is really windowed
  • bool AppWindowed: TRUE if the application thinks it is windowed
  • int Width: The game's actual resolution width
  • int Height: The game's actual resolution height
  • int X: X position of the full window's left edge
  • int Y: Y position of the full window's top edge
  • int WindowWidth: Width of the full window
  • int WindowHeight: Height of the full window
  • int Monitor: Current monitor. 1 for primary, 2 for secondary
  • int DesktopWidth: Width of the windows desktop on the current monitor
  • int DesktopHeight: Height of the windows desktop on the current monitor
  • int ViewableX: X position of the left edge of the window's viewable portion (does not include the border, etc)
  • int ViewableY: Y position of the top edge of the window's viewable portion (does not include the border, etc)
  • int ViewableWidth: Width of the window's viewable portion
  • int ViewableHeight: Height of the window's viewable portion
  • bool Foreground: TRUE if the window is currently the active window on the system
  • int DesktopX: X position of the left edge of the windows desktop on the current monitor
  • int DesktopY: Y position of the top edge of the windows desktop on the current monitor
  • rgb GetPixel[x,y]: Retrieves color information of a specific pixel. Coordinates are relative to the viewable portion of the window, not the game's actual display mode
  • string PixelSearch[x,y,color,-radius #,search ...]: Searches for the nearest pixel to x,y matching a set of conditions. Color and radius are required. Everything is given in decimal except for color, which must be lower case hexadecimal. Other optional search parameters include -within #, -redwithin #, -greenwithin #, -bluewithin #. These are used left to right, so to search for a color within 32 blue and green, but within 16 red, you could use -within 32,-redwithin 16. The returned string will be in the form x,y
  • int TextureMem: Available texture memory, in megabytes
  • float FPS: Sustained frames per second (calculated from the last 64 frames)
  • hudelement HUDElement[name]: Retrieves the HUD element with the given name

Methods

  • AddHUDElement[name,x,y,text]: Adds a HUD element with a given name, at the given x,y position in pixels (0,0 being upper left corner), with the given text

Returns

Same as System

Examples

  • Display:AddHUDElement[FPS,0,0,\${Display.FPS}]
Adds a HUD element displaying the current sustained FPS. The ${ is "escaped" so that it will be parsed when it is time to draw the HUD, rather than immediately

See Also