s&
newspaperAbout
infoAbout s&box newspaperLatest News published_with_changesChanges mapRoadmap monitoringMetrics
gamesGames
sports_esportsBrowse Games rocketDiscover Games
business_centerWorkshop
sports_esportsGames landscapeMaps chairModels textureMaterials apparelClothing constructionMore..
forumForum docsDocs
docsDocumentation dashboardApi Reference schoolTutorials
inputLog in with Steam chevron_leftChange Language
简体中文EnglishРусскийEspañolPortuguês-BrasilDeutsch日本語FrançaisPolskiTürkçe한국어PirateItalianoไทย繁體中文УкраїнськаČeštinaNederlandsMagyarDanskSuomiSvenskaNorskΕλληνικάRomânăБългарскиTiếng ViệtBahasa IndonesiaEspañol-Latinoaméricaالعربية
Api
Editor Classes
AutoComplete
chevron_left Editor Classes
class
AutoComplete

Constructors

functionsAutoComplete

Fields

crop_dinOnBuildOptionscrop_dinOnOptionSelected

Properties

data_objectHasAutocompleteOptionsdata_objectMinimumLengthdata_objectOpenOffset

Methods

functionsAddOptionfunctionsOnAutoCompletefunctionsOnGlobalMousePressedfunctionsOnParentBlurfunctionsOnParentKeyPressfunctionsOpenAbove
AutoComplete
class Editor .account_tree extends Menu
Sandbox.Tools

build Constructors 1

AutoComplete (parent)

crop_din Fields 2

OnBuildOptions
Action`2
The text has changed - fill in the options
OnOptionSelected
Action`1
You should hook this up to change the text on your control

data_object Properties 3

HasAutocompleteOptions
bool
MinimumLength
int
OpenOffset
Vector2

functions Methods 6

AddOption (name, icon, action, shortcut)
Option
Add an option for this autocomplete
OnAutoComplete (newPrefix, screenPosition)
OnGlobalMousePressed ()
Called when the mouse is pressed. Will hide this window if we clicked on anything except ourselves or our parent control.
OnParentBlur ()
Call this when the widget that spawns this blurs, so we can hide ourself
OnParentKeyPress (e)
You should call this from the parent when a key is pressed. Will forward the appropriate keys to us and accept the event.
OpenAbove (position)
Open above this position

Inheritance

QObject
Widget
Menu
AutoComplete
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.
  • News
  • Docs
  • Metrics
  • FAQ
  • Forum
  • Discord
  • Twitter