s&
About
The Project
info
About s&box
map
Roadmap
monitoring
Metrics
Engine startup and usage numbers
Updates
newspaper
Latest News
published_with_changes
Changes
Release-by-release changelog
Games
Browse Games
Discover Games
gamejams
live now
Game Jam III
Ends
Fri 25 Sep
Theme
One More Round
The jam is running. Build something, or play the entries.
£
50,000
prizepool
View the jam
Workshop
Playable
sports_esports
Games
Standalone games and gamemodes
Assets
landscape
Maps
view_in_ar
Models
texture
Materials
apparel
Clothing
apps
Everything
Every asset type in one list
Forum
Learn
Documentation
rocket_launch
Getting Started
docs
Documentation
api
API Reference
Resources
school
Tutorials
manage_search
Code Search
input
Log in with Steam
Api
Editor Classes
Application
chevron_left
Editor Classes
class
Application
Static Properties
data_object
CursorDelta
data_object
CursorPosition
data_object
DpiScale
data_object
Editor
data_object
FocusWidget
data_object
HoveredWidget
data_object
KeyboardModifiers
data_object
MouseButtons
data_object
MouseWheelDelta
data_object
OnWidgetClicked
data_object
UnscaledCursorPosition
Static Methods
functions
IsKeyDown
functions
KeyCodeToString
functions
SetStyles
functions
Spin
Application
class
Editor
.
static
sealed
abstract
Sandbox.Tools
data_object
Static Properties
11
CursorDelta
Vector2
The cursor delta between this and previous frame.
CursorPosition
Vector2
Get/Set cursor position.
DpiScale
float
Editor
EditorSystem
Get the current editor if any. Will return null if we're not in the editor, or there is no active editor session.
FocusWidget
Widget
The Editor.Widget that has the keyboard input focus, or
null
if no widget in this application has the focus.
HoveredWidget
Widget
The Widget that is currently hovered
KeyboardModifiers
KeyboardModifiers
Returns which keyboard modified keys are held down right at this point.
MouseButtons
MouseButtons
Returns the current state of the mouse buttons.
MouseWheelDelta
Vector2
The mouse wheel delta between this and previous frame
OnWidgetClicked
Action`2
Called when any widget is clicked. Can set MouseEvent.Accepted to true to prevent the Widget's OnMouseClick from firing.
UnscaledCursorPosition
Vector2
The cursor position, not scaled for DPI
functions
Static Methods
4
IsKeyDown
(
code
)
bool
Returns whether or not a key is currently being held down.
KeyCodeToString
(
code
)
string
Converts an editor keycode to a string used by the game Qt::Key -> WindowsVirtualKey -> ButtonCode_t -> string
SetStyles
(
style
)
Spin
(
)
Will process all of the UI events - allowing the UI to stay responsive during a blocking call.
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.