Display
From LoTROInterface Wiki
API Reference > Turbine.UI.Display
Provides display information.
Methods
Name | Description |
---|---|
GetHeight | Gets the height of the display. |
GetMousePosition | Gets the position of the mouse. |
GetMouseX | Gets the X position of the mouse. |
GetMouseY | Gets the Y position of the mouse. |
GetSize | Gets the size of the display window for the game. |
GetWidth | Gets the width of the display. |
Remarks
This class provides information about the current game display. This includes information like the current game resolution.
Examples
This example will display a window that has been centered within the screen.
Centering a Window | |
---|---|
import "Turbine.UI.Lotro"; window = Turbine.UI.Lotro.Window(); window:SetSize( 200, 200 ); window:SetText( "Hello!" ); window:SetVisible( true ); local displayWidth, displayHeight = Turbine.UI.Display.GetSize(); local windowWidth, windowHeight = window:GetSize(); window:SetPosition( ( displayWidth - windowWidth ) / 2, ( displayHeight - windowHeight ) / 2 ); |