s&
newspaper
About
info
About s&box
newspaper
Latest News
published_with_changes
Changes
map
Roadmap
monitoring
Metrics
games
Games
sports_esports
Browse Games
rocket
Discover Games
business_center
Workshop
sports_esports
Games
landscape
Maps
chair
Models
texture
Materials
apparel
Clothing
construction
More..
forum
Forum
docs
Docs
docs
Documentation
dashboard
Api Reference
school
Tutorials
input
Log in with Steam
chevron_left
Change Language
简体中文
English
Русский
Español
Português-Brasil
Deutsch
日本語
Français
Polski
Türkçe
한국어
Pirate
Italiano
ไทย
繁體中文
Українська
Čeština
Nederlands
Magyar
Dansk
Suomi
Svenska
Norsk
Ελληνικά
Română
Български
Tiếng Việt
Bahasa Indonesia
Español-Latinoamérica
العربية
Api
Editor Classes
Application
chevron_left
Editor Classes
class
Application
search
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.