WebSurfaceclass

Enables rendering and interacting with a webpage

objectWebSurface
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public sealed class Sandbox.WebSurface

Methods6

Showing 6 methods

public virtual sealed void Dispose()PUBLICVIRTUAL

Returns:void

public void TellChar(uint unicodeKey, Sandbox.KeyboardModifiers modifiers)PUBLIC

Tell the browser a unicode key has been pressed

ParameterTypeDescription
unicodeKeyuint
modifiersKeyboardModifiers
Returns:void

public void TellKey(uint virtualKeyCode, Sandbox.KeyboardModifiers modifiers, bool state)PUBLIC

Tell the browser a key has been pressed or released

ParameterTypeDescription
virtualKeyCodeuint
modifiersKeyboardModifiers
statebool
Returns:void

public void TellMouseButton(Sandbox.MouseButtons button, bool state)PUBLIC

Tell the browser a mouse button has been pressed

ParameterTypeDescription
buttonMouseButtons
statebool
Returns:void

public void TellMouseMove(Vector2 position)PUBLIC

Tell the browser the mouse has moved

ParameterTypeDescription
positionVector2
Returns:void

public void TellMouseWheel(int delta)PUBLIC

Tell the browser the mouse wheel has moved

ParameterTypeDescription
deltaint
Returns:void

Properties9

Showing 9 properties

public string Sandbox.WebSurface.Cursor { get; set; }PUBLICGETSET

Returns:string

public bool Sandbox.WebSurface.HasKeyFocus { get; set; }PUBLICGETSET

Tell the html control if it has key focus currently, controls showing the I-beam cursor in text controls amongst other things

Returns:bool

public bool Sandbox.WebSurface.InBackgroundMode { get; set; }PUBLICGETSET

Enable/disable low-resource background mode, where javascript and repaint timers are throttled, resources are more aggressively purged from memory, and audio/video elements are paused. When background mode is enabled, all HTML5 video and audio objects will execute ".pause()" and gain the property "._steam_background_paused = 1". When background mode is disabled, any video or audio objects with that property will resume with ".play()".

Returns:bool

public bool Sandbox.WebSurface.IsLimited { get; set; }PUBLICGETSET

Returns:bool

public string Sandbox.WebSurface.PageTitle { get; set; }PUBLICGETSET

Returns:string

public float Sandbox.WebSurface.ScaleFactor { get; set; }PUBLICGETSET

DPI Scaling factor

Returns:float

public string Sandbox.WebSurface.Url { get; set; }PUBLICGETSET

The current Url

Returns:string

On this page