[email protected] 296 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/@GlobalScope.xml.
  6. .. _class_@GlobalScope:
  7. @GlobalScope
  8. ============
  9. Global scope constants and functions.
  10. .. rst-class:: classref-introduction-group
  11. Description
  12. -----------
  13. A list of global scope enumerated constants and built-in functions. This is all that resides in the globals, constants regarding error codes, keycodes, property hints, etc.
  14. Singletons are also documented here, since they can be accessed from anywhere.
  15. For the entries related to GDScript which can be accessed in any script see :ref:`@GDScript<class_@GDScript>`.
  16. .. note::
  17. There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information.
  18. .. rst-class:: classref-introduction-group
  19. Tutorials
  20. ---------
  21. - :doc:`Random number generation <../tutorials/math/random_number_generation>`
  22. .. rst-class:: classref-reftable-group
  23. Properties
  24. ----------
  25. .. table::
  26. :widths: auto
  27. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  28. | :ref:`AudioServer<class_AudioServer>` | :ref:`AudioServer<class_@GlobalScope_property_AudioServer>` |
  29. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  30. | :ref:`CameraServer<class_CameraServer>` | :ref:`CameraServer<class_@GlobalScope_property_CameraServer>` |
  31. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  32. | :ref:`ClassDB<class_ClassDB>` | :ref:`ClassDB<class_@GlobalScope_property_ClassDB>` |
  33. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  34. | :ref:`DisplayServer<class_DisplayServer>` | :ref:`DisplayServer<class_@GlobalScope_property_DisplayServer>` |
  35. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  36. | :ref:`EditorInterface<class_EditorInterface>` | :ref:`EditorInterface<class_@GlobalScope_property_EditorInterface>` |
  37. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  38. | :ref:`Engine<class_Engine>` | :ref:`Engine<class_@GlobalScope_property_Engine>` |
  39. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  40. | :ref:`EngineDebugger<class_EngineDebugger>` | :ref:`EngineDebugger<class_@GlobalScope_property_EngineDebugger>` |
  41. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  42. | :ref:`GDExtensionManager<class_GDExtensionManager>` | :ref:`GDExtensionManager<class_@GlobalScope_property_GDExtensionManager>` |
  43. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  44. | :ref:`Geometry2D<class_Geometry2D>` | :ref:`Geometry2D<class_@GlobalScope_property_Geometry2D>` |
  45. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  46. | :ref:`Geometry3D<class_Geometry3D>` | :ref:`Geometry3D<class_@GlobalScope_property_Geometry3D>` |
  47. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  48. | :ref:`GodotSharp<class_GodotSharp>` | :ref:`GodotSharp<class_@GlobalScope_property_GodotSharp>` |
  49. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  50. | :ref:`IP<class_IP>` | :ref:`IP<class_@GlobalScope_property_IP>` |
  51. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  52. | :ref:`Input<class_Input>` | :ref:`Input<class_@GlobalScope_property_Input>` |
  53. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  54. | :ref:`InputMap<class_InputMap>` | :ref:`InputMap<class_@GlobalScope_property_InputMap>` |
  55. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  56. | :ref:`JavaClassWrapper<class_JavaClassWrapper>` | :ref:`JavaClassWrapper<class_@GlobalScope_property_JavaClassWrapper>` |
  57. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  58. | :ref:`JavaScriptBridge<class_JavaScriptBridge>` | :ref:`JavaScriptBridge<class_@GlobalScope_property_JavaScriptBridge>` |
  59. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  60. | :ref:`Marshalls<class_Marshalls>` | :ref:`Marshalls<class_@GlobalScope_property_Marshalls>` |
  61. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  62. | :ref:`NavigationMeshGenerator<class_NavigationMeshGenerator>` | :ref:`NavigationMeshGenerator<class_@GlobalScope_property_NavigationMeshGenerator>` |
  63. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  64. | :ref:`NavigationServer2D<class_NavigationServer2D>` | :ref:`NavigationServer2D<class_@GlobalScope_property_NavigationServer2D>` |
  65. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  66. | :ref:`NavigationServer3D<class_NavigationServer3D>` | :ref:`NavigationServer3D<class_@GlobalScope_property_NavigationServer3D>` |
  67. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  68. | :ref:`OS<class_OS>` | :ref:`OS<class_@GlobalScope_property_OS>` |
  69. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  70. | :ref:`Performance<class_Performance>` | :ref:`Performance<class_@GlobalScope_property_Performance>` |
  71. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  72. | :ref:`PhysicsServer2D<class_PhysicsServer2D>` | :ref:`PhysicsServer2D<class_@GlobalScope_property_PhysicsServer2D>` |
  73. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  74. | :ref:`PhysicsServer2DManager<class_PhysicsServer2DManager>` | :ref:`PhysicsServer2DManager<class_@GlobalScope_property_PhysicsServer2DManager>` |
  75. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  76. | :ref:`PhysicsServer3D<class_PhysicsServer3D>` | :ref:`PhysicsServer3D<class_@GlobalScope_property_PhysicsServer3D>` |
  77. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  78. | :ref:`PhysicsServer3DManager<class_PhysicsServer3DManager>` | :ref:`PhysicsServer3DManager<class_@GlobalScope_property_PhysicsServer3DManager>` |
  79. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  80. | :ref:`ProjectSettings<class_ProjectSettings>` | :ref:`ProjectSettings<class_@GlobalScope_property_ProjectSettings>` |
  81. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  82. | :ref:`RenderingServer<class_RenderingServer>` | :ref:`RenderingServer<class_@GlobalScope_property_RenderingServer>` |
  83. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  84. | :ref:`ResourceLoader<class_ResourceLoader>` | :ref:`ResourceLoader<class_@GlobalScope_property_ResourceLoader>` |
  85. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  86. | :ref:`ResourceSaver<class_ResourceSaver>` | :ref:`ResourceSaver<class_@GlobalScope_property_ResourceSaver>` |
  87. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  88. | :ref:`ResourceUID<class_ResourceUID>` | :ref:`ResourceUID<class_@GlobalScope_property_ResourceUID>` |
  89. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  90. | :ref:`TextServerManager<class_TextServerManager>` | :ref:`TextServerManager<class_@GlobalScope_property_TextServerManager>` |
  91. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  92. | :ref:`ThemeDB<class_ThemeDB>` | :ref:`ThemeDB<class_@GlobalScope_property_ThemeDB>` |
  93. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  94. | :ref:`Time<class_Time>` | :ref:`Time<class_@GlobalScope_property_Time>` |
  95. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  96. | :ref:`TranslationServer<class_TranslationServer>` | :ref:`TranslationServer<class_@GlobalScope_property_TranslationServer>` |
  97. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  98. | :ref:`WorkerThreadPool<class_WorkerThreadPool>` | :ref:`WorkerThreadPool<class_@GlobalScope_property_WorkerThreadPool>` |
  99. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  100. | :ref:`XRServer<class_XRServer>` | :ref:`XRServer<class_@GlobalScope_property_XRServer>` |
  101. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  102. .. rst-class:: classref-reftable-group
  103. Methods
  104. -------
  105. .. table::
  106. :widths: auto
  107. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | :ref:`Variant<class_Variant>` | :ref:`abs<class_@GlobalScope_method_abs>` **(** :ref:`Variant<class_Variant>` x **)** |
  109. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | :ref:`float<class_float>` | :ref:`absf<class_@GlobalScope_method_absf>` **(** :ref:`float<class_float>` x **)** |
  111. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. | :ref:`int<class_int>` | :ref:`absi<class_@GlobalScope_method_absi>` **(** :ref:`int<class_int>` x **)** |
  113. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  114. | :ref:`float<class_float>` | :ref:`acos<class_@GlobalScope_method_acos>` **(** :ref:`float<class_float>` x **)** |
  115. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  116. | :ref:`float<class_float>` | :ref:`asin<class_@GlobalScope_method_asin>` **(** :ref:`float<class_float>` x **)** |
  117. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  118. | :ref:`float<class_float>` | :ref:`atan<class_@GlobalScope_method_atan>` **(** :ref:`float<class_float>` x **)** |
  119. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  120. | :ref:`float<class_float>` | :ref:`atan2<class_@GlobalScope_method_atan2>` **(** :ref:`float<class_float>` y, :ref:`float<class_float>` x **)** |
  121. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  122. | :ref:`float<class_float>` | :ref:`bezier_derivative<class_@GlobalScope_method_bezier_derivative>` **(** :ref:`float<class_float>` start, :ref:`float<class_float>` control_1, :ref:`float<class_float>` control_2, :ref:`float<class_float>` end, :ref:`float<class_float>` t **)** |
  123. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  124. | :ref:`float<class_float>` | :ref:`bezier_interpolate<class_@GlobalScope_method_bezier_interpolate>` **(** :ref:`float<class_float>` start, :ref:`float<class_float>` control_1, :ref:`float<class_float>` control_2, :ref:`float<class_float>` end, :ref:`float<class_float>` t **)** |
  125. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  126. | :ref:`Variant<class_Variant>` | :ref:`bytes_to_var<class_@GlobalScope_method_bytes_to_var>` **(** :ref:`PackedByteArray<class_PackedByteArray>` bytes **)** |
  127. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  128. | :ref:`Variant<class_Variant>` | :ref:`bytes_to_var_with_objects<class_@GlobalScope_method_bytes_to_var_with_objects>` **(** :ref:`PackedByteArray<class_PackedByteArray>` bytes **)** |
  129. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  130. | :ref:`Variant<class_Variant>` | :ref:`ceil<class_@GlobalScope_method_ceil>` **(** :ref:`Variant<class_Variant>` x **)** |
  131. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  132. | :ref:`float<class_float>` | :ref:`ceilf<class_@GlobalScope_method_ceilf>` **(** :ref:`float<class_float>` x **)** |
  133. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  134. | :ref:`int<class_int>` | :ref:`ceili<class_@GlobalScope_method_ceili>` **(** :ref:`float<class_float>` x **)** |
  135. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  136. | :ref:`Variant<class_Variant>` | :ref:`clamp<class_@GlobalScope_method_clamp>` **(** :ref:`Variant<class_Variant>` value, :ref:`Variant<class_Variant>` min, :ref:`Variant<class_Variant>` max **)** |
  137. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  138. | :ref:`float<class_float>` | :ref:`clampf<class_@GlobalScope_method_clampf>` **(** :ref:`float<class_float>` value, :ref:`float<class_float>` min, :ref:`float<class_float>` max **)** |
  139. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  140. | :ref:`int<class_int>` | :ref:`clampi<class_@GlobalScope_method_clampi>` **(** :ref:`int<class_int>` value, :ref:`int<class_int>` min, :ref:`int<class_int>` max **)** |
  141. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  142. | :ref:`float<class_float>` | :ref:`cos<class_@GlobalScope_method_cos>` **(** :ref:`float<class_float>` angle_rad **)** |
  143. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  144. | :ref:`float<class_float>` | :ref:`cosh<class_@GlobalScope_method_cosh>` **(** :ref:`float<class_float>` x **)** |
  145. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  146. | :ref:`float<class_float>` | :ref:`cubic_interpolate<class_@GlobalScope_method_cubic_interpolate>` **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` pre, :ref:`float<class_float>` post, :ref:`float<class_float>` weight **)** |
  147. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  148. | :ref:`float<class_float>` | :ref:`cubic_interpolate_angle<class_@GlobalScope_method_cubic_interpolate_angle>` **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` pre, :ref:`float<class_float>` post, :ref:`float<class_float>` weight **)** |
  149. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  150. | :ref:`float<class_float>` | :ref:`cubic_interpolate_angle_in_time<class_@GlobalScope_method_cubic_interpolate_angle_in_time>` **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` pre, :ref:`float<class_float>` post, :ref:`float<class_float>` weight, :ref:`float<class_float>` to_t, :ref:`float<class_float>` pre_t, :ref:`float<class_float>` post_t **)** |
  151. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  152. | :ref:`float<class_float>` | :ref:`cubic_interpolate_in_time<class_@GlobalScope_method_cubic_interpolate_in_time>` **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` pre, :ref:`float<class_float>` post, :ref:`float<class_float>` weight, :ref:`float<class_float>` to_t, :ref:`float<class_float>` pre_t, :ref:`float<class_float>` post_t **)** |
  153. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  154. | :ref:`float<class_float>` | :ref:`db_to_linear<class_@GlobalScope_method_db_to_linear>` **(** :ref:`float<class_float>` db **)** |
  155. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  156. | :ref:`float<class_float>` | :ref:`deg_to_rad<class_@GlobalScope_method_deg_to_rad>` **(** :ref:`float<class_float>` deg **)** |
  157. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  158. | :ref:`float<class_float>` | :ref:`ease<class_@GlobalScope_method_ease>` **(** :ref:`float<class_float>` x, :ref:`float<class_float>` curve **)** |
  159. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  160. | :ref:`String<class_String>` | :ref:`error_string<class_@GlobalScope_method_error_string>` **(** :ref:`int<class_int>` error **)** |
  161. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  162. | :ref:`float<class_float>` | :ref:`exp<class_@GlobalScope_method_exp>` **(** :ref:`float<class_float>` x **)** |
  163. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  164. | :ref:`Variant<class_Variant>` | :ref:`floor<class_@GlobalScope_method_floor>` **(** :ref:`Variant<class_Variant>` x **)** |
  165. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  166. | :ref:`float<class_float>` | :ref:`floorf<class_@GlobalScope_method_floorf>` **(** :ref:`float<class_float>` x **)** |
  167. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  168. | :ref:`int<class_int>` | :ref:`floori<class_@GlobalScope_method_floori>` **(** :ref:`float<class_float>` x **)** |
  169. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  170. | :ref:`float<class_float>` | :ref:`fmod<class_@GlobalScope_method_fmod>` **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)** |
  171. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  172. | :ref:`float<class_float>` | :ref:`fposmod<class_@GlobalScope_method_fposmod>` **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)** |
  173. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  174. | :ref:`int<class_int>` | :ref:`hash<class_@GlobalScope_method_hash>` **(** :ref:`Variant<class_Variant>` variable **)** |
  175. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  176. | :ref:`Object<class_Object>` | :ref:`instance_from_id<class_@GlobalScope_method_instance_from_id>` **(** :ref:`int<class_int>` instance_id **)** |
  177. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  178. | :ref:`float<class_float>` | :ref:`inverse_lerp<class_@GlobalScope_method_inverse_lerp>` **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` weight **)** |
  179. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  180. | :ref:`bool<class_bool>` | :ref:`is_equal_approx<class_@GlobalScope_method_is_equal_approx>` **(** :ref:`float<class_float>` a, :ref:`float<class_float>` b **)** |
  181. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  182. | :ref:`bool<class_bool>` | :ref:`is_finite<class_@GlobalScope_method_is_finite>` **(** :ref:`float<class_float>` x **)** |
  183. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  184. | :ref:`bool<class_bool>` | :ref:`is_inf<class_@GlobalScope_method_is_inf>` **(** :ref:`float<class_float>` x **)** |
  185. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  186. | :ref:`bool<class_bool>` | :ref:`is_instance_id_valid<class_@GlobalScope_method_is_instance_id_valid>` **(** :ref:`int<class_int>` id **)** |
  187. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  188. | :ref:`bool<class_bool>` | :ref:`is_instance_valid<class_@GlobalScope_method_is_instance_valid>` **(** :ref:`Variant<class_Variant>` instance **)** |
  189. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  190. | :ref:`bool<class_bool>` | :ref:`is_nan<class_@GlobalScope_method_is_nan>` **(** :ref:`float<class_float>` x **)** |
  191. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  192. | :ref:`bool<class_bool>` | :ref:`is_same<class_@GlobalScope_method_is_same>` **(** :ref:`Variant<class_Variant>` a, :ref:`Variant<class_Variant>` b **)** |
  193. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  194. | :ref:`bool<class_bool>` | :ref:`is_zero_approx<class_@GlobalScope_method_is_zero_approx>` **(** :ref:`float<class_float>` x **)** |
  195. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  196. | :ref:`Variant<class_Variant>` | :ref:`lerp<class_@GlobalScope_method_lerp>` **(** :ref:`Variant<class_Variant>` from, :ref:`Variant<class_Variant>` to, :ref:`Variant<class_Variant>` weight **)** |
  197. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  198. | :ref:`float<class_float>` | :ref:`lerp_angle<class_@GlobalScope_method_lerp_angle>` **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` weight **)** |
  199. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  200. | :ref:`float<class_float>` | :ref:`lerpf<class_@GlobalScope_method_lerpf>` **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` weight **)** |
  201. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  202. | :ref:`float<class_float>` | :ref:`linear_to_db<class_@GlobalScope_method_linear_to_db>` **(** :ref:`float<class_float>` lin **)** |
  203. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  204. | :ref:`float<class_float>` | :ref:`log<class_@GlobalScope_method_log>` **(** :ref:`float<class_float>` x **)** |
  205. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  206. | :ref:`Variant<class_Variant>` | :ref:`max<class_@GlobalScope_method_max>` **(** ... **)** |vararg| |
  207. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  208. | :ref:`float<class_float>` | :ref:`maxf<class_@GlobalScope_method_maxf>` **(** :ref:`float<class_float>` a, :ref:`float<class_float>` b **)** |
  209. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  210. | :ref:`int<class_int>` | :ref:`maxi<class_@GlobalScope_method_maxi>` **(** :ref:`int<class_int>` a, :ref:`int<class_int>` b **)** |
  211. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  212. | :ref:`Variant<class_Variant>` | :ref:`min<class_@GlobalScope_method_min>` **(** ... **)** |vararg| |
  213. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  214. | :ref:`float<class_float>` | :ref:`minf<class_@GlobalScope_method_minf>` **(** :ref:`float<class_float>` a, :ref:`float<class_float>` b **)** |
  215. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  216. | :ref:`int<class_int>` | :ref:`mini<class_@GlobalScope_method_mini>` **(** :ref:`int<class_int>` a, :ref:`int<class_int>` b **)** |
  217. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  218. | :ref:`float<class_float>` | :ref:`move_toward<class_@GlobalScope_method_move_toward>` **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` delta **)** |
  219. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  220. | :ref:`int<class_int>` | :ref:`nearest_po2<class_@GlobalScope_method_nearest_po2>` **(** :ref:`int<class_int>` value **)** |
  221. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  222. | :ref:`float<class_float>` | :ref:`pingpong<class_@GlobalScope_method_pingpong>` **(** :ref:`float<class_float>` value, :ref:`float<class_float>` length **)** |
  223. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  224. | :ref:`int<class_int>` | :ref:`posmod<class_@GlobalScope_method_posmod>` **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y **)** |
  225. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  226. | :ref:`float<class_float>` | :ref:`pow<class_@GlobalScope_method_pow>` **(** :ref:`float<class_float>` base, :ref:`float<class_float>` exp **)** |
  227. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  228. | void | :ref:`print<class_@GlobalScope_method_print>` **(** ... **)** |vararg| |
  229. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  230. | void | :ref:`print_rich<class_@GlobalScope_method_print_rich>` **(** ... **)** |vararg| |
  231. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  232. | void | :ref:`print_verbose<class_@GlobalScope_method_print_verbose>` **(** ... **)** |vararg| |
  233. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  234. | void | :ref:`printerr<class_@GlobalScope_method_printerr>` **(** ... **)** |vararg| |
  235. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  236. | void | :ref:`printraw<class_@GlobalScope_method_printraw>` **(** ... **)** |vararg| |
  237. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  238. | void | :ref:`prints<class_@GlobalScope_method_prints>` **(** ... **)** |vararg| |
  239. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  240. | void | :ref:`printt<class_@GlobalScope_method_printt>` **(** ... **)** |vararg| |
  241. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  242. | void | :ref:`push_error<class_@GlobalScope_method_push_error>` **(** ... **)** |vararg| |
  243. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  244. | void | :ref:`push_warning<class_@GlobalScope_method_push_warning>` **(** ... **)** |vararg| |
  245. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  246. | :ref:`float<class_float>` | :ref:`rad_to_deg<class_@GlobalScope_method_rad_to_deg>` **(** :ref:`float<class_float>` rad **)** |
  247. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  248. | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`rand_from_seed<class_@GlobalScope_method_rand_from_seed>` **(** :ref:`int<class_int>` seed **)** |
  249. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  250. | :ref:`float<class_float>` | :ref:`randf<class_@GlobalScope_method_randf>` **(** **)** |
  251. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  252. | :ref:`float<class_float>` | :ref:`randf_range<class_@GlobalScope_method_randf_range>` **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to **)** |
  253. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  254. | :ref:`float<class_float>` | :ref:`randfn<class_@GlobalScope_method_randfn>` **(** :ref:`float<class_float>` mean, :ref:`float<class_float>` deviation **)** |
  255. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  256. | :ref:`int<class_int>` | :ref:`randi<class_@GlobalScope_method_randi>` **(** **)** |
  257. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  258. | :ref:`int<class_int>` | :ref:`randi_range<class_@GlobalScope_method_randi_range>` **(** :ref:`int<class_int>` from, :ref:`int<class_int>` to **)** |
  259. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  260. | void | :ref:`randomize<class_@GlobalScope_method_randomize>` **(** **)** |
  261. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  262. | :ref:`float<class_float>` | :ref:`remap<class_@GlobalScope_method_remap>` **(** :ref:`float<class_float>` value, :ref:`float<class_float>` istart, :ref:`float<class_float>` istop, :ref:`float<class_float>` ostart, :ref:`float<class_float>` ostop **)** |
  263. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  264. | :ref:`int<class_int>` | :ref:`rid_allocate_id<class_@GlobalScope_method_rid_allocate_id>` **(** **)** |
  265. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  266. | :ref:`RID<class_RID>` | :ref:`rid_from_int64<class_@GlobalScope_method_rid_from_int64>` **(** :ref:`int<class_int>` base **)** |
  267. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  268. | :ref:`Variant<class_Variant>` | :ref:`round<class_@GlobalScope_method_round>` **(** :ref:`Variant<class_Variant>` x **)** |
  269. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  270. | :ref:`float<class_float>` | :ref:`roundf<class_@GlobalScope_method_roundf>` **(** :ref:`float<class_float>` x **)** |
  271. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  272. | :ref:`int<class_int>` | :ref:`roundi<class_@GlobalScope_method_roundi>` **(** :ref:`float<class_float>` x **)** |
  273. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  274. | void | :ref:`seed<class_@GlobalScope_method_seed>` **(** :ref:`int<class_int>` base **)** |
  275. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  276. | :ref:`Variant<class_Variant>` | :ref:`sign<class_@GlobalScope_method_sign>` **(** :ref:`Variant<class_Variant>` x **)** |
  277. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  278. | :ref:`float<class_float>` | :ref:`signf<class_@GlobalScope_method_signf>` **(** :ref:`float<class_float>` x **)** |
  279. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  280. | :ref:`int<class_int>` | :ref:`signi<class_@GlobalScope_method_signi>` **(** :ref:`int<class_int>` x **)** |
  281. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  282. | :ref:`float<class_float>` | :ref:`sin<class_@GlobalScope_method_sin>` **(** :ref:`float<class_float>` angle_rad **)** |
  283. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  284. | :ref:`float<class_float>` | :ref:`sinh<class_@GlobalScope_method_sinh>` **(** :ref:`float<class_float>` x **)** |
  285. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  286. | :ref:`float<class_float>` | :ref:`smoothstep<class_@GlobalScope_method_smoothstep>` **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` x **)** |
  287. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  288. | :ref:`Variant<class_Variant>` | :ref:`snapped<class_@GlobalScope_method_snapped>` **(** :ref:`Variant<class_Variant>` x, :ref:`Variant<class_Variant>` step **)** |
  289. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  290. | :ref:`float<class_float>` | :ref:`snappedf<class_@GlobalScope_method_snappedf>` **(** :ref:`float<class_float>` x, :ref:`float<class_float>` step **)** |
  291. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  292. | :ref:`int<class_int>` | :ref:`snappedi<class_@GlobalScope_method_snappedi>` **(** :ref:`float<class_float>` x, :ref:`int<class_int>` step **)** |
  293. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  294. | :ref:`float<class_float>` | :ref:`sqrt<class_@GlobalScope_method_sqrt>` **(** :ref:`float<class_float>` x **)** |
  295. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  296. | :ref:`int<class_int>` | :ref:`step_decimals<class_@GlobalScope_method_step_decimals>` **(** :ref:`float<class_float>` x **)** |
  297. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  298. | :ref:`String<class_String>` | :ref:`str<class_@GlobalScope_method_str>` **(** ... **)** |vararg| |
  299. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  300. | :ref:`Variant<class_Variant>` | :ref:`str_to_var<class_@GlobalScope_method_str_to_var>` **(** :ref:`String<class_String>` string **)** |
  301. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  302. | :ref:`float<class_float>` | :ref:`tan<class_@GlobalScope_method_tan>` **(** :ref:`float<class_float>` angle_rad **)** |
  303. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  304. | :ref:`float<class_float>` | :ref:`tanh<class_@GlobalScope_method_tanh>` **(** :ref:`float<class_float>` x **)** |
  305. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  306. | :ref:`int<class_int>` | :ref:`typeof<class_@GlobalScope_method_typeof>` **(** :ref:`Variant<class_Variant>` variable **)** |
  307. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  308. | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`var_to_bytes<class_@GlobalScope_method_var_to_bytes>` **(** :ref:`Variant<class_Variant>` variable **)** |
  309. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  310. | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`var_to_bytes_with_objects<class_@GlobalScope_method_var_to_bytes_with_objects>` **(** :ref:`Variant<class_Variant>` variable **)** |
  311. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  312. | :ref:`String<class_String>` | :ref:`var_to_str<class_@GlobalScope_method_var_to_str>` **(** :ref:`Variant<class_Variant>` variable **)** |
  313. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  314. | :ref:`Variant<class_Variant>` | :ref:`weakref<class_@GlobalScope_method_weakref>` **(** :ref:`Variant<class_Variant>` obj **)** |
  315. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  316. | :ref:`Variant<class_Variant>` | :ref:`wrap<class_@GlobalScope_method_wrap>` **(** :ref:`Variant<class_Variant>` value, :ref:`Variant<class_Variant>` min, :ref:`Variant<class_Variant>` max **)** |
  317. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  318. | :ref:`float<class_float>` | :ref:`wrapf<class_@GlobalScope_method_wrapf>` **(** :ref:`float<class_float>` value, :ref:`float<class_float>` min, :ref:`float<class_float>` max **)** |
  319. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  320. | :ref:`int<class_int>` | :ref:`wrapi<class_@GlobalScope_method_wrapi>` **(** :ref:`int<class_int>` value, :ref:`int<class_int>` min, :ref:`int<class_int>` max **)** |
  321. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  322. .. rst-class:: classref-section-separator
  323. ----
  324. .. rst-class:: classref-descriptions-group
  325. Enumerations
  326. ------------
  327. .. _enum_@GlobalScope_Side:
  328. .. rst-class:: classref-enumeration
  329. enum **Side**:
  330. .. _class_@GlobalScope_constant_SIDE_LEFT:
  331. .. rst-class:: classref-enumeration-constant
  332. :ref:`Side<enum_@GlobalScope_Side>` **SIDE_LEFT** = ``0``
  333. Left side, usually used for :ref:`Control<class_Control>` or :ref:`StyleBox<class_StyleBox>`-derived classes.
  334. .. _class_@GlobalScope_constant_SIDE_TOP:
  335. .. rst-class:: classref-enumeration-constant
  336. :ref:`Side<enum_@GlobalScope_Side>` **SIDE_TOP** = ``1``
  337. Top side, usually used for :ref:`Control<class_Control>` or :ref:`StyleBox<class_StyleBox>`-derived classes.
  338. .. _class_@GlobalScope_constant_SIDE_RIGHT:
  339. .. rst-class:: classref-enumeration-constant
  340. :ref:`Side<enum_@GlobalScope_Side>` **SIDE_RIGHT** = ``2``
  341. Right side, usually used for :ref:`Control<class_Control>` or :ref:`StyleBox<class_StyleBox>`-derived classes.
  342. .. _class_@GlobalScope_constant_SIDE_BOTTOM:
  343. .. rst-class:: classref-enumeration-constant
  344. :ref:`Side<enum_@GlobalScope_Side>` **SIDE_BOTTOM** = ``3``
  345. Bottom side, usually used for :ref:`Control<class_Control>` or :ref:`StyleBox<class_StyleBox>`-derived classes.
  346. .. rst-class:: classref-item-separator
  347. ----
  348. .. _enum_@GlobalScope_Corner:
  349. .. rst-class:: classref-enumeration
  350. enum **Corner**:
  351. .. _class_@GlobalScope_constant_CORNER_TOP_LEFT:
  352. .. rst-class:: classref-enumeration-constant
  353. :ref:`Corner<enum_@GlobalScope_Corner>` **CORNER_TOP_LEFT** = ``0``
  354. Top-left corner.
  355. .. _class_@GlobalScope_constant_CORNER_TOP_RIGHT:
  356. .. rst-class:: classref-enumeration-constant
  357. :ref:`Corner<enum_@GlobalScope_Corner>` **CORNER_TOP_RIGHT** = ``1``
  358. Top-right corner.
  359. .. _class_@GlobalScope_constant_CORNER_BOTTOM_RIGHT:
  360. .. rst-class:: classref-enumeration-constant
  361. :ref:`Corner<enum_@GlobalScope_Corner>` **CORNER_BOTTOM_RIGHT** = ``2``
  362. Bottom-right corner.
  363. .. _class_@GlobalScope_constant_CORNER_BOTTOM_LEFT:
  364. .. rst-class:: classref-enumeration-constant
  365. :ref:`Corner<enum_@GlobalScope_Corner>` **CORNER_BOTTOM_LEFT** = ``3``
  366. Bottom-left corner.
  367. .. rst-class:: classref-item-separator
  368. ----
  369. .. _enum_@GlobalScope_Orientation:
  370. .. rst-class:: classref-enumeration
  371. enum **Orientation**:
  372. .. _class_@GlobalScope_constant_VERTICAL:
  373. .. rst-class:: classref-enumeration-constant
  374. :ref:`Orientation<enum_@GlobalScope_Orientation>` **VERTICAL** = ``1``
  375. General vertical alignment, usually used for :ref:`Separator<class_Separator>`, :ref:`ScrollBar<class_ScrollBar>`, :ref:`Slider<class_Slider>`, etc.
  376. .. _class_@GlobalScope_constant_HORIZONTAL:
  377. .. rst-class:: classref-enumeration-constant
  378. :ref:`Orientation<enum_@GlobalScope_Orientation>` **HORIZONTAL** = ``0``
  379. General horizontal alignment, usually used for :ref:`Separator<class_Separator>`, :ref:`ScrollBar<class_ScrollBar>`, :ref:`Slider<class_Slider>`, etc.
  380. .. rst-class:: classref-item-separator
  381. ----
  382. .. _enum_@GlobalScope_ClockDirection:
  383. .. rst-class:: classref-enumeration
  384. enum **ClockDirection**:
  385. .. _class_@GlobalScope_constant_CLOCKWISE:
  386. .. rst-class:: classref-enumeration-constant
  387. :ref:`ClockDirection<enum_@GlobalScope_ClockDirection>` **CLOCKWISE** = ``0``
  388. Clockwise rotation. Used by some methods (e.g. :ref:`Image.rotate_90<class_Image_method_rotate_90>`).
  389. .. _class_@GlobalScope_constant_COUNTERCLOCKWISE:
  390. .. rst-class:: classref-enumeration-constant
  391. :ref:`ClockDirection<enum_@GlobalScope_ClockDirection>` **COUNTERCLOCKWISE** = ``1``
  392. Counter-clockwise rotation. Used by some methods (e.g. :ref:`Image.rotate_90<class_Image_method_rotate_90>`).
  393. .. rst-class:: classref-item-separator
  394. ----
  395. .. _enum_@GlobalScope_HorizontalAlignment:
  396. .. rst-class:: classref-enumeration
  397. enum **HorizontalAlignment**:
  398. .. _class_@GlobalScope_constant_HORIZONTAL_ALIGNMENT_LEFT:
  399. .. rst-class:: classref-enumeration-constant
  400. :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **HORIZONTAL_ALIGNMENT_LEFT** = ``0``
  401. Horizontal left alignment, usually for text-derived classes.
  402. .. _class_@GlobalScope_constant_HORIZONTAL_ALIGNMENT_CENTER:
  403. .. rst-class:: classref-enumeration-constant
  404. :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **HORIZONTAL_ALIGNMENT_CENTER** = ``1``
  405. Horizontal center alignment, usually for text-derived classes.
  406. .. _class_@GlobalScope_constant_HORIZONTAL_ALIGNMENT_RIGHT:
  407. .. rst-class:: classref-enumeration-constant
  408. :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **HORIZONTAL_ALIGNMENT_RIGHT** = ``2``
  409. Horizontal right alignment, usually for text-derived classes.
  410. .. _class_@GlobalScope_constant_HORIZONTAL_ALIGNMENT_FILL:
  411. .. rst-class:: classref-enumeration-constant
  412. :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **HORIZONTAL_ALIGNMENT_FILL** = ``3``
  413. Expand row to fit width, usually for text-derived classes.
  414. .. rst-class:: classref-item-separator
  415. ----
  416. .. _enum_@GlobalScope_VerticalAlignment:
  417. .. rst-class:: classref-enumeration
  418. enum **VerticalAlignment**:
  419. .. _class_@GlobalScope_constant_VERTICAL_ALIGNMENT_TOP:
  420. .. rst-class:: classref-enumeration-constant
  421. :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` **VERTICAL_ALIGNMENT_TOP** = ``0``
  422. Vertical top alignment, usually for text-derived classes.
  423. .. _class_@GlobalScope_constant_VERTICAL_ALIGNMENT_CENTER:
  424. .. rst-class:: classref-enumeration-constant
  425. :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` **VERTICAL_ALIGNMENT_CENTER** = ``1``
  426. Vertical center alignment, usually for text-derived classes.
  427. .. _class_@GlobalScope_constant_VERTICAL_ALIGNMENT_BOTTOM:
  428. .. rst-class:: classref-enumeration-constant
  429. :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` **VERTICAL_ALIGNMENT_BOTTOM** = ``2``
  430. Vertical bottom alignment, usually for text-derived classes.
  431. .. _class_@GlobalScope_constant_VERTICAL_ALIGNMENT_FILL:
  432. .. rst-class:: classref-enumeration-constant
  433. :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` **VERTICAL_ALIGNMENT_FILL** = ``3``
  434. Expand rows to fit height, usually for text-derived classes.
  435. .. rst-class:: classref-item-separator
  436. ----
  437. .. _enum_@GlobalScope_InlineAlignment:
  438. .. rst-class:: classref-enumeration
  439. enum **InlineAlignment**:
  440. .. _class_@GlobalScope_constant_INLINE_ALIGNMENT_TOP_TO:
  441. .. rst-class:: classref-enumeration-constant
  442. :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` **INLINE_ALIGNMENT_TOP_TO** = ``0``
  443. Aligns the top of the inline object (e.g. image, table) to the position of the text specified by ``INLINE_ALIGNMENT_TO_*`` constant.
  444. .. _class_@GlobalScope_constant_INLINE_ALIGNMENT_CENTER_TO:
  445. .. rst-class:: classref-enumeration-constant
  446. :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` **INLINE_ALIGNMENT_CENTER_TO** = ``1``
  447. Aligns the center of the inline object (e.g. image, table) to the position of the text specified by ``INLINE_ALIGNMENT_TO_*`` constant.
  448. .. _class_@GlobalScope_constant_INLINE_ALIGNMENT_BASELINE_TO:
  449. .. rst-class:: classref-enumeration-constant
  450. :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` **INLINE_ALIGNMENT_BASELINE_TO** = ``3``
  451. Aligns the baseline (user defined) of the inline object (e.g. image, table) to the position of the text specified by ``INLINE_ALIGNMENT_TO_*`` constant.
  452. .. _class_@GlobalScope_constant_INLINE_ALIGNMENT_BOTTOM_TO:
  453. .. rst-class:: classref-enumeration-constant
  454. :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` **INLINE_ALIGNMENT_BOTTOM_TO** = ``2``
  455. Aligns the bottom of the inline object (e.g. image, table) to the position of the text specified by ``INLINE_ALIGNMENT_TO_*`` constant.
  456. .. _class_@GlobalScope_constant_INLINE_ALIGNMENT_TO_TOP:
  457. .. rst-class:: classref-enumeration-constant
  458. :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` **INLINE_ALIGNMENT_TO_TOP** = ``0``
  459. Aligns the position of the inline object (e.g. image, table) specified by ``INLINE_ALIGNMENT_*_TO`` constant to the top of the text.
  460. .. _class_@GlobalScope_constant_INLINE_ALIGNMENT_TO_CENTER:
  461. .. rst-class:: classref-enumeration-constant
  462. :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` **INLINE_ALIGNMENT_TO_CENTER** = ``4``
  463. Aligns the position of the inline object (e.g. image, table) specified by ``INLINE_ALIGNMENT_*_TO`` constant to the center of the text.
  464. .. _class_@GlobalScope_constant_INLINE_ALIGNMENT_TO_BASELINE:
  465. .. rst-class:: classref-enumeration-constant
  466. :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` **INLINE_ALIGNMENT_TO_BASELINE** = ``8``
  467. Aligns the position of the inline object (e.g. image, table) specified by ``INLINE_ALIGNMENT_*_TO`` constant to the baseline of the text.
  468. .. _class_@GlobalScope_constant_INLINE_ALIGNMENT_TO_BOTTOM:
  469. .. rst-class:: classref-enumeration-constant
  470. :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` **INLINE_ALIGNMENT_TO_BOTTOM** = ``12``
  471. Aligns inline object (e.g. image, table) to the bottom of the text.
  472. .. _class_@GlobalScope_constant_INLINE_ALIGNMENT_TOP:
  473. .. rst-class:: classref-enumeration-constant
  474. :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` **INLINE_ALIGNMENT_TOP** = ``0``
  475. Aligns top of the inline object (e.g. image, table) to the top of the text. Equivalent to ``INLINE_ALIGNMENT_TOP_TO | INLINE_ALIGNMENT_TO_TOP``.
  476. .. _class_@GlobalScope_constant_INLINE_ALIGNMENT_CENTER:
  477. .. rst-class:: classref-enumeration-constant
  478. :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` **INLINE_ALIGNMENT_CENTER** = ``5``
  479. Aligns center of the inline object (e.g. image, table) to the center of the text. Equivalent to ``INLINE_ALIGNMENT_CENTER_TO | INLINE_ALIGNMENT_TO_CENTER``.
  480. .. _class_@GlobalScope_constant_INLINE_ALIGNMENT_BOTTOM:
  481. .. rst-class:: classref-enumeration-constant
  482. :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` **INLINE_ALIGNMENT_BOTTOM** = ``14``
  483. Aligns bottom of the inline object (e.g. image, table) to the bottom of the text. Equivalent to ``INLINE_ALIGNMENT_BOTTOM_TO | INLINE_ALIGNMENT_TO_BOTTOM``.
  484. .. _class_@GlobalScope_constant_INLINE_ALIGNMENT_IMAGE_MASK:
  485. .. rst-class:: classref-enumeration-constant
  486. :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` **INLINE_ALIGNMENT_IMAGE_MASK** = ``3``
  487. A bit mask for ``INLINE_ALIGNMENT_*_TO`` alignment constants.
  488. .. _class_@GlobalScope_constant_INLINE_ALIGNMENT_TEXT_MASK:
  489. .. rst-class:: classref-enumeration-constant
  490. :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` **INLINE_ALIGNMENT_TEXT_MASK** = ``12``
  491. A bit mask for ``INLINE_ALIGNMENT_TO_*`` alignment constants.
  492. .. rst-class:: classref-item-separator
  493. ----
  494. .. _enum_@GlobalScope_EulerOrder:
  495. .. rst-class:: classref-enumeration
  496. enum **EulerOrder**:
  497. .. _class_@GlobalScope_constant_EULER_ORDER_XYZ:
  498. .. rst-class:: classref-enumeration-constant
  499. :ref:`EulerOrder<enum_@GlobalScope_EulerOrder>` **EULER_ORDER_XYZ** = ``0``
  500. Specifies that Euler angles should be in XYZ order. When composing, the order is X, Y, Z. When decomposing, the order is reversed, first Z, then Y, and X last.
  501. .. _class_@GlobalScope_constant_EULER_ORDER_XZY:
  502. .. rst-class:: classref-enumeration-constant
  503. :ref:`EulerOrder<enum_@GlobalScope_EulerOrder>` **EULER_ORDER_XZY** = ``1``
  504. Specifies that Euler angles should be in XZY order. When composing, the order is X, Z, Y. When decomposing, the order is reversed, first Y, then Z, and X last.
  505. .. _class_@GlobalScope_constant_EULER_ORDER_YXZ:
  506. .. rst-class:: classref-enumeration-constant
  507. :ref:`EulerOrder<enum_@GlobalScope_EulerOrder>` **EULER_ORDER_YXZ** = ``2``
  508. Specifies that Euler angles should be in YXZ order. When composing, the order is Y, X, Z. When decomposing, the order is reversed, first Z, then X, and Y last.
  509. .. _class_@GlobalScope_constant_EULER_ORDER_YZX:
  510. .. rst-class:: classref-enumeration-constant
  511. :ref:`EulerOrder<enum_@GlobalScope_EulerOrder>` **EULER_ORDER_YZX** = ``3``
  512. Specifies that Euler angles should be in YZX order. When composing, the order is Y, Z, X. When decomposing, the order is reversed, first X, then Z, and Y last.
  513. .. _class_@GlobalScope_constant_EULER_ORDER_ZXY:
  514. .. rst-class:: classref-enumeration-constant
  515. :ref:`EulerOrder<enum_@GlobalScope_EulerOrder>` **EULER_ORDER_ZXY** = ``4``
  516. Specifies that Euler angles should be in ZXY order. When composing, the order is Z, X, Y. When decomposing, the order is reversed, first Y, then X, and Z last.
  517. .. _class_@GlobalScope_constant_EULER_ORDER_ZYX:
  518. .. rst-class:: classref-enumeration-constant
  519. :ref:`EulerOrder<enum_@GlobalScope_EulerOrder>` **EULER_ORDER_ZYX** = ``5``
  520. Specifies that Euler angles should be in ZYX order. When composing, the order is Z, Y, X. When decomposing, the order is reversed, first X, then Y, and Z last.
  521. .. rst-class:: classref-item-separator
  522. ----
  523. .. _enum_@GlobalScope_Key:
  524. .. rst-class:: classref-enumeration
  525. enum **Key**:
  526. .. _class_@GlobalScope_constant_KEY_NONE:
  527. .. rst-class:: classref-enumeration-constant
  528. :ref:`Key<enum_@GlobalScope_Key>` **KEY_NONE** = ``0``
  529. Enum value which doesn't correspond to any key. This is used to initialize :ref:`Key<enum_@GlobalScope_Key>` properties with a generic state.
  530. .. _class_@GlobalScope_constant_KEY_SPECIAL:
  531. .. rst-class:: classref-enumeration-constant
  532. :ref:`Key<enum_@GlobalScope_Key>` **KEY_SPECIAL** = ``4194304``
  533. Keycodes with this bit applied are non-printable.
  534. .. _class_@GlobalScope_constant_KEY_ESCAPE:
  535. .. rst-class:: classref-enumeration-constant
  536. :ref:`Key<enum_@GlobalScope_Key>` **KEY_ESCAPE** = ``4194305``
  537. Escape key.
  538. .. _class_@GlobalScope_constant_KEY_TAB:
  539. .. rst-class:: classref-enumeration-constant
  540. :ref:`Key<enum_@GlobalScope_Key>` **KEY_TAB** = ``4194306``
  541. Tab key.
  542. .. _class_@GlobalScope_constant_KEY_BACKTAB:
  543. .. rst-class:: classref-enumeration-constant
  544. :ref:`Key<enum_@GlobalScope_Key>` **KEY_BACKTAB** = ``4194307``
  545. Shift + Tab key.
  546. .. _class_@GlobalScope_constant_KEY_BACKSPACE:
  547. .. rst-class:: classref-enumeration-constant
  548. :ref:`Key<enum_@GlobalScope_Key>` **KEY_BACKSPACE** = ``4194308``
  549. Backspace key.
  550. .. _class_@GlobalScope_constant_KEY_ENTER:
  551. .. rst-class:: classref-enumeration-constant
  552. :ref:`Key<enum_@GlobalScope_Key>` **KEY_ENTER** = ``4194309``
  553. Return key (on the main keyboard).
  554. .. _class_@GlobalScope_constant_KEY_KP_ENTER:
  555. .. rst-class:: classref-enumeration-constant
  556. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_ENTER** = ``4194310``
  557. Enter key on the numeric keypad.
  558. .. _class_@GlobalScope_constant_KEY_INSERT:
  559. .. rst-class:: classref-enumeration-constant
  560. :ref:`Key<enum_@GlobalScope_Key>` **KEY_INSERT** = ``4194311``
  561. Insert key.
  562. .. _class_@GlobalScope_constant_KEY_DELETE:
  563. .. rst-class:: classref-enumeration-constant
  564. :ref:`Key<enum_@GlobalScope_Key>` **KEY_DELETE** = ``4194312``
  565. Delete key.
  566. .. _class_@GlobalScope_constant_KEY_PAUSE:
  567. .. rst-class:: classref-enumeration-constant
  568. :ref:`Key<enum_@GlobalScope_Key>` **KEY_PAUSE** = ``4194313``
  569. Pause key.
  570. .. _class_@GlobalScope_constant_KEY_PRINT:
  571. .. rst-class:: classref-enumeration-constant
  572. :ref:`Key<enum_@GlobalScope_Key>` **KEY_PRINT** = ``4194314``
  573. Print Screen key.
  574. .. _class_@GlobalScope_constant_KEY_SYSREQ:
  575. .. rst-class:: classref-enumeration-constant
  576. :ref:`Key<enum_@GlobalScope_Key>` **KEY_SYSREQ** = ``4194315``
  577. System Request key.
  578. .. _class_@GlobalScope_constant_KEY_CLEAR:
  579. .. rst-class:: classref-enumeration-constant
  580. :ref:`Key<enum_@GlobalScope_Key>` **KEY_CLEAR** = ``4194316``
  581. Clear key.
  582. .. _class_@GlobalScope_constant_KEY_HOME:
  583. .. rst-class:: classref-enumeration-constant
  584. :ref:`Key<enum_@GlobalScope_Key>` **KEY_HOME** = ``4194317``
  585. Home key.
  586. .. _class_@GlobalScope_constant_KEY_END:
  587. .. rst-class:: classref-enumeration-constant
  588. :ref:`Key<enum_@GlobalScope_Key>` **KEY_END** = ``4194318``
  589. End key.
  590. .. _class_@GlobalScope_constant_KEY_LEFT:
  591. .. rst-class:: classref-enumeration-constant
  592. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LEFT** = ``4194319``
  593. Left arrow key.
  594. .. _class_@GlobalScope_constant_KEY_UP:
  595. .. rst-class:: classref-enumeration-constant
  596. :ref:`Key<enum_@GlobalScope_Key>` **KEY_UP** = ``4194320``
  597. Up arrow key.
  598. .. _class_@GlobalScope_constant_KEY_RIGHT:
  599. .. rst-class:: classref-enumeration-constant
  600. :ref:`Key<enum_@GlobalScope_Key>` **KEY_RIGHT** = ``4194321``
  601. Right arrow key.
  602. .. _class_@GlobalScope_constant_KEY_DOWN:
  603. .. rst-class:: classref-enumeration-constant
  604. :ref:`Key<enum_@GlobalScope_Key>` **KEY_DOWN** = ``4194322``
  605. Down arrow key.
  606. .. _class_@GlobalScope_constant_KEY_PAGEUP:
  607. .. rst-class:: classref-enumeration-constant
  608. :ref:`Key<enum_@GlobalScope_Key>` **KEY_PAGEUP** = ``4194323``
  609. Page Up key.
  610. .. _class_@GlobalScope_constant_KEY_PAGEDOWN:
  611. .. rst-class:: classref-enumeration-constant
  612. :ref:`Key<enum_@GlobalScope_Key>` **KEY_PAGEDOWN** = ``4194324``
  613. Page Down key.
  614. .. _class_@GlobalScope_constant_KEY_SHIFT:
  615. .. rst-class:: classref-enumeration-constant
  616. :ref:`Key<enum_@GlobalScope_Key>` **KEY_SHIFT** = ``4194325``
  617. Shift key.
  618. .. _class_@GlobalScope_constant_KEY_CTRL:
  619. .. rst-class:: classref-enumeration-constant
  620. :ref:`Key<enum_@GlobalScope_Key>` **KEY_CTRL** = ``4194326``
  621. Control key.
  622. .. _class_@GlobalScope_constant_KEY_META:
  623. .. rst-class:: classref-enumeration-constant
  624. :ref:`Key<enum_@GlobalScope_Key>` **KEY_META** = ``4194327``
  625. Meta key.
  626. .. _class_@GlobalScope_constant_KEY_ALT:
  627. .. rst-class:: classref-enumeration-constant
  628. :ref:`Key<enum_@GlobalScope_Key>` **KEY_ALT** = ``4194328``
  629. Alt key.
  630. .. _class_@GlobalScope_constant_KEY_CAPSLOCK:
  631. .. rst-class:: classref-enumeration-constant
  632. :ref:`Key<enum_@GlobalScope_Key>` **KEY_CAPSLOCK** = ``4194329``
  633. Caps Lock key.
  634. .. _class_@GlobalScope_constant_KEY_NUMLOCK:
  635. .. rst-class:: classref-enumeration-constant
  636. :ref:`Key<enum_@GlobalScope_Key>` **KEY_NUMLOCK** = ``4194330``
  637. Num Lock key.
  638. .. _class_@GlobalScope_constant_KEY_SCROLLLOCK:
  639. .. rst-class:: classref-enumeration-constant
  640. :ref:`Key<enum_@GlobalScope_Key>` **KEY_SCROLLLOCK** = ``4194331``
  641. Scroll Lock key.
  642. .. _class_@GlobalScope_constant_KEY_F1:
  643. .. rst-class:: classref-enumeration-constant
  644. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F1** = ``4194332``
  645. F1 key.
  646. .. _class_@GlobalScope_constant_KEY_F2:
  647. .. rst-class:: classref-enumeration-constant
  648. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F2** = ``4194333``
  649. F2 key.
  650. .. _class_@GlobalScope_constant_KEY_F3:
  651. .. rst-class:: classref-enumeration-constant
  652. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F3** = ``4194334``
  653. F3 key.
  654. .. _class_@GlobalScope_constant_KEY_F4:
  655. .. rst-class:: classref-enumeration-constant
  656. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F4** = ``4194335``
  657. F4 key.
  658. .. _class_@GlobalScope_constant_KEY_F5:
  659. .. rst-class:: classref-enumeration-constant
  660. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F5** = ``4194336``
  661. F5 key.
  662. .. _class_@GlobalScope_constant_KEY_F6:
  663. .. rst-class:: classref-enumeration-constant
  664. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F6** = ``4194337``
  665. F6 key.
  666. .. _class_@GlobalScope_constant_KEY_F7:
  667. .. rst-class:: classref-enumeration-constant
  668. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F7** = ``4194338``
  669. F7 key.
  670. .. _class_@GlobalScope_constant_KEY_F8:
  671. .. rst-class:: classref-enumeration-constant
  672. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F8** = ``4194339``
  673. F8 key.
  674. .. _class_@GlobalScope_constant_KEY_F9:
  675. .. rst-class:: classref-enumeration-constant
  676. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F9** = ``4194340``
  677. F9 key.
  678. .. _class_@GlobalScope_constant_KEY_F10:
  679. .. rst-class:: classref-enumeration-constant
  680. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F10** = ``4194341``
  681. F10 key.
  682. .. _class_@GlobalScope_constant_KEY_F11:
  683. .. rst-class:: classref-enumeration-constant
  684. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F11** = ``4194342``
  685. F11 key.
  686. .. _class_@GlobalScope_constant_KEY_F12:
  687. .. rst-class:: classref-enumeration-constant
  688. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F12** = ``4194343``
  689. F12 key.
  690. .. _class_@GlobalScope_constant_KEY_F13:
  691. .. rst-class:: classref-enumeration-constant
  692. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F13** = ``4194344``
  693. F13 key.
  694. .. _class_@GlobalScope_constant_KEY_F14:
  695. .. rst-class:: classref-enumeration-constant
  696. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F14** = ``4194345``
  697. F14 key.
  698. .. _class_@GlobalScope_constant_KEY_F15:
  699. .. rst-class:: classref-enumeration-constant
  700. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F15** = ``4194346``
  701. F15 key.
  702. .. _class_@GlobalScope_constant_KEY_F16:
  703. .. rst-class:: classref-enumeration-constant
  704. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F16** = ``4194347``
  705. F16 key.
  706. .. _class_@GlobalScope_constant_KEY_F17:
  707. .. rst-class:: classref-enumeration-constant
  708. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F17** = ``4194348``
  709. F17 key.
  710. .. _class_@GlobalScope_constant_KEY_F18:
  711. .. rst-class:: classref-enumeration-constant
  712. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F18** = ``4194349``
  713. F18 key.
  714. .. _class_@GlobalScope_constant_KEY_F19:
  715. .. rst-class:: classref-enumeration-constant
  716. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F19** = ``4194350``
  717. F19 key.
  718. .. _class_@GlobalScope_constant_KEY_F20:
  719. .. rst-class:: classref-enumeration-constant
  720. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F20** = ``4194351``
  721. F20 key.
  722. .. _class_@GlobalScope_constant_KEY_F21:
  723. .. rst-class:: classref-enumeration-constant
  724. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F21** = ``4194352``
  725. F21 key.
  726. .. _class_@GlobalScope_constant_KEY_F22:
  727. .. rst-class:: classref-enumeration-constant
  728. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F22** = ``4194353``
  729. F22 key.
  730. .. _class_@GlobalScope_constant_KEY_F23:
  731. .. rst-class:: classref-enumeration-constant
  732. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F23** = ``4194354``
  733. F23 key.
  734. .. _class_@GlobalScope_constant_KEY_F24:
  735. .. rst-class:: classref-enumeration-constant
  736. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F24** = ``4194355``
  737. F24 key.
  738. .. _class_@GlobalScope_constant_KEY_F25:
  739. .. rst-class:: classref-enumeration-constant
  740. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F25** = ``4194356``
  741. F25 key. Only supported on macOS and Linux due to a Windows limitation.
  742. .. _class_@GlobalScope_constant_KEY_F26:
  743. .. rst-class:: classref-enumeration-constant
  744. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F26** = ``4194357``
  745. F26 key. Only supported on macOS and Linux due to a Windows limitation.
  746. .. _class_@GlobalScope_constant_KEY_F27:
  747. .. rst-class:: classref-enumeration-constant
  748. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F27** = ``4194358``
  749. F27 key. Only supported on macOS and Linux due to a Windows limitation.
  750. .. _class_@GlobalScope_constant_KEY_F28:
  751. .. rst-class:: classref-enumeration-constant
  752. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F28** = ``4194359``
  753. F28 key. Only supported on macOS and Linux due to a Windows limitation.
  754. .. _class_@GlobalScope_constant_KEY_F29:
  755. .. rst-class:: classref-enumeration-constant
  756. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F29** = ``4194360``
  757. F29 key. Only supported on macOS and Linux due to a Windows limitation.
  758. .. _class_@GlobalScope_constant_KEY_F30:
  759. .. rst-class:: classref-enumeration-constant
  760. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F30** = ``4194361``
  761. F30 key. Only supported on macOS and Linux due to a Windows limitation.
  762. .. _class_@GlobalScope_constant_KEY_F31:
  763. .. rst-class:: classref-enumeration-constant
  764. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F31** = ``4194362``
  765. F31 key. Only supported on macOS and Linux due to a Windows limitation.
  766. .. _class_@GlobalScope_constant_KEY_F32:
  767. .. rst-class:: classref-enumeration-constant
  768. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F32** = ``4194363``
  769. F32 key. Only supported on macOS and Linux due to a Windows limitation.
  770. .. _class_@GlobalScope_constant_KEY_F33:
  771. .. rst-class:: classref-enumeration-constant
  772. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F33** = ``4194364``
  773. F33 key. Only supported on macOS and Linux due to a Windows limitation.
  774. .. _class_@GlobalScope_constant_KEY_F34:
  775. .. rst-class:: classref-enumeration-constant
  776. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F34** = ``4194365``
  777. F34 key. Only supported on macOS and Linux due to a Windows limitation.
  778. .. _class_@GlobalScope_constant_KEY_F35:
  779. .. rst-class:: classref-enumeration-constant
  780. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F35** = ``4194366``
  781. F35 key. Only supported on macOS and Linux due to a Windows limitation.
  782. .. _class_@GlobalScope_constant_KEY_KP_MULTIPLY:
  783. .. rst-class:: classref-enumeration-constant
  784. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_MULTIPLY** = ``4194433``
  785. Multiply (\*) key on the numeric keypad.
  786. .. _class_@GlobalScope_constant_KEY_KP_DIVIDE:
  787. .. rst-class:: classref-enumeration-constant
  788. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_DIVIDE** = ``4194434``
  789. Divide (/) key on the numeric keypad.
  790. .. _class_@GlobalScope_constant_KEY_KP_SUBTRACT:
  791. .. rst-class:: classref-enumeration-constant
  792. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_SUBTRACT** = ``4194435``
  793. Subtract (-) key on the numeric keypad.
  794. .. _class_@GlobalScope_constant_KEY_KP_PERIOD:
  795. .. rst-class:: classref-enumeration-constant
  796. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_PERIOD** = ``4194436``
  797. Period (.) key on the numeric keypad.
  798. .. _class_@GlobalScope_constant_KEY_KP_ADD:
  799. .. rst-class:: classref-enumeration-constant
  800. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_ADD** = ``4194437``
  801. Add (+) key on the numeric keypad.
  802. .. _class_@GlobalScope_constant_KEY_KP_0:
  803. .. rst-class:: classref-enumeration-constant
  804. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_0** = ``4194438``
  805. Number 0 on the numeric keypad.
  806. .. _class_@GlobalScope_constant_KEY_KP_1:
  807. .. rst-class:: classref-enumeration-constant
  808. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_1** = ``4194439``
  809. Number 1 on the numeric keypad.
  810. .. _class_@GlobalScope_constant_KEY_KP_2:
  811. .. rst-class:: classref-enumeration-constant
  812. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_2** = ``4194440``
  813. Number 2 on the numeric keypad.
  814. .. _class_@GlobalScope_constant_KEY_KP_3:
  815. .. rst-class:: classref-enumeration-constant
  816. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_3** = ``4194441``
  817. Number 3 on the numeric keypad.
  818. .. _class_@GlobalScope_constant_KEY_KP_4:
  819. .. rst-class:: classref-enumeration-constant
  820. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_4** = ``4194442``
  821. Number 4 on the numeric keypad.
  822. .. _class_@GlobalScope_constant_KEY_KP_5:
  823. .. rst-class:: classref-enumeration-constant
  824. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_5** = ``4194443``
  825. Number 5 on the numeric keypad.
  826. .. _class_@GlobalScope_constant_KEY_KP_6:
  827. .. rst-class:: classref-enumeration-constant
  828. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_6** = ``4194444``
  829. Number 6 on the numeric keypad.
  830. .. _class_@GlobalScope_constant_KEY_KP_7:
  831. .. rst-class:: classref-enumeration-constant
  832. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_7** = ``4194445``
  833. Number 7 on the numeric keypad.
  834. .. _class_@GlobalScope_constant_KEY_KP_8:
  835. .. rst-class:: classref-enumeration-constant
  836. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_8** = ``4194446``
  837. Number 8 on the numeric keypad.
  838. .. _class_@GlobalScope_constant_KEY_KP_9:
  839. .. rst-class:: classref-enumeration-constant
  840. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_9** = ``4194447``
  841. Number 9 on the numeric keypad.
  842. .. _class_@GlobalScope_constant_KEY_MENU:
  843. .. rst-class:: classref-enumeration-constant
  844. :ref:`Key<enum_@GlobalScope_Key>` **KEY_MENU** = ``4194370``
  845. Context menu key.
  846. .. _class_@GlobalScope_constant_KEY_HYPER:
  847. .. rst-class:: classref-enumeration-constant
  848. :ref:`Key<enum_@GlobalScope_Key>` **KEY_HYPER** = ``4194371``
  849. Hyper key. (On Linux/X11 only).
  850. .. _class_@GlobalScope_constant_KEY_HELP:
  851. .. rst-class:: classref-enumeration-constant
  852. :ref:`Key<enum_@GlobalScope_Key>` **KEY_HELP** = ``4194373``
  853. Help key.
  854. .. _class_@GlobalScope_constant_KEY_BACK:
  855. .. rst-class:: classref-enumeration-constant
  856. :ref:`Key<enum_@GlobalScope_Key>` **KEY_BACK** = ``4194376``
  857. Media back key. Not to be confused with the Back button on an Android device.
  858. .. _class_@GlobalScope_constant_KEY_FORWARD:
  859. .. rst-class:: classref-enumeration-constant
  860. :ref:`Key<enum_@GlobalScope_Key>` **KEY_FORWARD** = ``4194377``
  861. Media forward key.
  862. .. _class_@GlobalScope_constant_KEY_STOP:
  863. .. rst-class:: classref-enumeration-constant
  864. :ref:`Key<enum_@GlobalScope_Key>` **KEY_STOP** = ``4194378``
  865. Media stop key.
  866. .. _class_@GlobalScope_constant_KEY_REFRESH:
  867. .. rst-class:: classref-enumeration-constant
  868. :ref:`Key<enum_@GlobalScope_Key>` **KEY_REFRESH** = ``4194379``
  869. Media refresh key.
  870. .. _class_@GlobalScope_constant_KEY_VOLUMEDOWN:
  871. .. rst-class:: classref-enumeration-constant
  872. :ref:`Key<enum_@GlobalScope_Key>` **KEY_VOLUMEDOWN** = ``4194380``
  873. Volume down key.
  874. .. _class_@GlobalScope_constant_KEY_VOLUMEMUTE:
  875. .. rst-class:: classref-enumeration-constant
  876. :ref:`Key<enum_@GlobalScope_Key>` **KEY_VOLUMEMUTE** = ``4194381``
  877. Mute volume key.
  878. .. _class_@GlobalScope_constant_KEY_VOLUMEUP:
  879. .. rst-class:: classref-enumeration-constant
  880. :ref:`Key<enum_@GlobalScope_Key>` **KEY_VOLUMEUP** = ``4194382``
  881. Volume up key.
  882. .. _class_@GlobalScope_constant_KEY_MEDIAPLAY:
  883. .. rst-class:: classref-enumeration-constant
  884. :ref:`Key<enum_@GlobalScope_Key>` **KEY_MEDIAPLAY** = ``4194388``
  885. Media play key.
  886. .. _class_@GlobalScope_constant_KEY_MEDIASTOP:
  887. .. rst-class:: classref-enumeration-constant
  888. :ref:`Key<enum_@GlobalScope_Key>` **KEY_MEDIASTOP** = ``4194389``
  889. Media stop key.
  890. .. _class_@GlobalScope_constant_KEY_MEDIAPREVIOUS:
  891. .. rst-class:: classref-enumeration-constant
  892. :ref:`Key<enum_@GlobalScope_Key>` **KEY_MEDIAPREVIOUS** = ``4194390``
  893. Previous song key.
  894. .. _class_@GlobalScope_constant_KEY_MEDIANEXT:
  895. .. rst-class:: classref-enumeration-constant
  896. :ref:`Key<enum_@GlobalScope_Key>` **KEY_MEDIANEXT** = ``4194391``
  897. Next song key.
  898. .. _class_@GlobalScope_constant_KEY_MEDIARECORD:
  899. .. rst-class:: classref-enumeration-constant
  900. :ref:`Key<enum_@GlobalScope_Key>` **KEY_MEDIARECORD** = ``4194392``
  901. Media record key.
  902. .. _class_@GlobalScope_constant_KEY_HOMEPAGE:
  903. .. rst-class:: classref-enumeration-constant
  904. :ref:`Key<enum_@GlobalScope_Key>` **KEY_HOMEPAGE** = ``4194393``
  905. Home page key.
  906. .. _class_@GlobalScope_constant_KEY_FAVORITES:
  907. .. rst-class:: classref-enumeration-constant
  908. :ref:`Key<enum_@GlobalScope_Key>` **KEY_FAVORITES** = ``4194394``
  909. Favorites key.
  910. .. _class_@GlobalScope_constant_KEY_SEARCH:
  911. .. rst-class:: classref-enumeration-constant
  912. :ref:`Key<enum_@GlobalScope_Key>` **KEY_SEARCH** = ``4194395``
  913. Search key.
  914. .. _class_@GlobalScope_constant_KEY_STANDBY:
  915. .. rst-class:: classref-enumeration-constant
  916. :ref:`Key<enum_@GlobalScope_Key>` **KEY_STANDBY** = ``4194396``
  917. Standby key.
  918. .. _class_@GlobalScope_constant_KEY_OPENURL:
  919. .. rst-class:: classref-enumeration-constant
  920. :ref:`Key<enum_@GlobalScope_Key>` **KEY_OPENURL** = ``4194397``
  921. Open URL / Launch Browser key.
  922. .. _class_@GlobalScope_constant_KEY_LAUNCHMAIL:
  923. .. rst-class:: classref-enumeration-constant
  924. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCHMAIL** = ``4194398``
  925. Launch Mail key.
  926. .. _class_@GlobalScope_constant_KEY_LAUNCHMEDIA:
  927. .. rst-class:: classref-enumeration-constant
  928. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCHMEDIA** = ``4194399``
  929. Launch Media key.
  930. .. _class_@GlobalScope_constant_KEY_LAUNCH0:
  931. .. rst-class:: classref-enumeration-constant
  932. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCH0** = ``4194400``
  933. Launch Shortcut 0 key.
  934. .. _class_@GlobalScope_constant_KEY_LAUNCH1:
  935. .. rst-class:: classref-enumeration-constant
  936. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCH1** = ``4194401``
  937. Launch Shortcut 1 key.
  938. .. _class_@GlobalScope_constant_KEY_LAUNCH2:
  939. .. rst-class:: classref-enumeration-constant
  940. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCH2** = ``4194402``
  941. Launch Shortcut 2 key.
  942. .. _class_@GlobalScope_constant_KEY_LAUNCH3:
  943. .. rst-class:: classref-enumeration-constant
  944. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCH3** = ``4194403``
  945. Launch Shortcut 3 key.
  946. .. _class_@GlobalScope_constant_KEY_LAUNCH4:
  947. .. rst-class:: classref-enumeration-constant
  948. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCH4** = ``4194404``
  949. Launch Shortcut 4 key.
  950. .. _class_@GlobalScope_constant_KEY_LAUNCH5:
  951. .. rst-class:: classref-enumeration-constant
  952. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCH5** = ``4194405``
  953. Launch Shortcut 5 key.
  954. .. _class_@GlobalScope_constant_KEY_LAUNCH6:
  955. .. rst-class:: classref-enumeration-constant
  956. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCH6** = ``4194406``
  957. Launch Shortcut 6 key.
  958. .. _class_@GlobalScope_constant_KEY_LAUNCH7:
  959. .. rst-class:: classref-enumeration-constant
  960. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCH7** = ``4194407``
  961. Launch Shortcut 7 key.
  962. .. _class_@GlobalScope_constant_KEY_LAUNCH8:
  963. .. rst-class:: classref-enumeration-constant
  964. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCH8** = ``4194408``
  965. Launch Shortcut 8 key.
  966. .. _class_@GlobalScope_constant_KEY_LAUNCH9:
  967. .. rst-class:: classref-enumeration-constant
  968. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCH9** = ``4194409``
  969. Launch Shortcut 9 key.
  970. .. _class_@GlobalScope_constant_KEY_LAUNCHA:
  971. .. rst-class:: classref-enumeration-constant
  972. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCHA** = ``4194410``
  973. Launch Shortcut A key.
  974. .. _class_@GlobalScope_constant_KEY_LAUNCHB:
  975. .. rst-class:: classref-enumeration-constant
  976. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCHB** = ``4194411``
  977. Launch Shortcut B key.
  978. .. _class_@GlobalScope_constant_KEY_LAUNCHC:
  979. .. rst-class:: classref-enumeration-constant
  980. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCHC** = ``4194412``
  981. Launch Shortcut C key.
  982. .. _class_@GlobalScope_constant_KEY_LAUNCHD:
  983. .. rst-class:: classref-enumeration-constant
  984. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCHD** = ``4194413``
  985. Launch Shortcut D key.
  986. .. _class_@GlobalScope_constant_KEY_LAUNCHE:
  987. .. rst-class:: classref-enumeration-constant
  988. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCHE** = ``4194414``
  989. Launch Shortcut E key.
  990. .. _class_@GlobalScope_constant_KEY_LAUNCHF:
  991. .. rst-class:: classref-enumeration-constant
  992. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCHF** = ``4194415``
  993. Launch Shortcut F key.
  994. .. _class_@GlobalScope_constant_KEY_UNKNOWN:
  995. .. rst-class:: classref-enumeration-constant
  996. :ref:`Key<enum_@GlobalScope_Key>` **KEY_UNKNOWN** = ``8388607``
  997. Unknown key.
  998. .. _class_@GlobalScope_constant_KEY_SPACE:
  999. .. rst-class:: classref-enumeration-constant
  1000. :ref:`Key<enum_@GlobalScope_Key>` **KEY_SPACE** = ``32``
  1001. Space key.
  1002. .. _class_@GlobalScope_constant_KEY_EXCLAM:
  1003. .. rst-class:: classref-enumeration-constant
  1004. :ref:`Key<enum_@GlobalScope_Key>` **KEY_EXCLAM** = ``33``
  1005. ! key.
  1006. .. _class_@GlobalScope_constant_KEY_QUOTEDBL:
  1007. .. rst-class:: classref-enumeration-constant
  1008. :ref:`Key<enum_@GlobalScope_Key>` **KEY_QUOTEDBL** = ``34``
  1009. " key.
  1010. .. _class_@GlobalScope_constant_KEY_NUMBERSIGN:
  1011. .. rst-class:: classref-enumeration-constant
  1012. :ref:`Key<enum_@GlobalScope_Key>` **KEY_NUMBERSIGN** = ``35``
  1013. # key.
  1014. .. _class_@GlobalScope_constant_KEY_DOLLAR:
  1015. .. rst-class:: classref-enumeration-constant
  1016. :ref:`Key<enum_@GlobalScope_Key>` **KEY_DOLLAR** = ``36``
  1017. $ key.
  1018. .. _class_@GlobalScope_constant_KEY_PERCENT:
  1019. .. rst-class:: classref-enumeration-constant
  1020. :ref:`Key<enum_@GlobalScope_Key>` **KEY_PERCENT** = ``37``
  1021. % key.
  1022. .. _class_@GlobalScope_constant_KEY_AMPERSAND:
  1023. .. rst-class:: classref-enumeration-constant
  1024. :ref:`Key<enum_@GlobalScope_Key>` **KEY_AMPERSAND** = ``38``
  1025. & key.
  1026. .. _class_@GlobalScope_constant_KEY_APOSTROPHE:
  1027. .. rst-class:: classref-enumeration-constant
  1028. :ref:`Key<enum_@GlobalScope_Key>` **KEY_APOSTROPHE** = ``39``
  1029. ' key.
  1030. .. _class_@GlobalScope_constant_KEY_PARENLEFT:
  1031. .. rst-class:: classref-enumeration-constant
  1032. :ref:`Key<enum_@GlobalScope_Key>` **KEY_PARENLEFT** = ``40``
  1033. ( key.
  1034. .. _class_@GlobalScope_constant_KEY_PARENRIGHT:
  1035. .. rst-class:: classref-enumeration-constant
  1036. :ref:`Key<enum_@GlobalScope_Key>` **KEY_PARENRIGHT** = ``41``
  1037. ) key.
  1038. .. _class_@GlobalScope_constant_KEY_ASTERISK:
  1039. .. rst-class:: classref-enumeration-constant
  1040. :ref:`Key<enum_@GlobalScope_Key>` **KEY_ASTERISK** = ``42``
  1041. \* key.
  1042. .. _class_@GlobalScope_constant_KEY_PLUS:
  1043. .. rst-class:: classref-enumeration-constant
  1044. :ref:`Key<enum_@GlobalScope_Key>` **KEY_PLUS** = ``43``
  1045. + key.
  1046. .. _class_@GlobalScope_constant_KEY_COMMA:
  1047. .. rst-class:: classref-enumeration-constant
  1048. :ref:`Key<enum_@GlobalScope_Key>` **KEY_COMMA** = ``44``
  1049. , key.
  1050. .. _class_@GlobalScope_constant_KEY_MINUS:
  1051. .. rst-class:: classref-enumeration-constant
  1052. :ref:`Key<enum_@GlobalScope_Key>` **KEY_MINUS** = ``45``
  1053. - key.
  1054. .. _class_@GlobalScope_constant_KEY_PERIOD:
  1055. .. rst-class:: classref-enumeration-constant
  1056. :ref:`Key<enum_@GlobalScope_Key>` **KEY_PERIOD** = ``46``
  1057. . key.
  1058. .. _class_@GlobalScope_constant_KEY_SLASH:
  1059. .. rst-class:: classref-enumeration-constant
  1060. :ref:`Key<enum_@GlobalScope_Key>` **KEY_SLASH** = ``47``
  1061. / key.
  1062. .. _class_@GlobalScope_constant_KEY_0:
  1063. .. rst-class:: classref-enumeration-constant
  1064. :ref:`Key<enum_@GlobalScope_Key>` **KEY_0** = ``48``
  1065. Number 0 key.
  1066. .. _class_@GlobalScope_constant_KEY_1:
  1067. .. rst-class:: classref-enumeration-constant
  1068. :ref:`Key<enum_@GlobalScope_Key>` **KEY_1** = ``49``
  1069. Number 1 key.
  1070. .. _class_@GlobalScope_constant_KEY_2:
  1071. .. rst-class:: classref-enumeration-constant
  1072. :ref:`Key<enum_@GlobalScope_Key>` **KEY_2** = ``50``
  1073. Number 2 key.
  1074. .. _class_@GlobalScope_constant_KEY_3:
  1075. .. rst-class:: classref-enumeration-constant
  1076. :ref:`Key<enum_@GlobalScope_Key>` **KEY_3** = ``51``
  1077. Number 3 key.
  1078. .. _class_@GlobalScope_constant_KEY_4:
  1079. .. rst-class:: classref-enumeration-constant
  1080. :ref:`Key<enum_@GlobalScope_Key>` **KEY_4** = ``52``
  1081. Number 4 key.
  1082. .. _class_@GlobalScope_constant_KEY_5:
  1083. .. rst-class:: classref-enumeration-constant
  1084. :ref:`Key<enum_@GlobalScope_Key>` **KEY_5** = ``53``
  1085. Number 5 key.
  1086. .. _class_@GlobalScope_constant_KEY_6:
  1087. .. rst-class:: classref-enumeration-constant
  1088. :ref:`Key<enum_@GlobalScope_Key>` **KEY_6** = ``54``
  1089. Number 6 key.
  1090. .. _class_@GlobalScope_constant_KEY_7:
  1091. .. rst-class:: classref-enumeration-constant
  1092. :ref:`Key<enum_@GlobalScope_Key>` **KEY_7** = ``55``
  1093. Number 7 key.
  1094. .. _class_@GlobalScope_constant_KEY_8:
  1095. .. rst-class:: classref-enumeration-constant
  1096. :ref:`Key<enum_@GlobalScope_Key>` **KEY_8** = ``56``
  1097. Number 8 key.
  1098. .. _class_@GlobalScope_constant_KEY_9:
  1099. .. rst-class:: classref-enumeration-constant
  1100. :ref:`Key<enum_@GlobalScope_Key>` **KEY_9** = ``57``
  1101. Number 9 key.
  1102. .. _class_@GlobalScope_constant_KEY_COLON:
  1103. .. rst-class:: classref-enumeration-constant
  1104. :ref:`Key<enum_@GlobalScope_Key>` **KEY_COLON** = ``58``
  1105. : key.
  1106. .. _class_@GlobalScope_constant_KEY_SEMICOLON:
  1107. .. rst-class:: classref-enumeration-constant
  1108. :ref:`Key<enum_@GlobalScope_Key>` **KEY_SEMICOLON** = ``59``
  1109. ; key.
  1110. .. _class_@GlobalScope_constant_KEY_LESS:
  1111. .. rst-class:: classref-enumeration-constant
  1112. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LESS** = ``60``
  1113. < key.
  1114. .. _class_@GlobalScope_constant_KEY_EQUAL:
  1115. .. rst-class:: classref-enumeration-constant
  1116. :ref:`Key<enum_@GlobalScope_Key>` **KEY_EQUAL** = ``61``
  1117. = key.
  1118. .. _class_@GlobalScope_constant_KEY_GREATER:
  1119. .. rst-class:: classref-enumeration-constant
  1120. :ref:`Key<enum_@GlobalScope_Key>` **KEY_GREATER** = ``62``
  1121. > key.
  1122. .. _class_@GlobalScope_constant_KEY_QUESTION:
  1123. .. rst-class:: classref-enumeration-constant
  1124. :ref:`Key<enum_@GlobalScope_Key>` **KEY_QUESTION** = ``63``
  1125. ? key.
  1126. .. _class_@GlobalScope_constant_KEY_AT:
  1127. .. rst-class:: classref-enumeration-constant
  1128. :ref:`Key<enum_@GlobalScope_Key>` **KEY_AT** = ``64``
  1129. @ key.
  1130. .. _class_@GlobalScope_constant_KEY_A:
  1131. .. rst-class:: classref-enumeration-constant
  1132. :ref:`Key<enum_@GlobalScope_Key>` **KEY_A** = ``65``
  1133. A key.
  1134. .. _class_@GlobalScope_constant_KEY_B:
  1135. .. rst-class:: classref-enumeration-constant
  1136. :ref:`Key<enum_@GlobalScope_Key>` **KEY_B** = ``66``
  1137. B key.
  1138. .. _class_@GlobalScope_constant_KEY_C:
  1139. .. rst-class:: classref-enumeration-constant
  1140. :ref:`Key<enum_@GlobalScope_Key>` **KEY_C** = ``67``
  1141. C key.
  1142. .. _class_@GlobalScope_constant_KEY_D:
  1143. .. rst-class:: classref-enumeration-constant
  1144. :ref:`Key<enum_@GlobalScope_Key>` **KEY_D** = ``68``
  1145. D key.
  1146. .. _class_@GlobalScope_constant_KEY_E:
  1147. .. rst-class:: classref-enumeration-constant
  1148. :ref:`Key<enum_@GlobalScope_Key>` **KEY_E** = ``69``
  1149. E key.
  1150. .. _class_@GlobalScope_constant_KEY_F:
  1151. .. rst-class:: classref-enumeration-constant
  1152. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F** = ``70``
  1153. F key.
  1154. .. _class_@GlobalScope_constant_KEY_G:
  1155. .. rst-class:: classref-enumeration-constant
  1156. :ref:`Key<enum_@GlobalScope_Key>` **KEY_G** = ``71``
  1157. G key.
  1158. .. _class_@GlobalScope_constant_KEY_H:
  1159. .. rst-class:: classref-enumeration-constant
  1160. :ref:`Key<enum_@GlobalScope_Key>` **KEY_H** = ``72``
  1161. H key.
  1162. .. _class_@GlobalScope_constant_KEY_I:
  1163. .. rst-class:: classref-enumeration-constant
  1164. :ref:`Key<enum_@GlobalScope_Key>` **KEY_I** = ``73``
  1165. I key.
  1166. .. _class_@GlobalScope_constant_KEY_J:
  1167. .. rst-class:: classref-enumeration-constant
  1168. :ref:`Key<enum_@GlobalScope_Key>` **KEY_J** = ``74``
  1169. J key.
  1170. .. _class_@GlobalScope_constant_KEY_K:
  1171. .. rst-class:: classref-enumeration-constant
  1172. :ref:`Key<enum_@GlobalScope_Key>` **KEY_K** = ``75``
  1173. K key.
  1174. .. _class_@GlobalScope_constant_KEY_L:
  1175. .. rst-class:: classref-enumeration-constant
  1176. :ref:`Key<enum_@GlobalScope_Key>` **KEY_L** = ``76``
  1177. L key.
  1178. .. _class_@GlobalScope_constant_KEY_M:
  1179. .. rst-class:: classref-enumeration-constant
  1180. :ref:`Key<enum_@GlobalScope_Key>` **KEY_M** = ``77``
  1181. M key.
  1182. .. _class_@GlobalScope_constant_KEY_N:
  1183. .. rst-class:: classref-enumeration-constant
  1184. :ref:`Key<enum_@GlobalScope_Key>` **KEY_N** = ``78``
  1185. N key.
  1186. .. _class_@GlobalScope_constant_KEY_O:
  1187. .. rst-class:: classref-enumeration-constant
  1188. :ref:`Key<enum_@GlobalScope_Key>` **KEY_O** = ``79``
  1189. O key.
  1190. .. _class_@GlobalScope_constant_KEY_P:
  1191. .. rst-class:: classref-enumeration-constant
  1192. :ref:`Key<enum_@GlobalScope_Key>` **KEY_P** = ``80``
  1193. P key.
  1194. .. _class_@GlobalScope_constant_KEY_Q:
  1195. .. rst-class:: classref-enumeration-constant
  1196. :ref:`Key<enum_@GlobalScope_Key>` **KEY_Q** = ``81``
  1197. Q key.
  1198. .. _class_@GlobalScope_constant_KEY_R:
  1199. .. rst-class:: classref-enumeration-constant
  1200. :ref:`Key<enum_@GlobalScope_Key>` **KEY_R** = ``82``
  1201. R key.
  1202. .. _class_@GlobalScope_constant_KEY_S:
  1203. .. rst-class:: classref-enumeration-constant
  1204. :ref:`Key<enum_@GlobalScope_Key>` **KEY_S** = ``83``
  1205. S key.
  1206. .. _class_@GlobalScope_constant_KEY_T:
  1207. .. rst-class:: classref-enumeration-constant
  1208. :ref:`Key<enum_@GlobalScope_Key>` **KEY_T** = ``84``
  1209. T key.
  1210. .. _class_@GlobalScope_constant_KEY_U:
  1211. .. rst-class:: classref-enumeration-constant
  1212. :ref:`Key<enum_@GlobalScope_Key>` **KEY_U** = ``85``
  1213. U key.
  1214. .. _class_@GlobalScope_constant_KEY_V:
  1215. .. rst-class:: classref-enumeration-constant
  1216. :ref:`Key<enum_@GlobalScope_Key>` **KEY_V** = ``86``
  1217. V key.
  1218. .. _class_@GlobalScope_constant_KEY_W:
  1219. .. rst-class:: classref-enumeration-constant
  1220. :ref:`Key<enum_@GlobalScope_Key>` **KEY_W** = ``87``
  1221. W key.
  1222. .. _class_@GlobalScope_constant_KEY_X:
  1223. .. rst-class:: classref-enumeration-constant
  1224. :ref:`Key<enum_@GlobalScope_Key>` **KEY_X** = ``88``
  1225. X key.
  1226. .. _class_@GlobalScope_constant_KEY_Y:
  1227. .. rst-class:: classref-enumeration-constant
  1228. :ref:`Key<enum_@GlobalScope_Key>` **KEY_Y** = ``89``
  1229. Y key.
  1230. .. _class_@GlobalScope_constant_KEY_Z:
  1231. .. rst-class:: classref-enumeration-constant
  1232. :ref:`Key<enum_@GlobalScope_Key>` **KEY_Z** = ``90``
  1233. Z key.
  1234. .. _class_@GlobalScope_constant_KEY_BRACKETLEFT:
  1235. .. rst-class:: classref-enumeration-constant
  1236. :ref:`Key<enum_@GlobalScope_Key>` **KEY_BRACKETLEFT** = ``91``
  1237. [ key.
  1238. .. _class_@GlobalScope_constant_KEY_BACKSLASH:
  1239. .. rst-class:: classref-enumeration-constant
  1240. :ref:`Key<enum_@GlobalScope_Key>` **KEY_BACKSLASH** = ``92``
  1241. \\ key.
  1242. .. _class_@GlobalScope_constant_KEY_BRACKETRIGHT:
  1243. .. rst-class:: classref-enumeration-constant
  1244. :ref:`Key<enum_@GlobalScope_Key>` **KEY_BRACKETRIGHT** = ``93``
  1245. ] key.
  1246. .. _class_@GlobalScope_constant_KEY_ASCIICIRCUM:
  1247. .. rst-class:: classref-enumeration-constant
  1248. :ref:`Key<enum_@GlobalScope_Key>` **KEY_ASCIICIRCUM** = ``94``
  1249. ^ key.
  1250. .. _class_@GlobalScope_constant_KEY_UNDERSCORE:
  1251. .. rst-class:: classref-enumeration-constant
  1252. :ref:`Key<enum_@GlobalScope_Key>` **KEY_UNDERSCORE** = ``95``
  1253. \_ key.
  1254. .. _class_@GlobalScope_constant_KEY_QUOTELEFT:
  1255. .. rst-class:: classref-enumeration-constant
  1256. :ref:`Key<enum_@GlobalScope_Key>` **KEY_QUOTELEFT** = ``96``
  1257. ` key.
  1258. .. _class_@GlobalScope_constant_KEY_BRACELEFT:
  1259. .. rst-class:: classref-enumeration-constant
  1260. :ref:`Key<enum_@GlobalScope_Key>` **KEY_BRACELEFT** = ``123``
  1261. { key.
  1262. .. _class_@GlobalScope_constant_KEY_BAR:
  1263. .. rst-class:: classref-enumeration-constant
  1264. :ref:`Key<enum_@GlobalScope_Key>` **KEY_BAR** = ``124``
  1265. | key.
  1266. .. _class_@GlobalScope_constant_KEY_BRACERIGHT:
  1267. .. rst-class:: classref-enumeration-constant
  1268. :ref:`Key<enum_@GlobalScope_Key>` **KEY_BRACERIGHT** = ``125``
  1269. } key.
  1270. .. _class_@GlobalScope_constant_KEY_ASCIITILDE:
  1271. .. rst-class:: classref-enumeration-constant
  1272. :ref:`Key<enum_@GlobalScope_Key>` **KEY_ASCIITILDE** = ``126``
  1273. ~ key.
  1274. .. _class_@GlobalScope_constant_KEY_YEN:
  1275. .. rst-class:: classref-enumeration-constant
  1276. :ref:`Key<enum_@GlobalScope_Key>` **KEY_YEN** = ``165``
  1277. ¥ key.
  1278. .. _class_@GlobalScope_constant_KEY_SECTION:
  1279. .. rst-class:: classref-enumeration-constant
  1280. :ref:`Key<enum_@GlobalScope_Key>` **KEY_SECTION** = ``167``
  1281. § key.
  1282. .. _class_@GlobalScope_constant_KEY_GLOBE:
  1283. .. rst-class:: classref-enumeration-constant
  1284. :ref:`Key<enum_@GlobalScope_Key>` **KEY_GLOBE** = ``4194416``
  1285. "Globe" key on Mac / iPad keyboard.
  1286. .. _class_@GlobalScope_constant_KEY_KEYBOARD:
  1287. .. rst-class:: classref-enumeration-constant
  1288. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KEYBOARD** = ``4194417``
  1289. "On-screen keyboard" key iPad keyboard.
  1290. .. _class_@GlobalScope_constant_KEY_JIS_EISU:
  1291. .. rst-class:: classref-enumeration-constant
  1292. :ref:`Key<enum_@GlobalScope_Key>` **KEY_JIS_EISU** = ``4194418``
  1293. 英数 key on Mac keyboard.
  1294. .. _class_@GlobalScope_constant_KEY_JIS_KANA:
  1295. .. rst-class:: classref-enumeration-constant
  1296. :ref:`Key<enum_@GlobalScope_Key>` **KEY_JIS_KANA** = ``4194419``
  1297. かな key on Mac keyboard.
  1298. .. rst-class:: classref-item-separator
  1299. ----
  1300. .. _enum_@GlobalScope_KeyModifierMask:
  1301. .. rst-class:: classref-enumeration
  1302. flags **KeyModifierMask**:
  1303. .. _class_@GlobalScope_constant_KEY_CODE_MASK:
  1304. .. rst-class:: classref-enumeration-constant
  1305. :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>` **KEY_CODE_MASK** = ``8388607``
  1306. Key Code mask.
  1307. .. _class_@GlobalScope_constant_KEY_MODIFIER_MASK:
  1308. .. rst-class:: classref-enumeration-constant
  1309. :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>` **KEY_MODIFIER_MASK** = ``532676608``
  1310. Modifier key mask.
  1311. .. _class_@GlobalScope_constant_KEY_MASK_CMD_OR_CTRL:
  1312. .. rst-class:: classref-enumeration-constant
  1313. :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>` **KEY_MASK_CMD_OR_CTRL** = ``16777216``
  1314. Automatically remapped to :ref:`KEY_META<class_@GlobalScope_constant_KEY_META>` on macOS and :ref:`KEY_CTRL<class_@GlobalScope_constant_KEY_CTRL>` on other platforms, this mask is never set in the actual events, and should be used for key mapping only.
  1315. .. _class_@GlobalScope_constant_KEY_MASK_SHIFT:
  1316. .. rst-class:: classref-enumeration-constant
  1317. :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>` **KEY_MASK_SHIFT** = ``33554432``
  1318. Shift key mask.
  1319. .. _class_@GlobalScope_constant_KEY_MASK_ALT:
  1320. .. rst-class:: classref-enumeration-constant
  1321. :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>` **KEY_MASK_ALT** = ``67108864``
  1322. Alt or Option (on macOS) key mask.
  1323. .. _class_@GlobalScope_constant_KEY_MASK_META:
  1324. .. rst-class:: classref-enumeration-constant
  1325. :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>` **KEY_MASK_META** = ``134217728``
  1326. Command (on macOS) or Meta/Windows key mask.
  1327. .. _class_@GlobalScope_constant_KEY_MASK_CTRL:
  1328. .. rst-class:: classref-enumeration-constant
  1329. :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>` **KEY_MASK_CTRL** = ``268435456``
  1330. Control key mask.
  1331. .. _class_@GlobalScope_constant_KEY_MASK_KPAD:
  1332. .. rst-class:: classref-enumeration-constant
  1333. :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>` **KEY_MASK_KPAD** = ``536870912``
  1334. Keypad key mask.
  1335. .. _class_@GlobalScope_constant_KEY_MASK_GROUP_SWITCH:
  1336. .. rst-class:: classref-enumeration-constant
  1337. :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>` **KEY_MASK_GROUP_SWITCH** = ``1073741824``
  1338. Group Switch key mask.
  1339. .. rst-class:: classref-item-separator
  1340. ----
  1341. .. _enum_@GlobalScope_MouseButton:
  1342. .. rst-class:: classref-enumeration
  1343. enum **MouseButton**:
  1344. .. _class_@GlobalScope_constant_MOUSE_BUTTON_NONE:
  1345. .. rst-class:: classref-enumeration-constant
  1346. :ref:`MouseButton<enum_@GlobalScope_MouseButton>` **MOUSE_BUTTON_NONE** = ``0``
  1347. Enum value which doesn't correspond to any mouse button. This is used to initialize :ref:`MouseButton<enum_@GlobalScope_MouseButton>` properties with a generic state.
  1348. .. _class_@GlobalScope_constant_MOUSE_BUTTON_LEFT:
  1349. .. rst-class:: classref-enumeration-constant
  1350. :ref:`MouseButton<enum_@GlobalScope_MouseButton>` **MOUSE_BUTTON_LEFT** = ``1``
  1351. Primary mouse button, usually assigned to the left button.
  1352. .. _class_@GlobalScope_constant_MOUSE_BUTTON_RIGHT:
  1353. .. rst-class:: classref-enumeration-constant
  1354. :ref:`MouseButton<enum_@GlobalScope_MouseButton>` **MOUSE_BUTTON_RIGHT** = ``2``
  1355. Secondary mouse button, usually assigned to the right button.
  1356. .. _class_@GlobalScope_constant_MOUSE_BUTTON_MIDDLE:
  1357. .. rst-class:: classref-enumeration-constant
  1358. :ref:`MouseButton<enum_@GlobalScope_MouseButton>` **MOUSE_BUTTON_MIDDLE** = ``3``
  1359. Middle mouse button.
  1360. .. _class_@GlobalScope_constant_MOUSE_BUTTON_WHEEL_UP:
  1361. .. rst-class:: classref-enumeration-constant
  1362. :ref:`MouseButton<enum_@GlobalScope_MouseButton>` **MOUSE_BUTTON_WHEEL_UP** = ``4``
  1363. Mouse wheel scrolling up.
  1364. .. _class_@GlobalScope_constant_MOUSE_BUTTON_WHEEL_DOWN:
  1365. .. rst-class:: classref-enumeration-constant
  1366. :ref:`MouseButton<enum_@GlobalScope_MouseButton>` **MOUSE_BUTTON_WHEEL_DOWN** = ``5``
  1367. Mouse wheel scrolling down.
  1368. .. _class_@GlobalScope_constant_MOUSE_BUTTON_WHEEL_LEFT:
  1369. .. rst-class:: classref-enumeration-constant
  1370. :ref:`MouseButton<enum_@GlobalScope_MouseButton>` **MOUSE_BUTTON_WHEEL_LEFT** = ``6``
  1371. Mouse wheel left button (only present on some mice).
  1372. .. _class_@GlobalScope_constant_MOUSE_BUTTON_WHEEL_RIGHT:
  1373. .. rst-class:: classref-enumeration-constant
  1374. :ref:`MouseButton<enum_@GlobalScope_MouseButton>` **MOUSE_BUTTON_WHEEL_RIGHT** = ``7``
  1375. Mouse wheel right button (only present on some mice).
  1376. .. _class_@GlobalScope_constant_MOUSE_BUTTON_XBUTTON1:
  1377. .. rst-class:: classref-enumeration-constant
  1378. :ref:`MouseButton<enum_@GlobalScope_MouseButton>` **MOUSE_BUTTON_XBUTTON1** = ``8``
  1379. Extra mouse button 1. This is sometimes present, usually to the sides of the mouse.
  1380. .. _class_@GlobalScope_constant_MOUSE_BUTTON_XBUTTON2:
  1381. .. rst-class:: classref-enumeration-constant
  1382. :ref:`MouseButton<enum_@GlobalScope_MouseButton>` **MOUSE_BUTTON_XBUTTON2** = ``9``
  1383. Extra mouse button 2. This is sometimes present, usually to the sides of the mouse.
  1384. .. rst-class:: classref-item-separator
  1385. ----
  1386. .. _enum_@GlobalScope_MouseButtonMask:
  1387. .. rst-class:: classref-enumeration
  1388. flags **MouseButtonMask**:
  1389. .. _class_@GlobalScope_constant_MOUSE_BUTTON_MASK_LEFT:
  1390. .. rst-class:: classref-enumeration-constant
  1391. :ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>` **MOUSE_BUTTON_MASK_LEFT** = ``1``
  1392. Primary mouse button mask, usually for the left button.
  1393. .. _class_@GlobalScope_constant_MOUSE_BUTTON_MASK_RIGHT:
  1394. .. rst-class:: classref-enumeration-constant
  1395. :ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>` **MOUSE_BUTTON_MASK_RIGHT** = ``2``
  1396. Secondary mouse button mask, usually for the right button.
  1397. .. _class_@GlobalScope_constant_MOUSE_BUTTON_MASK_MIDDLE:
  1398. .. rst-class:: classref-enumeration-constant
  1399. :ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>` **MOUSE_BUTTON_MASK_MIDDLE** = ``4``
  1400. Middle mouse button mask.
  1401. .. _class_@GlobalScope_constant_MOUSE_BUTTON_MASK_MB_XBUTTON1:
  1402. .. rst-class:: classref-enumeration-constant
  1403. :ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>` **MOUSE_BUTTON_MASK_MB_XBUTTON1** = ``128``
  1404. Extra mouse button 1 mask.
  1405. .. _class_@GlobalScope_constant_MOUSE_BUTTON_MASK_MB_XBUTTON2:
  1406. .. rst-class:: classref-enumeration-constant
  1407. :ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>` **MOUSE_BUTTON_MASK_MB_XBUTTON2** = ``256``
  1408. Extra mouse button 2 mask.
  1409. .. rst-class:: classref-item-separator
  1410. ----
  1411. .. _enum_@GlobalScope_JoyButton:
  1412. .. rst-class:: classref-enumeration
  1413. enum **JoyButton**:
  1414. .. _class_@GlobalScope_constant_JOY_BUTTON_INVALID:
  1415. .. rst-class:: classref-enumeration-constant
  1416. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_INVALID** = ``-1``
  1417. An invalid game controller button.
  1418. .. _class_@GlobalScope_constant_JOY_BUTTON_A:
  1419. .. rst-class:: classref-enumeration-constant
  1420. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_A** = ``0``
  1421. Game controller SDL button A. Corresponds to the bottom action button: Sony Cross, Xbox A, Nintendo B.
  1422. .. _class_@GlobalScope_constant_JOY_BUTTON_B:
  1423. .. rst-class:: classref-enumeration-constant
  1424. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_B** = ``1``
  1425. Game controller SDL button B. Corresponds to the right action button: Sony Circle, Xbox B, Nintendo A.
  1426. .. _class_@GlobalScope_constant_JOY_BUTTON_X:
  1427. .. rst-class:: classref-enumeration-constant
  1428. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_X** = ``2``
  1429. Game controller SDL button X. Corresponds to the left action button: Sony Square, Xbox X, Nintendo Y.
  1430. .. _class_@GlobalScope_constant_JOY_BUTTON_Y:
  1431. .. rst-class:: classref-enumeration-constant
  1432. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_Y** = ``3``
  1433. Game controller SDL button Y. Corresponds to the top action button: Sony Triangle, Xbox Y, Nintendo X.
  1434. .. _class_@GlobalScope_constant_JOY_BUTTON_BACK:
  1435. .. rst-class:: classref-enumeration-constant
  1436. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_BACK** = ``4``
  1437. Game controller SDL back button. Corresponds to the Sony Select, Xbox Back, Nintendo - button.
  1438. .. _class_@GlobalScope_constant_JOY_BUTTON_GUIDE:
  1439. .. rst-class:: classref-enumeration-constant
  1440. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_GUIDE** = ``5``
  1441. Game controller SDL guide button. Corresponds to the Sony PS, Xbox Home button.
  1442. .. _class_@GlobalScope_constant_JOY_BUTTON_START:
  1443. .. rst-class:: classref-enumeration-constant
  1444. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_START** = ``6``
  1445. Game controller SDL start button. Corresponds to the Nintendo + button.
  1446. .. _class_@GlobalScope_constant_JOY_BUTTON_LEFT_STICK:
  1447. .. rst-class:: classref-enumeration-constant
  1448. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_LEFT_STICK** = ``7``
  1449. Game controller SDL left stick button. Corresponds to the Sony L3, Xbox L/LS button.
  1450. .. _class_@GlobalScope_constant_JOY_BUTTON_RIGHT_STICK:
  1451. .. rst-class:: classref-enumeration-constant
  1452. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_RIGHT_STICK** = ``8``
  1453. Game controller SDL right stick button. Corresponds to the Sony R3, Xbox R/RS button.
  1454. .. _class_@GlobalScope_constant_JOY_BUTTON_LEFT_SHOULDER:
  1455. .. rst-class:: classref-enumeration-constant
  1456. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_LEFT_SHOULDER** = ``9``
  1457. Game controller SDL left shoulder button. Corresponds to the Sony L1, Xbox LB button.
  1458. .. _class_@GlobalScope_constant_JOY_BUTTON_RIGHT_SHOULDER:
  1459. .. rst-class:: classref-enumeration-constant
  1460. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_RIGHT_SHOULDER** = ``10``
  1461. Game controller SDL right shoulder button. Corresponds to the Sony R1, Xbox RB button.
  1462. .. _class_@GlobalScope_constant_JOY_BUTTON_DPAD_UP:
  1463. .. rst-class:: classref-enumeration-constant
  1464. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_DPAD_UP** = ``11``
  1465. Game controller D-pad up button.
  1466. .. _class_@GlobalScope_constant_JOY_BUTTON_DPAD_DOWN:
  1467. .. rst-class:: classref-enumeration-constant
  1468. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_DPAD_DOWN** = ``12``
  1469. Game controller D-pad down button.
  1470. .. _class_@GlobalScope_constant_JOY_BUTTON_DPAD_LEFT:
  1471. .. rst-class:: classref-enumeration-constant
  1472. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_DPAD_LEFT** = ``13``
  1473. Game controller D-pad left button.
  1474. .. _class_@GlobalScope_constant_JOY_BUTTON_DPAD_RIGHT:
  1475. .. rst-class:: classref-enumeration-constant
  1476. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_DPAD_RIGHT** = ``14``
  1477. Game controller D-pad right button.
  1478. .. _class_@GlobalScope_constant_JOY_BUTTON_MISC1:
  1479. .. rst-class:: classref-enumeration-constant
  1480. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_MISC1** = ``15``
  1481. Game controller SDL miscellaneous button. Corresponds to Xbox share button, PS5 microphone button, Nintendo Switch capture button.
  1482. .. _class_@GlobalScope_constant_JOY_BUTTON_PADDLE1:
  1483. .. rst-class:: classref-enumeration-constant
  1484. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_PADDLE1** = ``16``
  1485. Game controller SDL paddle 1 button.
  1486. .. _class_@GlobalScope_constant_JOY_BUTTON_PADDLE2:
  1487. .. rst-class:: classref-enumeration-constant
  1488. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_PADDLE2** = ``17``
  1489. Game controller SDL paddle 2 button.
  1490. .. _class_@GlobalScope_constant_JOY_BUTTON_PADDLE3:
  1491. .. rst-class:: classref-enumeration-constant
  1492. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_PADDLE3** = ``18``
  1493. Game controller SDL paddle 3 button.
  1494. .. _class_@GlobalScope_constant_JOY_BUTTON_PADDLE4:
  1495. .. rst-class:: classref-enumeration-constant
  1496. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_PADDLE4** = ``19``
  1497. Game controller SDL paddle 4 button.
  1498. .. _class_@GlobalScope_constant_JOY_BUTTON_TOUCHPAD:
  1499. .. rst-class:: classref-enumeration-constant
  1500. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_TOUCHPAD** = ``20``
  1501. Game controller SDL touchpad button.
  1502. .. _class_@GlobalScope_constant_JOY_BUTTON_SDL_MAX:
  1503. .. rst-class:: classref-enumeration-constant
  1504. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_SDL_MAX** = ``21``
  1505. The number of SDL game controller buttons.
  1506. .. _class_@GlobalScope_constant_JOY_BUTTON_MAX:
  1507. .. rst-class:: classref-enumeration-constant
  1508. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_MAX** = ``128``
  1509. The maximum number of game controller buttons supported by the engine. The actual limit may be lower on specific platforms:
  1510. - **Android:** Up to 36 buttons.
  1511. - **Linux:** Up to 80 buttons.
  1512. - **Windows** and **macOS:** Up to 128 buttons.
  1513. .. rst-class:: classref-item-separator
  1514. ----
  1515. .. _enum_@GlobalScope_JoyAxis:
  1516. .. rst-class:: classref-enumeration
  1517. enum **JoyAxis**:
  1518. .. _class_@GlobalScope_constant_JOY_AXIS_INVALID:
  1519. .. rst-class:: classref-enumeration-constant
  1520. :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` **JOY_AXIS_INVALID** = ``-1``
  1521. An invalid game controller axis.
  1522. .. _class_@GlobalScope_constant_JOY_AXIS_LEFT_X:
  1523. .. rst-class:: classref-enumeration-constant
  1524. :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` **JOY_AXIS_LEFT_X** = ``0``
  1525. Game controller left joystick x-axis.
  1526. .. _class_@GlobalScope_constant_JOY_AXIS_LEFT_Y:
  1527. .. rst-class:: classref-enumeration-constant
  1528. :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` **JOY_AXIS_LEFT_Y** = ``1``
  1529. Game controller left joystick y-axis.
  1530. .. _class_@GlobalScope_constant_JOY_AXIS_RIGHT_X:
  1531. .. rst-class:: classref-enumeration-constant
  1532. :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` **JOY_AXIS_RIGHT_X** = ``2``
  1533. Game controller right joystick x-axis.
  1534. .. _class_@GlobalScope_constant_JOY_AXIS_RIGHT_Y:
  1535. .. rst-class:: classref-enumeration-constant
  1536. :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` **JOY_AXIS_RIGHT_Y** = ``3``
  1537. Game controller right joystick y-axis.
  1538. .. _class_@GlobalScope_constant_JOY_AXIS_TRIGGER_LEFT:
  1539. .. rst-class:: classref-enumeration-constant
  1540. :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` **JOY_AXIS_TRIGGER_LEFT** = ``4``
  1541. Game controller left trigger axis.
  1542. .. _class_@GlobalScope_constant_JOY_AXIS_TRIGGER_RIGHT:
  1543. .. rst-class:: classref-enumeration-constant
  1544. :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` **JOY_AXIS_TRIGGER_RIGHT** = ``5``
  1545. Game controller right trigger axis.
  1546. .. _class_@GlobalScope_constant_JOY_AXIS_SDL_MAX:
  1547. .. rst-class:: classref-enumeration-constant
  1548. :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` **JOY_AXIS_SDL_MAX** = ``6``
  1549. The number of SDL game controller axes.
  1550. .. _class_@GlobalScope_constant_JOY_AXIS_MAX:
  1551. .. rst-class:: classref-enumeration-constant
  1552. :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` **JOY_AXIS_MAX** = ``10``
  1553. The maximum number of game controller axes: OpenVR supports up to 5 Joysticks making a total of 10 axes.
  1554. .. rst-class:: classref-item-separator
  1555. ----
  1556. .. _enum_@GlobalScope_MIDIMessage:
  1557. .. rst-class:: classref-enumeration
  1558. enum **MIDIMessage**:
  1559. .. _class_@GlobalScope_constant_MIDI_MESSAGE_NONE:
  1560. .. rst-class:: classref-enumeration-constant
  1561. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_NONE** = ``0``
  1562. Enum value which doesn't correspond to any MIDI message. This is used to initialize :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` properties with a generic state.
  1563. .. _class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_OFF:
  1564. .. rst-class:: classref-enumeration-constant
  1565. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_NOTE_OFF** = ``8``
  1566. MIDI note OFF message. Not all MIDI devices send this event; some send :ref:`MIDI_MESSAGE_NOTE_ON<class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_ON>` with zero velocity instead. See the documentation of :ref:`InputEventMIDI<class_InputEventMIDI>` for information of how to use MIDI inputs.
  1567. .. _class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_ON:
  1568. .. rst-class:: classref-enumeration-constant
  1569. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_NOTE_ON** = ``9``
  1570. MIDI note ON message. Some MIDI devices send this event with velocity zero instead of :ref:`MIDI_MESSAGE_NOTE_OFF<class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_OFF>`, but implementations vary. See the documentation of :ref:`InputEventMIDI<class_InputEventMIDI>` for information of how to use MIDI inputs.
  1571. .. _class_@GlobalScope_constant_MIDI_MESSAGE_AFTERTOUCH:
  1572. .. rst-class:: classref-enumeration-constant
  1573. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_AFTERTOUCH** = ``10``
  1574. MIDI aftertouch message. This message is most often sent by pressing down on the key after it "bottoms out".
  1575. .. _class_@GlobalScope_constant_MIDI_MESSAGE_CONTROL_CHANGE:
  1576. .. rst-class:: classref-enumeration-constant
  1577. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_CONTROL_CHANGE** = ``11``
  1578. MIDI control change message. This message is sent when a controller value changes. Controllers include devices such as pedals and levers.
  1579. .. _class_@GlobalScope_constant_MIDI_MESSAGE_PROGRAM_CHANGE:
  1580. .. rst-class:: classref-enumeration-constant
  1581. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_PROGRAM_CHANGE** = ``12``
  1582. MIDI program change message. This message sent when the program patch number changes.
  1583. .. _class_@GlobalScope_constant_MIDI_MESSAGE_CHANNEL_PRESSURE:
  1584. .. rst-class:: classref-enumeration-constant
  1585. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_CHANNEL_PRESSURE** = ``13``
  1586. MIDI channel pressure message. This message is most often sent by pressing down on the key after it "bottoms out". This message is different from polyphonic after-touch as it indicates the highest pressure across all keys.
  1587. .. _class_@GlobalScope_constant_MIDI_MESSAGE_PITCH_BEND:
  1588. .. rst-class:: classref-enumeration-constant
  1589. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_PITCH_BEND** = ``14``
  1590. MIDI pitch bend message. This message is sent to indicate a change in the pitch bender (wheel or lever, typically).
  1591. .. _class_@GlobalScope_constant_MIDI_MESSAGE_SYSTEM_EXCLUSIVE:
  1592. .. rst-class:: classref-enumeration-constant
  1593. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_SYSTEM_EXCLUSIVE** = ``240``
  1594. MIDI system exclusive message. This has behavior exclusive to the device you're receiving input from. Getting this data is not implemented in Godot.
  1595. .. _class_@GlobalScope_constant_MIDI_MESSAGE_QUARTER_FRAME:
  1596. .. rst-class:: classref-enumeration-constant
  1597. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_QUARTER_FRAME** = ``241``
  1598. MIDI quarter frame message. Contains timing information that is used to synchronize MIDI devices. Getting this data is not implemented in Godot.
  1599. .. _class_@GlobalScope_constant_MIDI_MESSAGE_SONG_POSITION_POINTER:
  1600. .. rst-class:: classref-enumeration-constant
  1601. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_SONG_POSITION_POINTER** = ``242``
  1602. MIDI song position pointer message. Gives the number of 16th notes since the start of the song. Getting this data is not implemented in Godot.
  1603. .. _class_@GlobalScope_constant_MIDI_MESSAGE_SONG_SELECT:
  1604. .. rst-class:: classref-enumeration-constant
  1605. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_SONG_SELECT** = ``243``
  1606. MIDI song select message. Specifies which sequence or song is to be played. Getting this data is not implemented in Godot.
  1607. .. _class_@GlobalScope_constant_MIDI_MESSAGE_TUNE_REQUEST:
  1608. .. rst-class:: classref-enumeration-constant
  1609. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_TUNE_REQUEST** = ``246``
  1610. MIDI tune request message. Upon receiving a tune request, all analog synthesizers should tune their oscillators.
  1611. .. _class_@GlobalScope_constant_MIDI_MESSAGE_TIMING_CLOCK:
  1612. .. rst-class:: classref-enumeration-constant
  1613. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_TIMING_CLOCK** = ``248``
  1614. MIDI timing clock message. Sent 24 times per quarter note when synchronization is required.
  1615. .. _class_@GlobalScope_constant_MIDI_MESSAGE_START:
  1616. .. rst-class:: classref-enumeration-constant
  1617. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_START** = ``250``
  1618. MIDI start message. Start the current sequence playing. This message will be followed with Timing Clocks.
  1619. .. _class_@GlobalScope_constant_MIDI_MESSAGE_CONTINUE:
  1620. .. rst-class:: classref-enumeration-constant
  1621. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_CONTINUE** = ``251``
  1622. MIDI continue message. Continue at the point the sequence was stopped.
  1623. .. _class_@GlobalScope_constant_MIDI_MESSAGE_STOP:
  1624. .. rst-class:: classref-enumeration-constant
  1625. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_STOP** = ``252``
  1626. MIDI stop message. Stop the current sequence.
  1627. .. _class_@GlobalScope_constant_MIDI_MESSAGE_ACTIVE_SENSING:
  1628. .. rst-class:: classref-enumeration-constant
  1629. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_ACTIVE_SENSING** = ``254``
  1630. MIDI active sensing message. This message is intended to be sent repeatedly to tell the receiver that a connection is alive.
  1631. .. _class_@GlobalScope_constant_MIDI_MESSAGE_SYSTEM_RESET:
  1632. .. rst-class:: classref-enumeration-constant
  1633. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_SYSTEM_RESET** = ``255``
  1634. MIDI system reset message. Reset all receivers in the system to power-up status. It should not be sent on power-up itself.
  1635. .. rst-class:: classref-item-separator
  1636. ----
  1637. .. _enum_@GlobalScope_Error:
  1638. .. rst-class:: classref-enumeration
  1639. enum **Error**:
  1640. .. _class_@GlobalScope_constant_OK:
  1641. .. rst-class:: classref-enumeration-constant
  1642. :ref:`Error<enum_@GlobalScope_Error>` **OK** = ``0``
  1643. Methods that return :ref:`Error<enum_@GlobalScope_Error>` return :ref:`OK<class_@GlobalScope_constant_OK>` when no error occurred.
  1644. Since :ref:`OK<class_@GlobalScope_constant_OK>` has value 0, and all other error constants are positive integers, it can also be used in boolean checks.
  1645. \ **Example:**\
  1646. ::
  1647. var error = method_that_returns_error()
  1648. if error != OK:
  1649. printerr("Failure!")
  1650. # Or, alternatively:
  1651. if error:
  1652. printerr("Still failing!")
  1653. \ **Note:** Many functions do not return an error code, but will print error messages to standard output.
  1654. .. _class_@GlobalScope_constant_FAILED:
  1655. .. rst-class:: classref-enumeration-constant
  1656. :ref:`Error<enum_@GlobalScope_Error>` **FAILED** = ``1``
  1657. Generic error.
  1658. .. _class_@GlobalScope_constant_ERR_UNAVAILABLE:
  1659. .. rst-class:: classref-enumeration-constant
  1660. :ref:`Error<enum_@GlobalScope_Error>` **ERR_UNAVAILABLE** = ``2``
  1661. Unavailable error.
  1662. .. _class_@GlobalScope_constant_ERR_UNCONFIGURED:
  1663. .. rst-class:: classref-enumeration-constant
  1664. :ref:`Error<enum_@GlobalScope_Error>` **ERR_UNCONFIGURED** = ``3``
  1665. Unconfigured error.
  1666. .. _class_@GlobalScope_constant_ERR_UNAUTHORIZED:
  1667. .. rst-class:: classref-enumeration-constant
  1668. :ref:`Error<enum_@GlobalScope_Error>` **ERR_UNAUTHORIZED** = ``4``
  1669. Unauthorized error.
  1670. .. _class_@GlobalScope_constant_ERR_PARAMETER_RANGE_ERROR:
  1671. .. rst-class:: classref-enumeration-constant
  1672. :ref:`Error<enum_@GlobalScope_Error>` **ERR_PARAMETER_RANGE_ERROR** = ``5``
  1673. Parameter range error.
  1674. .. _class_@GlobalScope_constant_ERR_OUT_OF_MEMORY:
  1675. .. rst-class:: classref-enumeration-constant
  1676. :ref:`Error<enum_@GlobalScope_Error>` **ERR_OUT_OF_MEMORY** = ``6``
  1677. Out of memory (OOM) error.
  1678. .. _class_@GlobalScope_constant_ERR_FILE_NOT_FOUND:
  1679. .. rst-class:: classref-enumeration-constant
  1680. :ref:`Error<enum_@GlobalScope_Error>` **ERR_FILE_NOT_FOUND** = ``7``
  1681. File: Not found error.
  1682. .. _class_@GlobalScope_constant_ERR_FILE_BAD_DRIVE:
  1683. .. rst-class:: classref-enumeration-constant
  1684. :ref:`Error<enum_@GlobalScope_Error>` **ERR_FILE_BAD_DRIVE** = ``8``
  1685. File: Bad drive error.
  1686. .. _class_@GlobalScope_constant_ERR_FILE_BAD_PATH:
  1687. .. rst-class:: classref-enumeration-constant
  1688. :ref:`Error<enum_@GlobalScope_Error>` **ERR_FILE_BAD_PATH** = ``9``
  1689. File: Bad path error.
  1690. .. _class_@GlobalScope_constant_ERR_FILE_NO_PERMISSION:
  1691. .. rst-class:: classref-enumeration-constant
  1692. :ref:`Error<enum_@GlobalScope_Error>` **ERR_FILE_NO_PERMISSION** = ``10``
  1693. File: No permission error.
  1694. .. _class_@GlobalScope_constant_ERR_FILE_ALREADY_IN_USE:
  1695. .. rst-class:: classref-enumeration-constant
  1696. :ref:`Error<enum_@GlobalScope_Error>` **ERR_FILE_ALREADY_IN_USE** = ``11``
  1697. File: Already in use error.
  1698. .. _class_@GlobalScope_constant_ERR_FILE_CANT_OPEN:
  1699. .. rst-class:: classref-enumeration-constant
  1700. :ref:`Error<enum_@GlobalScope_Error>` **ERR_FILE_CANT_OPEN** = ``12``
  1701. File: Can't open error.
  1702. .. _class_@GlobalScope_constant_ERR_FILE_CANT_WRITE:
  1703. .. rst-class:: classref-enumeration-constant
  1704. :ref:`Error<enum_@GlobalScope_Error>` **ERR_FILE_CANT_WRITE** = ``13``
  1705. File: Can't write error.
  1706. .. _class_@GlobalScope_constant_ERR_FILE_CANT_READ:
  1707. .. rst-class:: classref-enumeration-constant
  1708. :ref:`Error<enum_@GlobalScope_Error>` **ERR_FILE_CANT_READ** = ``14``
  1709. File: Can't read error.
  1710. .. _class_@GlobalScope_constant_ERR_FILE_UNRECOGNIZED:
  1711. .. rst-class:: classref-enumeration-constant
  1712. :ref:`Error<enum_@GlobalScope_Error>` **ERR_FILE_UNRECOGNIZED** = ``15``
  1713. File: Unrecognized error.
  1714. .. _class_@GlobalScope_constant_ERR_FILE_CORRUPT:
  1715. .. rst-class:: classref-enumeration-constant
  1716. :ref:`Error<enum_@GlobalScope_Error>` **ERR_FILE_CORRUPT** = ``16``
  1717. File: Corrupt error.
  1718. .. _class_@GlobalScope_constant_ERR_FILE_MISSING_DEPENDENCIES:
  1719. .. rst-class:: classref-enumeration-constant
  1720. :ref:`Error<enum_@GlobalScope_Error>` **ERR_FILE_MISSING_DEPENDENCIES** = ``17``
  1721. File: Missing dependencies error.
  1722. .. _class_@GlobalScope_constant_ERR_FILE_EOF:
  1723. .. rst-class:: classref-enumeration-constant
  1724. :ref:`Error<enum_@GlobalScope_Error>` **ERR_FILE_EOF** = ``18``
  1725. File: End of file (EOF) error.
  1726. .. _class_@GlobalScope_constant_ERR_CANT_OPEN:
  1727. .. rst-class:: classref-enumeration-constant
  1728. :ref:`Error<enum_@GlobalScope_Error>` **ERR_CANT_OPEN** = ``19``
  1729. Can't open error.
  1730. .. _class_@GlobalScope_constant_ERR_CANT_CREATE:
  1731. .. rst-class:: classref-enumeration-constant
  1732. :ref:`Error<enum_@GlobalScope_Error>` **ERR_CANT_CREATE** = ``20``
  1733. Can't create error.
  1734. .. _class_@GlobalScope_constant_ERR_QUERY_FAILED:
  1735. .. rst-class:: classref-enumeration-constant
  1736. :ref:`Error<enum_@GlobalScope_Error>` **ERR_QUERY_FAILED** = ``21``
  1737. Query failed error.
  1738. .. _class_@GlobalScope_constant_ERR_ALREADY_IN_USE:
  1739. .. rst-class:: classref-enumeration-constant
  1740. :ref:`Error<enum_@GlobalScope_Error>` **ERR_ALREADY_IN_USE** = ``22``
  1741. Already in use error.
  1742. .. _class_@GlobalScope_constant_ERR_LOCKED:
  1743. .. rst-class:: classref-enumeration-constant
  1744. :ref:`Error<enum_@GlobalScope_Error>` **ERR_LOCKED** = ``23``
  1745. Locked error.
  1746. .. _class_@GlobalScope_constant_ERR_TIMEOUT:
  1747. .. rst-class:: classref-enumeration-constant
  1748. :ref:`Error<enum_@GlobalScope_Error>` **ERR_TIMEOUT** = ``24``
  1749. Timeout error.
  1750. .. _class_@GlobalScope_constant_ERR_CANT_CONNECT:
  1751. .. rst-class:: classref-enumeration-constant
  1752. :ref:`Error<enum_@GlobalScope_Error>` **ERR_CANT_CONNECT** = ``25``
  1753. Can't connect error.
  1754. .. _class_@GlobalScope_constant_ERR_CANT_RESOLVE:
  1755. .. rst-class:: classref-enumeration-constant
  1756. :ref:`Error<enum_@GlobalScope_Error>` **ERR_CANT_RESOLVE** = ``26``
  1757. Can't resolve error.
  1758. .. _class_@GlobalScope_constant_ERR_CONNECTION_ERROR:
  1759. .. rst-class:: classref-enumeration-constant
  1760. :ref:`Error<enum_@GlobalScope_Error>` **ERR_CONNECTION_ERROR** = ``27``
  1761. Connection error.
  1762. .. _class_@GlobalScope_constant_ERR_CANT_ACQUIRE_RESOURCE:
  1763. .. rst-class:: classref-enumeration-constant
  1764. :ref:`Error<enum_@GlobalScope_Error>` **ERR_CANT_ACQUIRE_RESOURCE** = ``28``
  1765. Can't acquire resource error.
  1766. .. _class_@GlobalScope_constant_ERR_CANT_FORK:
  1767. .. rst-class:: classref-enumeration-constant
  1768. :ref:`Error<enum_@GlobalScope_Error>` **ERR_CANT_FORK** = ``29``
  1769. Can't fork process error.
  1770. .. _class_@GlobalScope_constant_ERR_INVALID_DATA:
  1771. .. rst-class:: classref-enumeration-constant
  1772. :ref:`Error<enum_@GlobalScope_Error>` **ERR_INVALID_DATA** = ``30``
  1773. Invalid data error.
  1774. .. _class_@GlobalScope_constant_ERR_INVALID_PARAMETER:
  1775. .. rst-class:: classref-enumeration-constant
  1776. :ref:`Error<enum_@GlobalScope_Error>` **ERR_INVALID_PARAMETER** = ``31``
  1777. Invalid parameter error.
  1778. .. _class_@GlobalScope_constant_ERR_ALREADY_EXISTS:
  1779. .. rst-class:: classref-enumeration-constant
  1780. :ref:`Error<enum_@GlobalScope_Error>` **ERR_ALREADY_EXISTS** = ``32``
  1781. Already exists error.
  1782. .. _class_@GlobalScope_constant_ERR_DOES_NOT_EXIST:
  1783. .. rst-class:: classref-enumeration-constant
  1784. :ref:`Error<enum_@GlobalScope_Error>` **ERR_DOES_NOT_EXIST** = ``33``
  1785. Does not exist error.
  1786. .. _class_@GlobalScope_constant_ERR_DATABASE_CANT_READ:
  1787. .. rst-class:: classref-enumeration-constant
  1788. :ref:`Error<enum_@GlobalScope_Error>` **ERR_DATABASE_CANT_READ** = ``34``
  1789. Database: Read error.
  1790. .. _class_@GlobalScope_constant_ERR_DATABASE_CANT_WRITE:
  1791. .. rst-class:: classref-enumeration-constant
  1792. :ref:`Error<enum_@GlobalScope_Error>` **ERR_DATABASE_CANT_WRITE** = ``35``
  1793. Database: Write error.
  1794. .. _class_@GlobalScope_constant_ERR_COMPILATION_FAILED:
  1795. .. rst-class:: classref-enumeration-constant
  1796. :ref:`Error<enum_@GlobalScope_Error>` **ERR_COMPILATION_FAILED** = ``36``
  1797. Compilation failed error.
  1798. .. _class_@GlobalScope_constant_ERR_METHOD_NOT_FOUND:
  1799. .. rst-class:: classref-enumeration-constant
  1800. :ref:`Error<enum_@GlobalScope_Error>` **ERR_METHOD_NOT_FOUND** = ``37``
  1801. Method not found error.
  1802. .. _class_@GlobalScope_constant_ERR_LINK_FAILED:
  1803. .. rst-class:: classref-enumeration-constant
  1804. :ref:`Error<enum_@GlobalScope_Error>` **ERR_LINK_FAILED** = ``38``
  1805. Linking failed error.
  1806. .. _class_@GlobalScope_constant_ERR_SCRIPT_FAILED:
  1807. .. rst-class:: classref-enumeration-constant
  1808. :ref:`Error<enum_@GlobalScope_Error>` **ERR_SCRIPT_FAILED** = ``39``
  1809. Script failed error.
  1810. .. _class_@GlobalScope_constant_ERR_CYCLIC_LINK:
  1811. .. rst-class:: classref-enumeration-constant
  1812. :ref:`Error<enum_@GlobalScope_Error>` **ERR_CYCLIC_LINK** = ``40``
  1813. Cycling link (import cycle) error.
  1814. .. _class_@GlobalScope_constant_ERR_INVALID_DECLARATION:
  1815. .. rst-class:: classref-enumeration-constant
  1816. :ref:`Error<enum_@GlobalScope_Error>` **ERR_INVALID_DECLARATION** = ``41``
  1817. Invalid declaration error.
  1818. .. _class_@GlobalScope_constant_ERR_DUPLICATE_SYMBOL:
  1819. .. rst-class:: classref-enumeration-constant
  1820. :ref:`Error<enum_@GlobalScope_Error>` **ERR_DUPLICATE_SYMBOL** = ``42``
  1821. Duplicate symbol error.
  1822. .. _class_@GlobalScope_constant_ERR_PARSE_ERROR:
  1823. .. rst-class:: classref-enumeration-constant
  1824. :ref:`Error<enum_@GlobalScope_Error>` **ERR_PARSE_ERROR** = ``43``
  1825. Parse error.
  1826. .. _class_@GlobalScope_constant_ERR_BUSY:
  1827. .. rst-class:: classref-enumeration-constant
  1828. :ref:`Error<enum_@GlobalScope_Error>` **ERR_BUSY** = ``44``
  1829. Busy error.
  1830. .. _class_@GlobalScope_constant_ERR_SKIP:
  1831. .. rst-class:: classref-enumeration-constant
  1832. :ref:`Error<enum_@GlobalScope_Error>` **ERR_SKIP** = ``45``
  1833. Skip error.
  1834. .. _class_@GlobalScope_constant_ERR_HELP:
  1835. .. rst-class:: classref-enumeration-constant
  1836. :ref:`Error<enum_@GlobalScope_Error>` **ERR_HELP** = ``46``
  1837. Help error. Used internally when passing ``--version`` or ``--help`` as executable options.
  1838. .. _class_@GlobalScope_constant_ERR_BUG:
  1839. .. rst-class:: classref-enumeration-constant
  1840. :ref:`Error<enum_@GlobalScope_Error>` **ERR_BUG** = ``47``
  1841. Bug error, caused by an implementation issue in the method.
  1842. \ **Note:** If a built-in method returns this code, please open an issue on `the GitHub Issue Tracker <https://github.com/godotengine/godot/issues>`__.
  1843. .. _class_@GlobalScope_constant_ERR_PRINTER_ON_FIRE:
  1844. .. rst-class:: classref-enumeration-constant
  1845. :ref:`Error<enum_@GlobalScope_Error>` **ERR_PRINTER_ON_FIRE** = ``48``
  1846. Printer on fire error (This is an easter egg, no built-in methods return this error code).
  1847. .. rst-class:: classref-item-separator
  1848. ----
  1849. .. _enum_@GlobalScope_PropertyHint:
  1850. .. rst-class:: classref-enumeration
  1851. enum **PropertyHint**:
  1852. .. _class_@GlobalScope_constant_PROPERTY_HINT_NONE:
  1853. .. rst-class:: classref-enumeration-constant
  1854. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_NONE** = ``0``
  1855. The property has no hint for the editor.
  1856. .. _class_@GlobalScope_constant_PROPERTY_HINT_RANGE:
  1857. .. rst-class:: classref-enumeration-constant
  1858. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_RANGE** = ``1``
  1859. Hints that an :ref:`int<class_int>` or :ref:`float<class_float>` property should be within a range specified via the hint string ``"min,max"`` or ``"min,max,step"``. The hint string can optionally include ``"or_greater"`` and/or ``"or_less"`` to allow manual input going respectively above the max or below the min values.
  1860. \ **Example:** ``"-360,360,1,or_greater,or_less"``.
  1861. Additionally, other keywords can be included: ``"exp"`` for exponential range editing, ``"radians"`` for editing radian angles in degrees, ``"degrees"`` to hint at an angle and ``"hide_slider"`` to hide the slider.
  1862. .. _class_@GlobalScope_constant_PROPERTY_HINT_ENUM:
  1863. .. rst-class:: classref-enumeration-constant
  1864. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_ENUM** = ``2``
  1865. Hints that an :ref:`int<class_int>` or :ref:`String<class_String>` property is an enumerated value to pick in a list specified via a hint string.
  1866. The hint string is a comma separated list of names such as ``"Hello,Something,Else"``. Whitespaces are **not** removed from either end of a name. For integer properties, the first name in the list has value 0, the next 1, and so on. Explicit values can also be specified by appending ``:integer`` to the name, e.g. ``"Zero,One,Three:3,Four,Six:6"``.
  1867. .. _class_@GlobalScope_constant_PROPERTY_HINT_ENUM_SUGGESTION:
  1868. .. rst-class:: classref-enumeration-constant
  1869. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_ENUM_SUGGESTION** = ``3``
  1870. Hints that a :ref:`String<class_String>` property can be an enumerated value to pick in a list specified via a hint string such as ``"Hello,Something,Else"``.
  1871. Unlike :ref:`PROPERTY_HINT_ENUM<class_@GlobalScope_constant_PROPERTY_HINT_ENUM>`, a property with this hint still accepts arbitrary values and can be empty. The list of values serves to suggest possible values.
  1872. .. _class_@GlobalScope_constant_PROPERTY_HINT_EXP_EASING:
  1873. .. rst-class:: classref-enumeration-constant
  1874. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_EXP_EASING** = ``4``
  1875. Hints that a :ref:`float<class_float>` property should be edited via an exponential easing function. The hint string can include ``"attenuation"`` to flip the curve horizontally and/or ``"positive_only"`` to exclude in/out easing and limit values to be greater than or equal to zero.
  1876. .. _class_@GlobalScope_constant_PROPERTY_HINT_LINK:
  1877. .. rst-class:: classref-enumeration-constant
  1878. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_LINK** = ``5``
  1879. Hints that a vector property should allow its components to be linked. For example, this allows :ref:`Vector2.x<class_Vector2_property_x>` and :ref:`Vector2.y<class_Vector2_property_y>` to be edited together.
  1880. .. _class_@GlobalScope_constant_PROPERTY_HINT_FLAGS:
  1881. .. rst-class:: classref-enumeration-constant
  1882. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_FLAGS** = ``6``
  1883. Hints that an :ref:`int<class_int>` property is a bitmask with named bit flags.
  1884. The hint string is a comma separated list of names such as ``"Bit0,Bit1,Bit2,Bit3"``. Whitespaces are **not** removed from either end of a name. The first name in the list has value 1, the next 2, then 4, 8, 16 and so on. Explicit values can also be specified by appending ``:integer`` to the name, e.g. ``"A:4,B:8,C:16"``. You can also combine several flags (``"A:4,B:8,AB:12,C:16"``).
  1885. \ **Note:** A flag value must be at least ``1`` and at most ``2 ** 32 - 1``.
  1886. \ **Note:** Unlike :ref:`PROPERTY_HINT_ENUM<class_@GlobalScope_constant_PROPERTY_HINT_ENUM>`, the previous explicit value is not taken into account. For the hint ``"A:16,B,C"``, A is 16, B is 2, C is 4.
  1887. .. _class_@GlobalScope_constant_PROPERTY_HINT_LAYERS_2D_RENDER:
  1888. .. rst-class:: classref-enumeration-constant
  1889. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_LAYERS_2D_RENDER** = ``7``
  1890. Hints that an :ref:`int<class_int>` property is a bitmask using the optionally named 2D render layers.
  1891. .. _class_@GlobalScope_constant_PROPERTY_HINT_LAYERS_2D_PHYSICS:
  1892. .. rst-class:: classref-enumeration-constant
  1893. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_LAYERS_2D_PHYSICS** = ``8``
  1894. Hints that an :ref:`int<class_int>` property is a bitmask using the optionally named 2D physics layers.
  1895. .. _class_@GlobalScope_constant_PROPERTY_HINT_LAYERS_2D_NAVIGATION:
  1896. .. rst-class:: classref-enumeration-constant
  1897. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_LAYERS_2D_NAVIGATION** = ``9``
  1898. Hints that an :ref:`int<class_int>` property is a bitmask using the optionally named 2D navigation layers.
  1899. .. _class_@GlobalScope_constant_PROPERTY_HINT_LAYERS_3D_RENDER:
  1900. .. rst-class:: classref-enumeration-constant
  1901. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_LAYERS_3D_RENDER** = ``10``
  1902. Hints that an :ref:`int<class_int>` property is a bitmask using the optionally named 3D render layers.
  1903. .. _class_@GlobalScope_constant_PROPERTY_HINT_LAYERS_3D_PHYSICS:
  1904. .. rst-class:: classref-enumeration-constant
  1905. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_LAYERS_3D_PHYSICS** = ``11``
  1906. Hints that an :ref:`int<class_int>` property is a bitmask using the optionally named 3D physics layers.
  1907. .. _class_@GlobalScope_constant_PROPERTY_HINT_LAYERS_3D_NAVIGATION:
  1908. .. rst-class:: classref-enumeration-constant
  1909. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_LAYERS_3D_NAVIGATION** = ``12``
  1910. Hints that an :ref:`int<class_int>` property is a bitmask using the optionally named 3D navigation layers.
  1911. .. _class_@GlobalScope_constant_PROPERTY_HINT_LAYERS_AVOIDANCE:
  1912. .. rst-class:: classref-enumeration-constant
  1913. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_LAYERS_AVOIDANCE** = ``37``
  1914. Hints that an integer property is a bitmask using the optionally named avoidance layers.
  1915. .. _class_@GlobalScope_constant_PROPERTY_HINT_FILE:
  1916. .. rst-class:: classref-enumeration-constant
  1917. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_FILE** = ``13``
  1918. Hints that a :ref:`String<class_String>` property is a path to a file. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like ``"*.png,*.jpg"``.
  1919. .. _class_@GlobalScope_constant_PROPERTY_HINT_DIR:
  1920. .. rst-class:: classref-enumeration-constant
  1921. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_DIR** = ``14``
  1922. Hints that a :ref:`String<class_String>` property is a path to a directory. Editing it will show a file dialog for picking the path.
  1923. .. _class_@GlobalScope_constant_PROPERTY_HINT_GLOBAL_FILE:
  1924. .. rst-class:: classref-enumeration-constant
  1925. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_GLOBAL_FILE** = ``15``
  1926. Hints that a :ref:`String<class_String>` property is an absolute path to a file outside the project folder. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards, like ``"*.png,*.jpg"``.
  1927. .. _class_@GlobalScope_constant_PROPERTY_HINT_GLOBAL_DIR:
  1928. .. rst-class:: classref-enumeration-constant
  1929. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_GLOBAL_DIR** = ``16``
  1930. Hints that a :ref:`String<class_String>` property is an absolute path to a directory outside the project folder. Editing it will show a file dialog for picking the path.
  1931. .. _class_@GlobalScope_constant_PROPERTY_HINT_RESOURCE_TYPE:
  1932. .. rst-class:: classref-enumeration-constant
  1933. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_RESOURCE_TYPE** = ``17``
  1934. Hints that a property is an instance of a :ref:`Resource<class_Resource>`-derived type, optionally specified via the hint string (e.g. ``"Texture2D"``). Editing it will show a popup menu of valid resource types to instantiate.
  1935. .. _class_@GlobalScope_constant_PROPERTY_HINT_MULTILINE_TEXT:
  1936. .. rst-class:: classref-enumeration-constant
  1937. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_MULTILINE_TEXT** = ``18``
  1938. Hints that a :ref:`String<class_String>` property is text with line breaks. Editing it will show a text input field where line breaks can be typed.
  1939. .. _class_@GlobalScope_constant_PROPERTY_HINT_EXPRESSION:
  1940. .. rst-class:: classref-enumeration-constant
  1941. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_EXPRESSION** = ``19``
  1942. Hints that a :ref:`String<class_String>` property is an :ref:`Expression<class_Expression>`.
  1943. .. _class_@GlobalScope_constant_PROPERTY_HINT_PLACEHOLDER_TEXT:
  1944. .. rst-class:: classref-enumeration-constant
  1945. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_PLACEHOLDER_TEXT** = ``20``
  1946. Hints that a :ref:`String<class_String>` property should show a placeholder text on its input field, if empty. The hint string is the placeholder text to use.
  1947. .. _class_@GlobalScope_constant_PROPERTY_HINT_COLOR_NO_ALPHA:
  1948. .. rst-class:: classref-enumeration-constant
  1949. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_COLOR_NO_ALPHA** = ``21``
  1950. Hints that a :ref:`Color<class_Color>` property should be edited without affecting its transparency (:ref:`Color.a<class_Color_property_a>` is not editable).
  1951. .. _class_@GlobalScope_constant_PROPERTY_HINT_OBJECT_ID:
  1952. .. rst-class:: classref-enumeration-constant
  1953. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_OBJECT_ID** = ``22``
  1954. .. _class_@GlobalScope_constant_PROPERTY_HINT_TYPE_STRING:
  1955. .. rst-class:: classref-enumeration-constant
  1956. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_TYPE_STRING** = ``23``
  1957. If a property is :ref:`String<class_String>`, hints that the property represents a particular type (class). This allows to select a type from the create dialog. The property will store the selected type as a string.
  1958. If a property is :ref:`Array<class_Array>`, hints the editor how to show elements. The ``hint_string`` must encode nested types using ``":"`` and ``"/"``.
  1959. .. tabs::
  1960. .. code-tab:: gdscript
  1961. # Array of elem_type.
  1962. hint_string = "%d:" % [elem_type]
  1963. hint_string = "%d/%d:%s" % [elem_type, elem_hint, elem_hint_string]
  1964. # Two-dimensional array of elem_type (array of arrays of elem_type).
  1965. hint_string = "%d:%d:" % [TYPE_ARRAY, elem_type]
  1966. hint_string = "%d:%d/%d:%s" % [TYPE_ARRAY, elem_type, elem_hint, elem_hint_string]
  1967. # Three-dimensional array of elem_type (array of arrays of arrays of elem_type).
  1968. hint_string = "%d:%d:%d:" % [TYPE_ARRAY, TYPE_ARRAY, elem_type]
  1969. hint_string = "%d:%d:%d/%d:%s" % [TYPE_ARRAY, TYPE_ARRAY, elem_type, elem_hint, elem_hint_string]
  1970. .. code-tab:: csharp
  1971. // Array of elemType.
  1972. hintString = $"{elemType:D}:";
  1973. hintString = $"{elemType:}/{elemHint:D}:{elemHintString}";
  1974. // Two-dimensional array of elemType (array of arrays of elemType).
  1975. hintString = $"{Variant.Type.Array:D}:{elemType:D}:";
  1976. hintString = $"{Variant.Type.Array:D}:{elemType:D}/{elemHint:D}:{elemHintString}";
  1977. // Three-dimensional array of elemType (array of arrays of arrays of elemType).
  1978. hintString = $"{Variant.Type.Array:D}:{Variant.Type.Array:D}:{elemType:D}:";
  1979. hintString = $"{Variant.Type.Array:D}:{Variant.Type.Array:D}:{elemType:D}/{elemHint:D}:{elemHintString}";
  1980. Examples:
  1981. .. tabs::
  1982. .. code-tab:: gdscript
  1983. hint_string = "%d:" % [TYPE_INT] # Array of integers.
  1984. hint_string = "%d/%d:1,10,1" % [TYPE_INT, PROPERTY_HINT_RANGE] # Array of integers (in range from 1 to 10).
  1985. hint_string = "%d/%d:Zero,One,Two" % [TYPE_INT, PROPERTY_HINT_ENUM] # Array of integers (an enum).
  1986. hint_string = "%d/%d:Zero,One,Three:3,Six:6" % [TYPE_INT, PROPERTY_HINT_ENUM] # Array of integers (an enum).
  1987. hint_string = "%d/%d:*.png" % [TYPE_STRING, PROPERTY_HINT_FILE] # Array of strings (file paths).
  1988. hint_string = "%d/%d:Texture2D" % [TYPE_OBJECT, PROPERTY_HINT_RESOURCE_TYPE] # Array of textures.
  1989. hint_string = "%d:%d:" % [TYPE_ARRAY, TYPE_FLOAT] # Two-dimensional array of floats.
  1990. hint_string = "%d:%d/%d:" % [TYPE_ARRAY, TYPE_STRING, PROPERTY_HINT_MULTILINE_TEXT] # Two-dimensional array of multiline strings.
  1991. hint_string = "%d:%d/%d:-1,1,0.1" % [TYPE_ARRAY, TYPE_FLOAT, PROPERTY_HINT_RANGE] # Two-dimensional array of floats (in range from -1 to 1).
  1992. hint_string = "%d:%d/%d:Texture2D" % [TYPE_ARRAY, TYPE_OBJECT, PROPERTY_HINT_RESOURCE_TYPE] # Two-dimensional array of textures.
  1993. .. code-tab:: csharp
  1994. hintString = $"{Variant.Type.Int:D}/{PropertyHint.Range:D}:1,10,1"; // Array of integers (in range from 1 to 10).
  1995. hintString = $"{Variant.Type.Int:D}/{PropertyHint.Enum:D}:Zero,One,Two"; // Array of integers (an enum).
  1996. hintString = $"{Variant.Type.Int:D}/{PropertyHint.Enum:D}:Zero,One,Three:3,Six:6"; // Array of integers (an enum).
  1997. hintString = $"{Variant.Type.String:D}/{PropertyHint.File:D}:*.png"; // Array of strings (file paths).
  1998. hintString = $"{Variant.Type.Object:D}/{PropertyHint.ResourceType:D}:Texture2D"; // Array of textures.
  1999. hintString = $"{Variant.Type.Array:D}:{Variant.Type.Float:D}:"; // Two-dimensional array of floats.
  2000. hintString = $"{Variant.Type.Array:D}:{Variant.Type.String:D}/{PropertyHint.MultilineText:D}:"; // Two-dimensional array of multiline strings.
  2001. hintString = $"{Variant.Type.Array:D}:{Variant.Type.Float:D}/{PropertyHint.Range:D}:-1,1,0.1"; // Two-dimensional array of floats (in range from -1 to 1).
  2002. hintString = $"{Variant.Type.Array:D}:{Variant.Type.Object:D}/{PropertyHint.ResourceType:D}:Texture2D"; // Two-dimensional array of textures.
  2003. \ **Note:** The trailing colon is required for properly detecting built-in types.
  2004. .. _class_@GlobalScope_constant_PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE:
  2005. .. rst-class:: classref-enumeration-constant
  2006. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE** = ``24``
  2007. .. _class_@GlobalScope_constant_PROPERTY_HINT_OBJECT_TOO_BIG:
  2008. .. rst-class:: classref-enumeration-constant
  2009. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_OBJECT_TOO_BIG** = ``25``
  2010. .. _class_@GlobalScope_constant_PROPERTY_HINT_NODE_PATH_VALID_TYPES:
  2011. .. rst-class:: classref-enumeration-constant
  2012. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_NODE_PATH_VALID_TYPES** = ``26``
  2013. .. _class_@GlobalScope_constant_PROPERTY_HINT_SAVE_FILE:
  2014. .. rst-class:: classref-enumeration-constant
  2015. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_SAVE_FILE** = ``27``
  2016. .. _class_@GlobalScope_constant_PROPERTY_HINT_GLOBAL_SAVE_FILE:
  2017. .. rst-class:: classref-enumeration-constant
  2018. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_GLOBAL_SAVE_FILE** = ``28``
  2019. .. _class_@GlobalScope_constant_PROPERTY_HINT_INT_IS_OBJECTID:
  2020. .. rst-class:: classref-enumeration-constant
  2021. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_INT_IS_OBJECTID** = ``29``
  2022. .. _class_@GlobalScope_constant_PROPERTY_HINT_INT_IS_POINTER:
  2023. .. rst-class:: classref-enumeration-constant
  2024. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_INT_IS_POINTER** = ``30``
  2025. .. _class_@GlobalScope_constant_PROPERTY_HINT_ARRAY_TYPE:
  2026. .. rst-class:: classref-enumeration-constant
  2027. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_ARRAY_TYPE** = ``31``
  2028. .. _class_@GlobalScope_constant_PROPERTY_HINT_LOCALE_ID:
  2029. .. rst-class:: classref-enumeration-constant
  2030. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_LOCALE_ID** = ``32``
  2031. Hints that a string property is a locale code. Editing it will show a locale dialog for picking language and country.
  2032. .. _class_@GlobalScope_constant_PROPERTY_HINT_LOCALIZABLE_STRING:
  2033. .. rst-class:: classref-enumeration-constant
  2034. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_LOCALIZABLE_STRING** = ``33``
  2035. Hints that a dictionary property is string translation map. Dictionary keys are locale codes and, values are translated strings.
  2036. .. _class_@GlobalScope_constant_PROPERTY_HINT_NODE_TYPE:
  2037. .. rst-class:: classref-enumeration-constant
  2038. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_NODE_TYPE** = ``34``
  2039. .. _class_@GlobalScope_constant_PROPERTY_HINT_HIDE_QUATERNION_EDIT:
  2040. .. rst-class:: classref-enumeration-constant
  2041. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_HIDE_QUATERNION_EDIT** = ``35``
  2042. Hints that a quaternion property should disable the temporary euler editor.
  2043. .. _class_@GlobalScope_constant_PROPERTY_HINT_PASSWORD:
  2044. .. rst-class:: classref-enumeration-constant
  2045. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_PASSWORD** = ``36``
  2046. Hints that a string property is a password, and every character is replaced with the secret character.
  2047. .. _class_@GlobalScope_constant_PROPERTY_HINT_MAX:
  2048. .. rst-class:: classref-enumeration-constant
  2049. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_MAX** = ``38``
  2050. Represents the size of the :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` enum.
  2051. .. rst-class:: classref-item-separator
  2052. ----
  2053. .. _enum_@GlobalScope_PropertyUsageFlags:
  2054. .. rst-class:: classref-enumeration
  2055. flags **PropertyUsageFlags**:
  2056. .. _class_@GlobalScope_constant_PROPERTY_USAGE_NONE:
  2057. .. rst-class:: classref-enumeration-constant
  2058. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_NONE** = ``0``
  2059. The property is not stored, and does not display in the editor. This is the default for non-exported properties.
  2060. .. _class_@GlobalScope_constant_PROPERTY_USAGE_STORAGE:
  2061. .. rst-class:: classref-enumeration-constant
  2062. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_STORAGE** = ``2``
  2063. The property is serialized and saved in the scene file (default).
  2064. .. _class_@GlobalScope_constant_PROPERTY_USAGE_EDITOR:
  2065. .. rst-class:: classref-enumeration-constant
  2066. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_EDITOR** = ``4``
  2067. The property is shown in the :ref:`EditorInspector<class_EditorInspector>` (default).
  2068. .. _class_@GlobalScope_constant_PROPERTY_USAGE_INTERNAL:
  2069. .. rst-class:: classref-enumeration-constant
  2070. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_INTERNAL** = ``8``
  2071. The property is excluded from the class reference.
  2072. .. _class_@GlobalScope_constant_PROPERTY_USAGE_CHECKABLE:
  2073. .. rst-class:: classref-enumeration-constant
  2074. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_CHECKABLE** = ``16``
  2075. The property can be checked in the :ref:`EditorInspector<class_EditorInspector>`.
  2076. .. _class_@GlobalScope_constant_PROPERTY_USAGE_CHECKED:
  2077. .. rst-class:: classref-enumeration-constant
  2078. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_CHECKED** = ``32``
  2079. The property is checked in the :ref:`EditorInspector<class_EditorInspector>`.
  2080. .. _class_@GlobalScope_constant_PROPERTY_USAGE_GROUP:
  2081. .. rst-class:: classref-enumeration-constant
  2082. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_GROUP** = ``64``
  2083. Used to group properties together in the editor. See :ref:`EditorInspector<class_EditorInspector>`.
  2084. .. _class_@GlobalScope_constant_PROPERTY_USAGE_CATEGORY:
  2085. .. rst-class:: classref-enumeration-constant
  2086. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_CATEGORY** = ``128``
  2087. Used to categorize properties together in the editor.
  2088. .. _class_@GlobalScope_constant_PROPERTY_USAGE_SUBGROUP:
  2089. .. rst-class:: classref-enumeration-constant
  2090. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_SUBGROUP** = ``256``
  2091. Used to group properties together in the editor in a subgroup (under a group). See :ref:`EditorInspector<class_EditorInspector>`.
  2092. .. _class_@GlobalScope_constant_PROPERTY_USAGE_CLASS_IS_BITFIELD:
  2093. .. rst-class:: classref-enumeration-constant
  2094. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_CLASS_IS_BITFIELD** = ``512``
  2095. .. _class_@GlobalScope_constant_PROPERTY_USAGE_NO_INSTANCE_STATE:
  2096. .. rst-class:: classref-enumeration-constant
  2097. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_NO_INSTANCE_STATE** = ``1024``
  2098. The property does not save its state in :ref:`PackedScene<class_PackedScene>`.
  2099. .. _class_@GlobalScope_constant_PROPERTY_USAGE_RESTART_IF_CHANGED:
  2100. .. rst-class:: classref-enumeration-constant
  2101. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_RESTART_IF_CHANGED** = ``2048``
  2102. Editing the property prompts the user for restarting the editor.
  2103. .. _class_@GlobalScope_constant_PROPERTY_USAGE_SCRIPT_VARIABLE:
  2104. .. rst-class:: classref-enumeration-constant
  2105. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_SCRIPT_VARIABLE** = ``4096``
  2106. The property is a script variable which should be serialized and saved in the scene file.
  2107. .. _class_@GlobalScope_constant_PROPERTY_USAGE_STORE_IF_NULL:
  2108. .. rst-class:: classref-enumeration-constant
  2109. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_STORE_IF_NULL** = ``8192``
  2110. .. _class_@GlobalScope_constant_PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED:
  2111. .. rst-class:: classref-enumeration-constant
  2112. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED** = ``16384``
  2113. .. _class_@GlobalScope_constant_PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE:
  2114. .. rst-class:: classref-enumeration-constant
  2115. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE** = ``32768``
  2116. .. _class_@GlobalScope_constant_PROPERTY_USAGE_CLASS_IS_ENUM:
  2117. .. rst-class:: classref-enumeration-constant
  2118. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_CLASS_IS_ENUM** = ``65536``
  2119. .. _class_@GlobalScope_constant_PROPERTY_USAGE_NIL_IS_VARIANT:
  2120. .. rst-class:: classref-enumeration-constant
  2121. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_NIL_IS_VARIANT** = ``131072``
  2122. .. _class_@GlobalScope_constant_PROPERTY_USAGE_ARRAY:
  2123. .. rst-class:: classref-enumeration-constant
  2124. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_ARRAY** = ``262144``
  2125. The property is an array.
  2126. .. _class_@GlobalScope_constant_PROPERTY_USAGE_ALWAYS_DUPLICATE:
  2127. .. rst-class:: classref-enumeration-constant
  2128. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_ALWAYS_DUPLICATE** = ``524288``
  2129. When duplicating a resource with :ref:`Resource.duplicate<class_Resource_method_duplicate>`, and this flag is set on a property of that resource, the property should always be duplicated, regardless of the ``subresources`` bool parameter.
  2130. .. _class_@GlobalScope_constant_PROPERTY_USAGE_NEVER_DUPLICATE:
  2131. .. rst-class:: classref-enumeration-constant
  2132. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_NEVER_DUPLICATE** = ``1048576``
  2133. When duplicating a resource with :ref:`Resource.duplicate<class_Resource_method_duplicate>`, and this flag is set on a property of that resource, the property should never be duplicated, regardless of the ``subresources`` bool parameter.
  2134. .. _class_@GlobalScope_constant_PROPERTY_USAGE_HIGH_END_GFX:
  2135. .. rst-class:: classref-enumeration-constant
  2136. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_HIGH_END_GFX** = ``2097152``
  2137. The property is only shown in the editor if modern renderers are supported (the Compatibility rendering method is excluded).
  2138. .. _class_@GlobalScope_constant_PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT:
  2139. .. rst-class:: classref-enumeration-constant
  2140. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT** = ``4194304``
  2141. .. _class_@GlobalScope_constant_PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT:
  2142. .. rst-class:: classref-enumeration-constant
  2143. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT** = ``8388608``
  2144. .. _class_@GlobalScope_constant_PROPERTY_USAGE_KEYING_INCREMENTS:
  2145. .. rst-class:: classref-enumeration-constant
  2146. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_KEYING_INCREMENTS** = ``16777216``
  2147. .. _class_@GlobalScope_constant_PROPERTY_USAGE_DEFERRED_SET_RESOURCE:
  2148. .. rst-class:: classref-enumeration-constant
  2149. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_DEFERRED_SET_RESOURCE** = ``33554432``
  2150. .. _class_@GlobalScope_constant_PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT:
  2151. .. rst-class:: classref-enumeration-constant
  2152. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT** = ``67108864``
  2153. .. _class_@GlobalScope_constant_PROPERTY_USAGE_EDITOR_BASIC_SETTING:
  2154. .. rst-class:: classref-enumeration-constant
  2155. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_EDITOR_BASIC_SETTING** = ``134217728``
  2156. .. _class_@GlobalScope_constant_PROPERTY_USAGE_READ_ONLY:
  2157. .. rst-class:: classref-enumeration-constant
  2158. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_READ_ONLY** = ``268435456``
  2159. The property is read-only in the :ref:`EditorInspector<class_EditorInspector>`.
  2160. .. _class_@GlobalScope_constant_PROPERTY_USAGE_SECRET:
  2161. .. rst-class:: classref-enumeration-constant
  2162. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_SECRET** = ``536870912``
  2163. An export preset property with this flag contains confidential information and is stored separately from the rest of the export preset configuration.
  2164. .. _class_@GlobalScope_constant_PROPERTY_USAGE_DEFAULT:
  2165. .. rst-class:: classref-enumeration-constant
  2166. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_DEFAULT** = ``6``
  2167. Default usage (storage and editor).
  2168. .. _class_@GlobalScope_constant_PROPERTY_USAGE_NO_EDITOR:
  2169. .. rst-class:: classref-enumeration-constant
  2170. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_NO_EDITOR** = ``2``
  2171. Default usage but without showing the property in the editor (storage).
  2172. .. rst-class:: classref-item-separator
  2173. ----
  2174. .. _enum_@GlobalScope_MethodFlags:
  2175. .. rst-class:: classref-enumeration
  2176. flags **MethodFlags**:
  2177. .. _class_@GlobalScope_constant_METHOD_FLAG_NORMAL:
  2178. .. rst-class:: classref-enumeration-constant
  2179. :ref:`MethodFlags<enum_@GlobalScope_MethodFlags>` **METHOD_FLAG_NORMAL** = ``1``
  2180. Flag for a normal method.
  2181. .. _class_@GlobalScope_constant_METHOD_FLAG_EDITOR:
  2182. .. rst-class:: classref-enumeration-constant
  2183. :ref:`MethodFlags<enum_@GlobalScope_MethodFlags>` **METHOD_FLAG_EDITOR** = ``2``
  2184. Flag for an editor method.
  2185. .. _class_@GlobalScope_constant_METHOD_FLAG_CONST:
  2186. .. rst-class:: classref-enumeration-constant
  2187. :ref:`MethodFlags<enum_@GlobalScope_MethodFlags>` **METHOD_FLAG_CONST** = ``4``
  2188. Flag for a constant method.
  2189. .. _class_@GlobalScope_constant_METHOD_FLAG_VIRTUAL:
  2190. .. rst-class:: classref-enumeration-constant
  2191. :ref:`MethodFlags<enum_@GlobalScope_MethodFlags>` **METHOD_FLAG_VIRTUAL** = ``8``
  2192. Flag for a virtual method.
  2193. .. _class_@GlobalScope_constant_METHOD_FLAG_VARARG:
  2194. .. rst-class:: classref-enumeration-constant
  2195. :ref:`MethodFlags<enum_@GlobalScope_MethodFlags>` **METHOD_FLAG_VARARG** = ``16``
  2196. Flag for a method with a variable number of arguments.
  2197. .. _class_@GlobalScope_constant_METHOD_FLAG_STATIC:
  2198. .. rst-class:: classref-enumeration-constant
  2199. :ref:`MethodFlags<enum_@GlobalScope_MethodFlags>` **METHOD_FLAG_STATIC** = ``32``
  2200. Flag for a static method.
  2201. .. _class_@GlobalScope_constant_METHOD_FLAG_OBJECT_CORE:
  2202. .. rst-class:: classref-enumeration-constant
  2203. :ref:`MethodFlags<enum_@GlobalScope_MethodFlags>` **METHOD_FLAG_OBJECT_CORE** = ``64``
  2204. Used internally. Allows to not dump core virtual methods (such as :ref:`Object._notification<class_Object_method__notification>`) to the JSON API.
  2205. .. _class_@GlobalScope_constant_METHOD_FLAGS_DEFAULT:
  2206. .. rst-class:: classref-enumeration-constant
  2207. :ref:`MethodFlags<enum_@GlobalScope_MethodFlags>` **METHOD_FLAGS_DEFAULT** = ``1``
  2208. Default method flags (normal).
  2209. .. rst-class:: classref-item-separator
  2210. ----
  2211. .. _enum_@GlobalScope_Variant.Type:
  2212. .. rst-class:: classref-enumeration
  2213. enum **Variant.Type**:
  2214. .. _class_@GlobalScope_constant_TYPE_NIL:
  2215. .. rst-class:: classref-enumeration-constant
  2216. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_NIL** = ``0``
  2217. Variable is ``null``.
  2218. .. _class_@GlobalScope_constant_TYPE_BOOL:
  2219. .. rst-class:: classref-enumeration-constant
  2220. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_BOOL** = ``1``
  2221. Variable is of type :ref:`bool<class_bool>`.
  2222. .. _class_@GlobalScope_constant_TYPE_INT:
  2223. .. rst-class:: classref-enumeration-constant
  2224. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_INT** = ``2``
  2225. Variable is of type :ref:`int<class_int>`.
  2226. .. _class_@GlobalScope_constant_TYPE_FLOAT:
  2227. .. rst-class:: classref-enumeration-constant
  2228. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_FLOAT** = ``3``
  2229. Variable is of type :ref:`float<class_float>`.
  2230. .. _class_@GlobalScope_constant_TYPE_STRING:
  2231. .. rst-class:: classref-enumeration-constant
  2232. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_STRING** = ``4``
  2233. Variable is of type :ref:`String<class_String>`.
  2234. .. _class_@GlobalScope_constant_TYPE_VECTOR2:
  2235. .. rst-class:: classref-enumeration-constant
  2236. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_VECTOR2** = ``5``
  2237. Variable is of type :ref:`Vector2<class_Vector2>`.
  2238. .. _class_@GlobalScope_constant_TYPE_VECTOR2I:
  2239. .. rst-class:: classref-enumeration-constant
  2240. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_VECTOR2I** = ``6``
  2241. Variable is of type :ref:`Vector2i<class_Vector2i>`.
  2242. .. _class_@GlobalScope_constant_TYPE_RECT2:
  2243. .. rst-class:: classref-enumeration-constant
  2244. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_RECT2** = ``7``
  2245. Variable is of type :ref:`Rect2<class_Rect2>`.
  2246. .. _class_@GlobalScope_constant_TYPE_RECT2I:
  2247. .. rst-class:: classref-enumeration-constant
  2248. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_RECT2I** = ``8``
  2249. Variable is of type :ref:`Rect2i<class_Rect2i>`.
  2250. .. _class_@GlobalScope_constant_TYPE_VECTOR3:
  2251. .. rst-class:: classref-enumeration-constant
  2252. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_VECTOR3** = ``9``
  2253. Variable is of type :ref:`Vector3<class_Vector3>`.
  2254. .. _class_@GlobalScope_constant_TYPE_VECTOR3I:
  2255. .. rst-class:: classref-enumeration-constant
  2256. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_VECTOR3I** = ``10``
  2257. Variable is of type :ref:`Vector3i<class_Vector3i>`.
  2258. .. _class_@GlobalScope_constant_TYPE_TRANSFORM2D:
  2259. .. rst-class:: classref-enumeration-constant
  2260. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_TRANSFORM2D** = ``11``
  2261. Variable is of type :ref:`Transform2D<class_Transform2D>`.
  2262. .. _class_@GlobalScope_constant_TYPE_VECTOR4:
  2263. .. rst-class:: classref-enumeration-constant
  2264. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_VECTOR4** = ``12``
  2265. Variable is of type :ref:`Vector4<class_Vector4>`.
  2266. .. _class_@GlobalScope_constant_TYPE_VECTOR4I:
  2267. .. rst-class:: classref-enumeration-constant
  2268. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_VECTOR4I** = ``13``
  2269. Variable is of type :ref:`Vector4i<class_Vector4i>`.
  2270. .. _class_@GlobalScope_constant_TYPE_PLANE:
  2271. .. rst-class:: classref-enumeration-constant
  2272. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_PLANE** = ``14``
  2273. Variable is of type :ref:`Plane<class_Plane>`.
  2274. .. _class_@GlobalScope_constant_TYPE_QUATERNION:
  2275. .. rst-class:: classref-enumeration-constant
  2276. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_QUATERNION** = ``15``
  2277. Variable is of type :ref:`Quaternion<class_Quaternion>`.
  2278. .. _class_@GlobalScope_constant_TYPE_AABB:
  2279. .. rst-class:: classref-enumeration-constant
  2280. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_AABB** = ``16``
  2281. Variable is of type :ref:`AABB<class_AABB>`.
  2282. .. _class_@GlobalScope_constant_TYPE_BASIS:
  2283. .. rst-class:: classref-enumeration-constant
  2284. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_BASIS** = ``17``
  2285. Variable is of type :ref:`Basis<class_Basis>`.
  2286. .. _class_@GlobalScope_constant_TYPE_TRANSFORM3D:
  2287. .. rst-class:: classref-enumeration-constant
  2288. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_TRANSFORM3D** = ``18``
  2289. Variable is of type :ref:`Transform3D<class_Transform3D>`.
  2290. .. _class_@GlobalScope_constant_TYPE_PROJECTION:
  2291. .. rst-class:: classref-enumeration-constant
  2292. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_PROJECTION** = ``19``
  2293. Variable is of type :ref:`Projection<class_Projection>`.
  2294. .. _class_@GlobalScope_constant_TYPE_COLOR:
  2295. .. rst-class:: classref-enumeration-constant
  2296. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_COLOR** = ``20``
  2297. Variable is of type :ref:`Color<class_Color>`.
  2298. .. _class_@GlobalScope_constant_TYPE_STRING_NAME:
  2299. .. rst-class:: classref-enumeration-constant
  2300. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_STRING_NAME** = ``21``
  2301. Variable is of type :ref:`StringName<class_StringName>`.
  2302. .. _class_@GlobalScope_constant_TYPE_NODE_PATH:
  2303. .. rst-class:: classref-enumeration-constant
  2304. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_NODE_PATH** = ``22``
  2305. Variable is of type :ref:`NodePath<class_NodePath>`.
  2306. .. _class_@GlobalScope_constant_TYPE_RID:
  2307. .. rst-class:: classref-enumeration-constant
  2308. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_RID** = ``23``
  2309. Variable is of type :ref:`RID<class_RID>`.
  2310. .. _class_@GlobalScope_constant_TYPE_OBJECT:
  2311. .. rst-class:: classref-enumeration-constant
  2312. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_OBJECT** = ``24``
  2313. Variable is of type :ref:`Object<class_Object>`.
  2314. .. _class_@GlobalScope_constant_TYPE_CALLABLE:
  2315. .. rst-class:: classref-enumeration-constant
  2316. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_CALLABLE** = ``25``
  2317. Variable is of type :ref:`Callable<class_Callable>`.
  2318. .. _class_@GlobalScope_constant_TYPE_SIGNAL:
  2319. .. rst-class:: classref-enumeration-constant
  2320. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_SIGNAL** = ``26``
  2321. Variable is of type :ref:`Signal<class_Signal>`.
  2322. .. _class_@GlobalScope_constant_TYPE_DICTIONARY:
  2323. .. rst-class:: classref-enumeration-constant
  2324. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_DICTIONARY** = ``27``
  2325. Variable is of type :ref:`Dictionary<class_Dictionary>`.
  2326. .. _class_@GlobalScope_constant_TYPE_ARRAY:
  2327. .. rst-class:: classref-enumeration-constant
  2328. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_ARRAY** = ``28``
  2329. Variable is of type :ref:`Array<class_Array>`.
  2330. .. _class_@GlobalScope_constant_TYPE_PACKED_BYTE_ARRAY:
  2331. .. rst-class:: classref-enumeration-constant
  2332. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_PACKED_BYTE_ARRAY** = ``29``
  2333. Variable is of type :ref:`PackedByteArray<class_PackedByteArray>`.
  2334. .. _class_@GlobalScope_constant_TYPE_PACKED_INT32_ARRAY:
  2335. .. rst-class:: classref-enumeration-constant
  2336. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_PACKED_INT32_ARRAY** = ``30``
  2337. Variable is of type :ref:`PackedInt32Array<class_PackedInt32Array>`.
  2338. .. _class_@GlobalScope_constant_TYPE_PACKED_INT64_ARRAY:
  2339. .. rst-class:: classref-enumeration-constant
  2340. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_PACKED_INT64_ARRAY** = ``31``
  2341. Variable is of type :ref:`PackedInt64Array<class_PackedInt64Array>`.
  2342. .. _class_@GlobalScope_constant_TYPE_PACKED_FLOAT32_ARRAY:
  2343. .. rst-class:: classref-enumeration-constant
  2344. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_PACKED_FLOAT32_ARRAY** = ``32``
  2345. Variable is of type :ref:`PackedFloat32Array<class_PackedFloat32Array>`.
  2346. .. _class_@GlobalScope_constant_TYPE_PACKED_FLOAT64_ARRAY:
  2347. .. rst-class:: classref-enumeration-constant
  2348. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_PACKED_FLOAT64_ARRAY** = ``33``
  2349. Variable is of type :ref:`PackedFloat64Array<class_PackedFloat64Array>`.
  2350. .. _class_@GlobalScope_constant_TYPE_PACKED_STRING_ARRAY:
  2351. .. rst-class:: classref-enumeration-constant
  2352. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_PACKED_STRING_ARRAY** = ``34``
  2353. Variable is of type :ref:`PackedStringArray<class_PackedStringArray>`.
  2354. .. _class_@GlobalScope_constant_TYPE_PACKED_VECTOR2_ARRAY:
  2355. .. rst-class:: classref-enumeration-constant
  2356. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_PACKED_VECTOR2_ARRAY** = ``35``
  2357. Variable is of type :ref:`PackedVector2Array<class_PackedVector2Array>`.
  2358. .. _class_@GlobalScope_constant_TYPE_PACKED_VECTOR3_ARRAY:
  2359. .. rst-class:: classref-enumeration-constant
  2360. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_PACKED_VECTOR3_ARRAY** = ``36``
  2361. Variable is of type :ref:`PackedVector3Array<class_PackedVector3Array>`.
  2362. .. _class_@GlobalScope_constant_TYPE_PACKED_COLOR_ARRAY:
  2363. .. rst-class:: classref-enumeration-constant
  2364. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_PACKED_COLOR_ARRAY** = ``37``
  2365. Variable is of type :ref:`PackedColorArray<class_PackedColorArray>`.
  2366. .. _class_@GlobalScope_constant_TYPE_MAX:
  2367. .. rst-class:: classref-enumeration-constant
  2368. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_MAX** = ``38``
  2369. Represents the size of the :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` enum.
  2370. .. rst-class:: classref-item-separator
  2371. ----
  2372. .. _enum_@GlobalScope_Variant.Operator:
  2373. .. rst-class:: classref-enumeration
  2374. enum **Variant.Operator**:
  2375. .. _class_@GlobalScope_constant_OP_EQUAL:
  2376. .. rst-class:: classref-enumeration-constant
  2377. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_EQUAL** = ``0``
  2378. Equality operator (``==``).
  2379. .. _class_@GlobalScope_constant_OP_NOT_EQUAL:
  2380. .. rst-class:: classref-enumeration-constant
  2381. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_NOT_EQUAL** = ``1``
  2382. Inequality operator (``!=``).
  2383. .. _class_@GlobalScope_constant_OP_LESS:
  2384. .. rst-class:: classref-enumeration-constant
  2385. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_LESS** = ``2``
  2386. Less than operator (``<``).
  2387. .. _class_@GlobalScope_constant_OP_LESS_EQUAL:
  2388. .. rst-class:: classref-enumeration-constant
  2389. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_LESS_EQUAL** = ``3``
  2390. Less than or equal operator (``<=``).
  2391. .. _class_@GlobalScope_constant_OP_GREATER:
  2392. .. rst-class:: classref-enumeration-constant
  2393. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_GREATER** = ``4``
  2394. Greater than operator (``>``).
  2395. .. _class_@GlobalScope_constant_OP_GREATER_EQUAL:
  2396. .. rst-class:: classref-enumeration-constant
  2397. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_GREATER_EQUAL** = ``5``
  2398. Greater than or equal operator (``>=``).
  2399. .. _class_@GlobalScope_constant_OP_ADD:
  2400. .. rst-class:: classref-enumeration-constant
  2401. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_ADD** = ``6``
  2402. Addition operator (``+``).
  2403. .. _class_@GlobalScope_constant_OP_SUBTRACT:
  2404. .. rst-class:: classref-enumeration-constant
  2405. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_SUBTRACT** = ``7``
  2406. Subtraction operator (``-``).
  2407. .. _class_@GlobalScope_constant_OP_MULTIPLY:
  2408. .. rst-class:: classref-enumeration-constant
  2409. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_MULTIPLY** = ``8``
  2410. Multiplication operator (``*``).
  2411. .. _class_@GlobalScope_constant_OP_DIVIDE:
  2412. .. rst-class:: classref-enumeration-constant
  2413. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_DIVIDE** = ``9``
  2414. Division operator (``/``).
  2415. .. _class_@GlobalScope_constant_OP_NEGATE:
  2416. .. rst-class:: classref-enumeration-constant
  2417. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_NEGATE** = ``10``
  2418. Unary negation operator (``-``).
  2419. .. _class_@GlobalScope_constant_OP_POSITIVE:
  2420. .. rst-class:: classref-enumeration-constant
  2421. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_POSITIVE** = ``11``
  2422. Unary plus operator (``+``).
  2423. .. _class_@GlobalScope_constant_OP_MODULE:
  2424. .. rst-class:: classref-enumeration-constant
  2425. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_MODULE** = ``12``
  2426. Remainder/modulo operator (``%``).
  2427. .. _class_@GlobalScope_constant_OP_POWER:
  2428. .. rst-class:: classref-enumeration-constant
  2429. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_POWER** = ``13``
  2430. Power operator (``**``).
  2431. .. _class_@GlobalScope_constant_OP_SHIFT_LEFT:
  2432. .. rst-class:: classref-enumeration-constant
  2433. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_SHIFT_LEFT** = ``14``
  2434. Left shift operator (``<<``).
  2435. .. _class_@GlobalScope_constant_OP_SHIFT_RIGHT:
  2436. .. rst-class:: classref-enumeration-constant
  2437. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_SHIFT_RIGHT** = ``15``
  2438. Right shift operator (``>>``).
  2439. .. _class_@GlobalScope_constant_OP_BIT_AND:
  2440. .. rst-class:: classref-enumeration-constant
  2441. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_BIT_AND** = ``16``
  2442. Bitwise AND operator (``&``).
  2443. .. _class_@GlobalScope_constant_OP_BIT_OR:
  2444. .. rst-class:: classref-enumeration-constant
  2445. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_BIT_OR** = ``17``
  2446. Bitwise OR operator (``|``).
  2447. .. _class_@GlobalScope_constant_OP_BIT_XOR:
  2448. .. rst-class:: classref-enumeration-constant
  2449. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_BIT_XOR** = ``18``
  2450. Bitwise XOR operator (``^``).
  2451. .. _class_@GlobalScope_constant_OP_BIT_NEGATE:
  2452. .. rst-class:: classref-enumeration-constant
  2453. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_BIT_NEGATE** = ``19``
  2454. Bitwise NOT operator (``~``).
  2455. .. _class_@GlobalScope_constant_OP_AND:
  2456. .. rst-class:: classref-enumeration-constant
  2457. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_AND** = ``20``
  2458. Logical AND operator (``and`` or ``&&``).
  2459. .. _class_@GlobalScope_constant_OP_OR:
  2460. .. rst-class:: classref-enumeration-constant
  2461. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_OR** = ``21``
  2462. Logical OR operator (``or`` or ``||``).
  2463. .. _class_@GlobalScope_constant_OP_XOR:
  2464. .. rst-class:: classref-enumeration-constant
  2465. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_XOR** = ``22``
  2466. Logical XOR operator (not implemented in GDScript).
  2467. .. _class_@GlobalScope_constant_OP_NOT:
  2468. .. rst-class:: classref-enumeration-constant
  2469. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_NOT** = ``23``
  2470. Logical NOT operator (``not`` or ``!``).
  2471. .. _class_@GlobalScope_constant_OP_IN:
  2472. .. rst-class:: classref-enumeration-constant
  2473. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_IN** = ``24``
  2474. Logical IN operator (``in``).
  2475. .. _class_@GlobalScope_constant_OP_MAX:
  2476. .. rst-class:: classref-enumeration-constant
  2477. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_MAX** = ``25``
  2478. Represents the size of the :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` enum.
  2479. .. rst-class:: classref-section-separator
  2480. ----
  2481. .. rst-class:: classref-descriptions-group
  2482. Property Descriptions
  2483. ---------------------
  2484. .. _class_@GlobalScope_property_AudioServer:
  2485. .. rst-class:: classref-property
  2486. :ref:`AudioServer<class_AudioServer>` **AudioServer**
  2487. The :ref:`AudioServer<class_AudioServer>` singleton.
  2488. .. rst-class:: classref-item-separator
  2489. ----
  2490. .. _class_@GlobalScope_property_CameraServer:
  2491. .. rst-class:: classref-property
  2492. :ref:`CameraServer<class_CameraServer>` **CameraServer**
  2493. The :ref:`CameraServer<class_CameraServer>` singleton.
  2494. .. rst-class:: classref-item-separator
  2495. ----
  2496. .. _class_@GlobalScope_property_ClassDB:
  2497. .. rst-class:: classref-property
  2498. :ref:`ClassDB<class_ClassDB>` **ClassDB**
  2499. The :ref:`ClassDB<class_ClassDB>` singleton.
  2500. .. rst-class:: classref-item-separator
  2501. ----
  2502. .. _class_@GlobalScope_property_DisplayServer:
  2503. .. rst-class:: classref-property
  2504. :ref:`DisplayServer<class_DisplayServer>` **DisplayServer**
  2505. The :ref:`DisplayServer<class_DisplayServer>` singleton.
  2506. .. rst-class:: classref-item-separator
  2507. ----
  2508. .. _class_@GlobalScope_property_EditorInterface:
  2509. .. rst-class:: classref-property
  2510. :ref:`EditorInterface<class_EditorInterface>` **EditorInterface**
  2511. The :ref:`EditorInterface<class_EditorInterface>` singleton.
  2512. \ **Note:** Only available in editor builds.
  2513. .. rst-class:: classref-item-separator
  2514. ----
  2515. .. _class_@GlobalScope_property_Engine:
  2516. .. rst-class:: classref-property
  2517. :ref:`Engine<class_Engine>` **Engine**
  2518. The :ref:`Engine<class_Engine>` singleton.
  2519. .. rst-class:: classref-item-separator
  2520. ----
  2521. .. _class_@GlobalScope_property_EngineDebugger:
  2522. .. rst-class:: classref-property
  2523. :ref:`EngineDebugger<class_EngineDebugger>` **EngineDebugger**
  2524. The :ref:`EngineDebugger<class_EngineDebugger>` singleton.
  2525. .. rst-class:: classref-item-separator
  2526. ----
  2527. .. _class_@GlobalScope_property_GDExtensionManager:
  2528. .. rst-class:: classref-property
  2529. :ref:`GDExtensionManager<class_GDExtensionManager>` **GDExtensionManager**
  2530. The :ref:`GDExtensionManager<class_GDExtensionManager>` singleton.
  2531. .. rst-class:: classref-item-separator
  2532. ----
  2533. .. _class_@GlobalScope_property_Geometry2D:
  2534. .. rst-class:: classref-property
  2535. :ref:`Geometry2D<class_Geometry2D>` **Geometry2D**
  2536. The :ref:`Geometry2D<class_Geometry2D>` singleton.
  2537. .. rst-class:: classref-item-separator
  2538. ----
  2539. .. _class_@GlobalScope_property_Geometry3D:
  2540. .. rst-class:: classref-property
  2541. :ref:`Geometry3D<class_Geometry3D>` **Geometry3D**
  2542. The :ref:`Geometry3D<class_Geometry3D>` singleton.
  2543. .. rst-class:: classref-item-separator
  2544. ----
  2545. .. _class_@GlobalScope_property_GodotSharp:
  2546. .. rst-class:: classref-property
  2547. :ref:`GodotSharp<class_GodotSharp>` **GodotSharp**
  2548. The :ref:`GodotSharp<class_GodotSharp>` singleton.
  2549. .. rst-class:: classref-item-separator
  2550. ----
  2551. .. _class_@GlobalScope_property_IP:
  2552. .. rst-class:: classref-property
  2553. :ref:`IP<class_IP>` **IP**
  2554. The :ref:`IP<class_IP>` singleton.
  2555. .. rst-class:: classref-item-separator
  2556. ----
  2557. .. _class_@GlobalScope_property_Input:
  2558. .. rst-class:: classref-property
  2559. :ref:`Input<class_Input>` **Input**
  2560. The :ref:`Input<class_Input>` singleton.
  2561. .. rst-class:: classref-item-separator
  2562. ----
  2563. .. _class_@GlobalScope_property_InputMap:
  2564. .. rst-class:: classref-property
  2565. :ref:`InputMap<class_InputMap>` **InputMap**
  2566. The :ref:`InputMap<class_InputMap>` singleton.
  2567. .. rst-class:: classref-item-separator
  2568. ----
  2569. .. _class_@GlobalScope_property_JavaClassWrapper:
  2570. .. rst-class:: classref-property
  2571. :ref:`JavaClassWrapper<class_JavaClassWrapper>` **JavaClassWrapper**
  2572. The :ref:`JavaClassWrapper<class_JavaClassWrapper>` singleton.
  2573. \ **Note:** Only implemented on Android.
  2574. .. rst-class:: classref-item-separator
  2575. ----
  2576. .. _class_@GlobalScope_property_JavaScriptBridge:
  2577. .. rst-class:: classref-property
  2578. :ref:`JavaScriptBridge<class_JavaScriptBridge>` **JavaScriptBridge**
  2579. The :ref:`JavaScriptBridge<class_JavaScriptBridge>` singleton.
  2580. \ **Note:** Only implemented on the Web platform.
  2581. .. rst-class:: classref-item-separator
  2582. ----
  2583. .. _class_@GlobalScope_property_Marshalls:
  2584. .. rst-class:: classref-property
  2585. :ref:`Marshalls<class_Marshalls>` **Marshalls**
  2586. The :ref:`Marshalls<class_Marshalls>` singleton.
  2587. .. rst-class:: classref-item-separator
  2588. ----
  2589. .. _class_@GlobalScope_property_NavigationMeshGenerator:
  2590. .. rst-class:: classref-property
  2591. :ref:`NavigationMeshGenerator<class_NavigationMeshGenerator>` **NavigationMeshGenerator**
  2592. The :ref:`NavigationMeshGenerator<class_NavigationMeshGenerator>` singleton.
  2593. .. rst-class:: classref-item-separator
  2594. ----
  2595. .. _class_@GlobalScope_property_NavigationServer2D:
  2596. .. rst-class:: classref-property
  2597. :ref:`NavigationServer2D<class_NavigationServer2D>` **NavigationServer2D**
  2598. The :ref:`NavigationServer2D<class_NavigationServer2D>` singleton.
  2599. .. rst-class:: classref-item-separator
  2600. ----
  2601. .. _class_@GlobalScope_property_NavigationServer3D:
  2602. .. rst-class:: classref-property
  2603. :ref:`NavigationServer3D<class_NavigationServer3D>` **NavigationServer3D**
  2604. The :ref:`NavigationServer3D<class_NavigationServer3D>` singleton.
  2605. .. rst-class:: classref-item-separator
  2606. ----
  2607. .. _class_@GlobalScope_property_OS:
  2608. .. rst-class:: classref-property
  2609. :ref:`OS<class_OS>` **OS**
  2610. The :ref:`OS<class_OS>` singleton.
  2611. .. rst-class:: classref-item-separator
  2612. ----
  2613. .. _class_@GlobalScope_property_Performance:
  2614. .. rst-class:: classref-property
  2615. :ref:`Performance<class_Performance>` **Performance**
  2616. The :ref:`Performance<class_Performance>` singleton.
  2617. .. rst-class:: classref-item-separator
  2618. ----
  2619. .. _class_@GlobalScope_property_PhysicsServer2D:
  2620. .. rst-class:: classref-property
  2621. :ref:`PhysicsServer2D<class_PhysicsServer2D>` **PhysicsServer2D**
  2622. The :ref:`PhysicsServer2D<class_PhysicsServer2D>` singleton.
  2623. .. rst-class:: classref-item-separator
  2624. ----
  2625. .. _class_@GlobalScope_property_PhysicsServer2DManager:
  2626. .. rst-class:: classref-property
  2627. :ref:`PhysicsServer2DManager<class_PhysicsServer2DManager>` **PhysicsServer2DManager**
  2628. The :ref:`PhysicsServer2DManager<class_PhysicsServer2DManager>` singleton.
  2629. .. rst-class:: classref-item-separator
  2630. ----
  2631. .. _class_@GlobalScope_property_PhysicsServer3D:
  2632. .. rst-class:: classref-property
  2633. :ref:`PhysicsServer3D<class_PhysicsServer3D>` **PhysicsServer3D**
  2634. The :ref:`PhysicsServer3D<class_PhysicsServer3D>` singleton.
  2635. .. rst-class:: classref-item-separator
  2636. ----
  2637. .. _class_@GlobalScope_property_PhysicsServer3DManager:
  2638. .. rst-class:: classref-property
  2639. :ref:`PhysicsServer3DManager<class_PhysicsServer3DManager>` **PhysicsServer3DManager**
  2640. The :ref:`PhysicsServer3DManager<class_PhysicsServer3DManager>` singleton.
  2641. .. rst-class:: classref-item-separator
  2642. ----
  2643. .. _class_@GlobalScope_property_ProjectSettings:
  2644. .. rst-class:: classref-property
  2645. :ref:`ProjectSettings<class_ProjectSettings>` **ProjectSettings**
  2646. The :ref:`ProjectSettings<class_ProjectSettings>` singleton.
  2647. .. rst-class:: classref-item-separator
  2648. ----
  2649. .. _class_@GlobalScope_property_RenderingServer:
  2650. .. rst-class:: classref-property
  2651. :ref:`RenderingServer<class_RenderingServer>` **RenderingServer**
  2652. The :ref:`RenderingServer<class_RenderingServer>` singleton.
  2653. .. rst-class:: classref-item-separator
  2654. ----
  2655. .. _class_@GlobalScope_property_ResourceLoader:
  2656. .. rst-class:: classref-property
  2657. :ref:`ResourceLoader<class_ResourceLoader>` **ResourceLoader**
  2658. The :ref:`ResourceLoader<class_ResourceLoader>` singleton.
  2659. .. rst-class:: classref-item-separator
  2660. ----
  2661. .. _class_@GlobalScope_property_ResourceSaver:
  2662. .. rst-class:: classref-property
  2663. :ref:`ResourceSaver<class_ResourceSaver>` **ResourceSaver**
  2664. The :ref:`ResourceSaver<class_ResourceSaver>` singleton.
  2665. .. rst-class:: classref-item-separator
  2666. ----
  2667. .. _class_@GlobalScope_property_ResourceUID:
  2668. .. rst-class:: classref-property
  2669. :ref:`ResourceUID<class_ResourceUID>` **ResourceUID**
  2670. The :ref:`ResourceUID<class_ResourceUID>` singleton.
  2671. .. rst-class:: classref-item-separator
  2672. ----
  2673. .. _class_@GlobalScope_property_TextServerManager:
  2674. .. rst-class:: classref-property
  2675. :ref:`TextServerManager<class_TextServerManager>` **TextServerManager**
  2676. The :ref:`TextServerManager<class_TextServerManager>` singleton.
  2677. .. rst-class:: classref-item-separator
  2678. ----
  2679. .. _class_@GlobalScope_property_ThemeDB:
  2680. .. rst-class:: classref-property
  2681. :ref:`ThemeDB<class_ThemeDB>` **ThemeDB**
  2682. The :ref:`ThemeDB<class_ThemeDB>` singleton.
  2683. .. rst-class:: classref-item-separator
  2684. ----
  2685. .. _class_@GlobalScope_property_Time:
  2686. .. rst-class:: classref-property
  2687. :ref:`Time<class_Time>` **Time**
  2688. The :ref:`Time<class_Time>` singleton.
  2689. .. rst-class:: classref-item-separator
  2690. ----
  2691. .. _class_@GlobalScope_property_TranslationServer:
  2692. .. rst-class:: classref-property
  2693. :ref:`TranslationServer<class_TranslationServer>` **TranslationServer**
  2694. The :ref:`TranslationServer<class_TranslationServer>` singleton.
  2695. .. rst-class:: classref-item-separator
  2696. ----
  2697. .. _class_@GlobalScope_property_WorkerThreadPool:
  2698. .. rst-class:: classref-property
  2699. :ref:`WorkerThreadPool<class_WorkerThreadPool>` **WorkerThreadPool**
  2700. The :ref:`WorkerThreadPool<class_WorkerThreadPool>` singleton.
  2701. .. rst-class:: classref-item-separator
  2702. ----
  2703. .. _class_@GlobalScope_property_XRServer:
  2704. .. rst-class:: classref-property
  2705. :ref:`XRServer<class_XRServer>` **XRServer**
  2706. The :ref:`XRServer<class_XRServer>` singleton.
  2707. .. rst-class:: classref-section-separator
  2708. ----
  2709. .. rst-class:: classref-descriptions-group
  2710. Method Descriptions
  2711. -------------------
  2712. .. _class_@GlobalScope_method_abs:
  2713. .. rst-class:: classref-method
  2714. :ref:`Variant<class_Variant>` **abs** **(** :ref:`Variant<class_Variant>` x **)**
  2715. Returns the absolute value of a :ref:`Variant<class_Variant>` parameter ``x`` (i.e. non-negative value). Supported types: :ref:`int<class_int>`, :ref:`float<class_float>`, :ref:`Vector2<class_Vector2>`, :ref:`Vector2i<class_Vector2i>`, :ref:`Vector3<class_Vector3>`, :ref:`Vector3i<class_Vector3i>`, :ref:`Vector4<class_Vector4>`, :ref:`Vector4i<class_Vector4i>`.
  2716. ::
  2717. var a = abs(-1)
  2718. # a is 1
  2719. var b = abs(-1.2)
  2720. # b is 1.2
  2721. var c = abs(Vector2(-3.5, -4))
  2722. # c is (3.5, 4)
  2723. var d = abs(Vector2i(-5, -6))
  2724. # d is (5, 6)
  2725. var e = abs(Vector3(-7, 8.5, -3.8))
  2726. # e is (7, 8.5, 3.8)
  2727. var f = abs(Vector3i(-7, -8, -9))
  2728. # f is (7, 8, 9)
  2729. \ **Note:** For better type safety, use :ref:`absf<class_@GlobalScope_method_absf>`, :ref:`absi<class_@GlobalScope_method_absi>`, :ref:`Vector2.abs<class_Vector2_method_abs>`, :ref:`Vector2i.abs<class_Vector2i_method_abs>`, :ref:`Vector3.abs<class_Vector3_method_abs>`, :ref:`Vector3i.abs<class_Vector3i_method_abs>`, :ref:`Vector4.abs<class_Vector4_method_abs>`, or :ref:`Vector4i.abs<class_Vector4i_method_abs>`.
  2730. .. rst-class:: classref-item-separator
  2731. ----
  2732. .. _class_@GlobalScope_method_absf:
  2733. .. rst-class:: classref-method
  2734. :ref:`float<class_float>` **absf** **(** :ref:`float<class_float>` x **)**
  2735. Returns the absolute value of float parameter ``x`` (i.e. positive value).
  2736. ::
  2737. # a is 1.2
  2738. var a = absf(-1.2)
  2739. .. rst-class:: classref-item-separator
  2740. ----
  2741. .. _class_@GlobalScope_method_absi:
  2742. .. rst-class:: classref-method
  2743. :ref:`int<class_int>` **absi** **(** :ref:`int<class_int>` x **)**
  2744. Returns the absolute value of int parameter ``x`` (i.e. positive value).
  2745. ::
  2746. # a is 1
  2747. var a = absi(-1)
  2748. .. rst-class:: classref-item-separator
  2749. ----
  2750. .. _class_@GlobalScope_method_acos:
  2751. .. rst-class:: classref-method
  2752. :ref:`float<class_float>` **acos** **(** :ref:`float<class_float>` x **)**
  2753. Returns the arc cosine of ``x`` in radians. Use to get the angle of cosine ``x``. ``x`` will be clamped between ``-1.0`` and ``1.0`` (inclusive), in order to prevent :ref:`acos<class_@GlobalScope_method_acos>` from returning :ref:`@GDScript.NAN<class_@GDScript_constant_NAN>`.
  2754. ::
  2755. # c is 0.523599 or 30 degrees if converted with rad_to_deg(c)
  2756. var c = acos(0.866025)
  2757. .. rst-class:: classref-item-separator
  2758. ----
  2759. .. _class_@GlobalScope_method_asin:
  2760. .. rst-class:: classref-method
  2761. :ref:`float<class_float>` **asin** **(** :ref:`float<class_float>` x **)**
  2762. Returns the arc sine of ``x`` in radians. Use to get the angle of sine ``x``. ``x`` will be clamped between ``-1.0`` and ``1.0`` (inclusive), in order to prevent :ref:`asin<class_@GlobalScope_method_asin>` from returning :ref:`@GDScript.NAN<class_@GDScript_constant_NAN>`.
  2763. ::
  2764. # s is 0.523599 or 30 degrees if converted with rad_to_deg(s)
  2765. var s = asin(0.5)
  2766. .. rst-class:: classref-item-separator
  2767. ----
  2768. .. _class_@GlobalScope_method_atan:
  2769. .. rst-class:: classref-method
  2770. :ref:`float<class_float>` **atan** **(** :ref:`float<class_float>` x **)**
  2771. Returns the arc tangent of ``x`` in radians. Use it to get the angle from an angle's tangent in trigonometry.
  2772. The method cannot know in which quadrant the angle should fall. See :ref:`atan2<class_@GlobalScope_method_atan2>` if you have both ``y`` and ``x``.
  2773. ::
  2774. var a = atan(0.5) # a is 0.463648
  2775. If ``x`` is between ``-PI / 2`` and ``PI / 2`` (inclusive), ``atan(tan(x))`` is equal to ``x``.
  2776. .. rst-class:: classref-item-separator
  2777. ----
  2778. .. _class_@GlobalScope_method_atan2:
  2779. .. rst-class:: classref-method
  2780. :ref:`float<class_float>` **atan2** **(** :ref:`float<class_float>` y, :ref:`float<class_float>` x **)**
  2781. Returns the arc tangent of ``y/x`` in radians. Use to get the angle of tangent ``y/x``. To compute the value, the method takes into account the sign of both arguments in order to determine the quadrant.
  2782. Important note: The Y coordinate comes first, by convention.
  2783. ::
  2784. var a = atan2(0, -1) # a is 3.141593
  2785. .. rst-class:: classref-item-separator
  2786. ----
  2787. .. _class_@GlobalScope_method_bezier_derivative:
  2788. .. rst-class:: classref-method
  2789. :ref:`float<class_float>` **bezier_derivative** **(** :ref:`float<class_float>` start, :ref:`float<class_float>` control_1, :ref:`float<class_float>` control_2, :ref:`float<class_float>` end, :ref:`float<class_float>` t **)**
  2790. Returns the derivative at the given ``t`` on a one-dimensional `Bézier curve <https://en.wikipedia.org/wiki/B%C3%A9zier_curve>`__ defined by the given ``control_1``, ``control_2``, and ``end`` points.
  2791. .. rst-class:: classref-item-separator
  2792. ----
  2793. .. _class_@GlobalScope_method_bezier_interpolate:
  2794. .. rst-class:: classref-method
  2795. :ref:`float<class_float>` **bezier_interpolate** **(** :ref:`float<class_float>` start, :ref:`float<class_float>` control_1, :ref:`float<class_float>` control_2, :ref:`float<class_float>` end, :ref:`float<class_float>` t **)**
  2796. Returns the point at the given ``t`` on a one-dimensional `Bézier curve <https://en.wikipedia.org/wiki/B%C3%A9zier_curve>`__ defined by the given ``control_1``, ``control_2``, and ``end`` points.
  2797. .. rst-class:: classref-item-separator
  2798. ----
  2799. .. _class_@GlobalScope_method_bytes_to_var:
  2800. .. rst-class:: classref-method
  2801. :ref:`Variant<class_Variant>` **bytes_to_var** **(** :ref:`PackedByteArray<class_PackedByteArray>` bytes **)**
  2802. Decodes a byte array back to a :ref:`Variant<class_Variant>` value, without decoding objects.
  2803. \ **Note:** If you need object deserialization, see :ref:`bytes_to_var_with_objects<class_@GlobalScope_method_bytes_to_var_with_objects>`.
  2804. .. rst-class:: classref-item-separator
  2805. ----
  2806. .. _class_@GlobalScope_method_bytes_to_var_with_objects:
  2807. .. rst-class:: classref-method
  2808. :ref:`Variant<class_Variant>` **bytes_to_var_with_objects** **(** :ref:`PackedByteArray<class_PackedByteArray>` bytes **)**
  2809. Decodes a byte array back to a :ref:`Variant<class_Variant>` value. Decoding objects is allowed.
  2810. \ **Warning:** Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution).
  2811. .. rst-class:: classref-item-separator
  2812. ----
  2813. .. _class_@GlobalScope_method_ceil:
  2814. .. rst-class:: classref-method
  2815. :ref:`Variant<class_Variant>` **ceil** **(** :ref:`Variant<class_Variant>` x **)**
  2816. Rounds ``x`` upward (towards positive infinity), returning the smallest whole number that is not less than ``x``. Supported types: :ref:`int<class_int>`, :ref:`float<class_float>`, :ref:`Vector2<class_Vector2>`, :ref:`Vector3<class_Vector3>`, :ref:`Vector4<class_Vector4>`.
  2817. ::
  2818. var i = ceil(1.45) # i is 2.0
  2819. i = ceil(1.001) # i is 2.0
  2820. See also :ref:`floor<class_@GlobalScope_method_floor>`, :ref:`round<class_@GlobalScope_method_round>`, and :ref:`snapped<class_@GlobalScope_method_snapped>`.
  2821. \ **Note:** For better type safety, use :ref:`ceilf<class_@GlobalScope_method_ceilf>`, :ref:`ceili<class_@GlobalScope_method_ceili>`, :ref:`Vector2.ceil<class_Vector2_method_ceil>`, :ref:`Vector3.ceil<class_Vector3_method_ceil>`, or :ref:`Vector4.ceil<class_Vector4_method_ceil>`.
  2822. .. rst-class:: classref-item-separator
  2823. ----
  2824. .. _class_@GlobalScope_method_ceilf:
  2825. .. rst-class:: classref-method
  2826. :ref:`float<class_float>` **ceilf** **(** :ref:`float<class_float>` x **)**
  2827. Rounds ``x`` upward (towards positive infinity), returning the smallest whole number that is not less than ``x``.
  2828. A type-safe version of :ref:`ceil<class_@GlobalScope_method_ceil>`, returning a :ref:`float<class_float>`.
  2829. .. rst-class:: classref-item-separator
  2830. ----
  2831. .. _class_@GlobalScope_method_ceili:
  2832. .. rst-class:: classref-method
  2833. :ref:`int<class_int>` **ceili** **(** :ref:`float<class_float>` x **)**
  2834. Rounds ``x`` upward (towards positive infinity), returning the smallest whole number that is not less than ``x``.
  2835. A type-safe version of :ref:`ceil<class_@GlobalScope_method_ceil>`, returning an :ref:`int<class_int>`.
  2836. .. rst-class:: classref-item-separator
  2837. ----
  2838. .. _class_@GlobalScope_method_clamp:
  2839. .. rst-class:: classref-method
  2840. :ref:`Variant<class_Variant>` **clamp** **(** :ref:`Variant<class_Variant>` value, :ref:`Variant<class_Variant>` min, :ref:`Variant<class_Variant>` max **)**
  2841. Clamps the ``value``, returning a :ref:`Variant<class_Variant>` not less than ``min`` and not more than ``max``. Any values that can be compared with the less than and greater than operators will work.
  2842. ::
  2843. var a = clamp(-10, -1, 5)
  2844. # a is -1
  2845. var b = clamp(8.1, 0.9, 5.5)
  2846. # b is 5.5
  2847. var c = clamp(Vector2(-3.5, -4), Vector2(-3.2, -2), Vector2(2, 6.5))
  2848. # c is (-3.2, -2)
  2849. var d = clamp(Vector2i(7, 8), Vector2i(-3, -2), Vector2i(2, 6))
  2850. # d is (2, 6)
  2851. var e = clamp(Vector3(-7, 8.5, -3.8), Vector3(-3, -2, 5.4), Vector3(-2, 6, -4.1))
  2852. # e is (-3, -2, 5.4)
  2853. var f = clamp(Vector3i(-7, -8, -9), Vector3i(-1, 2, 3), Vector3i(-4, -5, -6))
  2854. # f is (-4, -5, -6)
  2855. \ **Note:** For better type safety, use :ref:`clampf<class_@GlobalScope_method_clampf>`, :ref:`clampi<class_@GlobalScope_method_clampi>`, :ref:`Vector2.clamp<class_Vector2_method_clamp>`, :ref:`Vector2i.clamp<class_Vector2i_method_clamp>`, :ref:`Vector3.clamp<class_Vector3_method_clamp>`, :ref:`Vector3i.clamp<class_Vector3i_method_clamp>`, :ref:`Vector4.clamp<class_Vector4_method_clamp>`, :ref:`Vector4i.clamp<class_Vector4i_method_clamp>`, or :ref:`Color.clamp<class_Color_method_clamp>`.
  2856. .. rst-class:: classref-item-separator
  2857. ----
  2858. .. _class_@GlobalScope_method_clampf:
  2859. .. rst-class:: classref-method
  2860. :ref:`float<class_float>` **clampf** **(** :ref:`float<class_float>` value, :ref:`float<class_float>` min, :ref:`float<class_float>` max **)**
  2861. Clamps the ``value``, returning a :ref:`float<class_float>` not less than ``min`` and not more than ``max``.
  2862. ::
  2863. var speed = 42.1
  2864. var a = clampf(speed, 1.0, 20.5) # a is 20.5
  2865. speed = -10.0
  2866. var b = clampf(speed, -1.0, 1.0) # b is -1.0
  2867. .. rst-class:: classref-item-separator
  2868. ----
  2869. .. _class_@GlobalScope_method_clampi:
  2870. .. rst-class:: classref-method
  2871. :ref:`int<class_int>` **clampi** **(** :ref:`int<class_int>` value, :ref:`int<class_int>` min, :ref:`int<class_int>` max **)**
  2872. Clamps the ``value``, returning an :ref:`int<class_int>` not less than ``min`` and not more than ``max``.
  2873. ::
  2874. var speed = 42
  2875. var a = clampi(speed, 1, 20) # a is 20
  2876. speed = -10
  2877. var b = clampi(speed, -1, 1) # b is -1
  2878. .. rst-class:: classref-item-separator
  2879. ----
  2880. .. _class_@GlobalScope_method_cos:
  2881. .. rst-class:: classref-method
  2882. :ref:`float<class_float>` **cos** **(** :ref:`float<class_float>` angle_rad **)**
  2883. Returns the cosine of angle ``angle_rad`` in radians.
  2884. ::
  2885. cos(PI * 2) # Returns 1.0
  2886. cos(PI) # Returns -1.0
  2887. cos(deg_to_rad(90)) # Returns 0.0
  2888. .. rst-class:: classref-item-separator
  2889. ----
  2890. .. _class_@GlobalScope_method_cosh:
  2891. .. rst-class:: classref-method
  2892. :ref:`float<class_float>` **cosh** **(** :ref:`float<class_float>` x **)**
  2893. Returns the hyperbolic cosine of ``x`` in radians.
  2894. ::
  2895. print(cosh(1)) # Prints 1.543081
  2896. .. rst-class:: classref-item-separator
  2897. ----
  2898. .. _class_@GlobalScope_method_cubic_interpolate:
  2899. .. rst-class:: classref-method
  2900. :ref:`float<class_float>` **cubic_interpolate** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` pre, :ref:`float<class_float>` post, :ref:`float<class_float>` weight **)**
  2901. Cubic interpolates between two values by the factor defined in ``weight`` with ``pre`` and ``post`` values.
  2902. .. rst-class:: classref-item-separator
  2903. ----
  2904. .. _class_@GlobalScope_method_cubic_interpolate_angle:
  2905. .. rst-class:: classref-method
  2906. :ref:`float<class_float>` **cubic_interpolate_angle** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` pre, :ref:`float<class_float>` post, :ref:`float<class_float>` weight **)**
  2907. Cubic interpolates between two rotation values with shortest path by the factor defined in ``weight`` with ``pre`` and ``post`` values. See also :ref:`lerp_angle<class_@GlobalScope_method_lerp_angle>`.
  2908. .. rst-class:: classref-item-separator
  2909. ----
  2910. .. _class_@GlobalScope_method_cubic_interpolate_angle_in_time:
  2911. .. rst-class:: classref-method
  2912. :ref:`float<class_float>` **cubic_interpolate_angle_in_time** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` pre, :ref:`float<class_float>` post, :ref:`float<class_float>` weight, :ref:`float<class_float>` to_t, :ref:`float<class_float>` pre_t, :ref:`float<class_float>` post_t **)**
  2913. Cubic interpolates between two rotation values with shortest path by the factor defined in ``weight`` with ``pre`` and ``post`` values. See also :ref:`lerp_angle<class_@GlobalScope_method_lerp_angle>`.
  2914. It can perform smoother interpolation than ``cubic_interpolate()`` by the time values.
  2915. .. rst-class:: classref-item-separator
  2916. ----
  2917. .. _class_@GlobalScope_method_cubic_interpolate_in_time:
  2918. .. rst-class:: classref-method
  2919. :ref:`float<class_float>` **cubic_interpolate_in_time** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` pre, :ref:`float<class_float>` post, :ref:`float<class_float>` weight, :ref:`float<class_float>` to_t, :ref:`float<class_float>` pre_t, :ref:`float<class_float>` post_t **)**
  2920. Cubic interpolates between two values by the factor defined in ``weight`` with ``pre`` and ``post`` values.
  2921. It can perform smoother interpolation than :ref:`cubic_interpolate<class_@GlobalScope_method_cubic_interpolate>` by the time values.
  2922. .. rst-class:: classref-item-separator
  2923. ----
  2924. .. _class_@GlobalScope_method_db_to_linear:
  2925. .. rst-class:: classref-method
  2926. :ref:`float<class_float>` **db_to_linear** **(** :ref:`float<class_float>` db **)**
  2927. Converts from decibels to linear energy (audio).
  2928. .. rst-class:: classref-item-separator
  2929. ----
  2930. .. _class_@GlobalScope_method_deg_to_rad:
  2931. .. rst-class:: classref-method
  2932. :ref:`float<class_float>` **deg_to_rad** **(** :ref:`float<class_float>` deg **)**
  2933. Converts an angle expressed in degrees to radians.
  2934. ::
  2935. var r = deg_to_rad(180) # r is 3.141593
  2936. .. rst-class:: classref-item-separator
  2937. ----
  2938. .. _class_@GlobalScope_method_ease:
  2939. .. rst-class:: classref-method
  2940. :ref:`float<class_float>` **ease** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` curve **)**
  2941. Returns an "eased" value of ``x`` based on an easing function defined with ``curve``. This easing function is based on an exponent. The ``curve`` can be any floating-point number, with specific values leading to the following behaviors:
  2942. ::
  2943. - Lower than -1.0 (exclusive): Ease in-out
  2944. - 1.0: Linear
  2945. - Between -1.0 and 0.0 (exclusive): Ease out-in
  2946. - 0.0: Constant
  2947. - Between 0.0 to 1.0 (exclusive): Ease out
  2948. - 1.0: Linear
  2949. - Greater than 1.0 (exclusive): Ease in
  2950. \ `ease() curve values cheatsheet <https://raw.githubusercontent.com/godotengine/godot-docs/master/img/ease_cheatsheet.png>`__\
  2951. See also :ref:`smoothstep<class_@GlobalScope_method_smoothstep>`. If you need to perform more advanced transitions, use :ref:`Tween.interpolate_value<class_Tween_method_interpolate_value>`.
  2952. .. rst-class:: classref-item-separator
  2953. ----
  2954. .. _class_@GlobalScope_method_error_string:
  2955. .. rst-class:: classref-method
  2956. :ref:`String<class_String>` **error_string** **(** :ref:`int<class_int>` error **)**
  2957. Returns a human-readable name for the given :ref:`Error<enum_@GlobalScope_Error>` code.
  2958. ::
  2959. print(OK) # Prints 0
  2960. print(error_string(OK)) # Prints OK
  2961. print(error_string(ERR_BUSY)) # Prints Busy
  2962. print(error_string(ERR_OUT_OF_MEMORY)) # Prints Out of memory
  2963. .. rst-class:: classref-item-separator
  2964. ----
  2965. .. _class_@GlobalScope_method_exp:
  2966. .. rst-class:: classref-method
  2967. :ref:`float<class_float>` **exp** **(** :ref:`float<class_float>` x **)**
  2968. The natural exponential function. It raises the mathematical constant *e* to the power of ``x`` and returns it.
  2969. \ *e* has an approximate value of 2.71828, and can be obtained with ``exp(1)``.
  2970. For exponents to other bases use the method :ref:`pow<class_@GlobalScope_method_pow>`.
  2971. ::
  2972. var a = exp(2) # Approximately 7.39
  2973. .. rst-class:: classref-item-separator
  2974. ----
  2975. .. _class_@GlobalScope_method_floor:
  2976. .. rst-class:: classref-method
  2977. :ref:`Variant<class_Variant>` **floor** **(** :ref:`Variant<class_Variant>` x **)**
  2978. Rounds ``x`` downward (towards negative infinity), returning the largest whole number that is not more than ``x``. Supported types: :ref:`int<class_int>`, :ref:`float<class_float>`, :ref:`Vector2<class_Vector2>`, :ref:`Vector3<class_Vector3>`, :ref:`Vector4<class_Vector4>`.
  2979. ::
  2980. var a = floor(2.99) # a is 2.0
  2981. a = floor(-2.99) # a is -3.0
  2982. See also :ref:`ceil<class_@GlobalScope_method_ceil>`, :ref:`round<class_@GlobalScope_method_round>`, and :ref:`snapped<class_@GlobalScope_method_snapped>`.
  2983. \ **Note:** For better type safety, use :ref:`floorf<class_@GlobalScope_method_floorf>`, :ref:`floori<class_@GlobalScope_method_floori>`, :ref:`Vector2.floor<class_Vector2_method_floor>`, :ref:`Vector3.floor<class_Vector3_method_floor>`, or :ref:`Vector4.floor<class_Vector4_method_floor>`.
  2984. .. rst-class:: classref-item-separator
  2985. ----
  2986. .. _class_@GlobalScope_method_floorf:
  2987. .. rst-class:: classref-method
  2988. :ref:`float<class_float>` **floorf** **(** :ref:`float<class_float>` x **)**
  2989. Rounds ``x`` downward (towards negative infinity), returning the largest whole number that is not more than ``x``.
  2990. A type-safe version of :ref:`floor<class_@GlobalScope_method_floor>`, returning a :ref:`float<class_float>`.
  2991. .. rst-class:: classref-item-separator
  2992. ----
  2993. .. _class_@GlobalScope_method_floori:
  2994. .. rst-class:: classref-method
  2995. :ref:`int<class_int>` **floori** **(** :ref:`float<class_float>` x **)**
  2996. Rounds ``x`` downward (towards negative infinity), returning the largest whole number that is not more than ``x``.
  2997. A type-safe version of :ref:`floor<class_@GlobalScope_method_floor>`, returning an :ref:`int<class_int>`.
  2998. \ **Note:** This function is *not* the same as ``int(x)``, which rounds towards 0.
  2999. .. rst-class:: classref-item-separator
  3000. ----
  3001. .. _class_@GlobalScope_method_fmod:
  3002. .. rst-class:: classref-method
  3003. :ref:`float<class_float>` **fmod** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)**
  3004. Returns the floating-point remainder of ``x`` divided by ``y``, keeping the sign of ``x``.
  3005. ::
  3006. var remainder = fmod(7, 5.5) # remainder is 1.5
  3007. For the integer remainder operation, use the ``%`` operator.
  3008. .. rst-class:: classref-item-separator
  3009. ----
  3010. .. _class_@GlobalScope_method_fposmod:
  3011. .. rst-class:: classref-method
  3012. :ref:`float<class_float>` **fposmod** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)**
  3013. Returns the floating-point modulus of ``x`` divided by ``y``, wrapping equally in positive and negative.
  3014. ::
  3015. print(" (x) (fmod(x, 1.5)) (fposmod(x, 1.5))")
  3016. for i in 7:
  3017. var x = i * 0.5 - 1.5
  3018. print("%4.1f %4.1f | %4.1f" % [x, fmod(x, 1.5), fposmod(x, 1.5)])
  3019. Produces:
  3020. ::
  3021. (x) (fmod(x, 1.5)) (fposmod(x, 1.5))
  3022. -1.5 -0.0 | 0.0
  3023. -1.0 -1.0 | 0.5
  3024. -0.5 -0.5 | 1.0
  3025. 0.0 0.0 | 0.0
  3026. 0.5 0.5 | 0.5
  3027. 1.0 1.0 | 1.0
  3028. 1.5 0.0 | 0.0
  3029. .. rst-class:: classref-item-separator
  3030. ----
  3031. .. _class_@GlobalScope_method_hash:
  3032. .. rst-class:: classref-method
  3033. :ref:`int<class_int>` **hash** **(** :ref:`Variant<class_Variant>` variable **)**
  3034. Returns the integer hash of the passed ``variable``.
  3035. .. tabs::
  3036. .. code-tab:: gdscript
  3037. print(hash("a")) # Prints 177670
  3038. .. code-tab:: csharp
  3039. GD.Print(GD.Hash("a")); // Prints 177670
  3040. .. rst-class:: classref-item-separator
  3041. ----
  3042. .. _class_@GlobalScope_method_instance_from_id:
  3043. .. rst-class:: classref-method
  3044. :ref:`Object<class_Object>` **instance_from_id** **(** :ref:`int<class_int>` instance_id **)**
  3045. Returns the :ref:`Object<class_Object>` that corresponds to ``instance_id``. All Objects have a unique instance ID. See also :ref:`Object.get_instance_id<class_Object_method_get_instance_id>`.
  3046. .. tabs::
  3047. .. code-tab:: gdscript
  3048. var foo = "bar"
  3049. func _ready():
  3050. var id = get_instance_id()
  3051. var inst = instance_from_id(id)
  3052. print(inst.foo) # Prints bar
  3053. .. code-tab:: csharp
  3054. public partial class MyNode : Node
  3055. {
  3056. public string Foo { get; set; } = "bar";
  3057. public override void _Ready()
  3058. {
  3059. ulong id = GetInstanceId();
  3060. var inst = (MyNode)InstanceFromId(Id);
  3061. GD.Print(inst.Foo); // Prints bar
  3062. }
  3063. }
  3064. .. rst-class:: classref-item-separator
  3065. ----
  3066. .. _class_@GlobalScope_method_inverse_lerp:
  3067. .. rst-class:: classref-method
  3068. :ref:`float<class_float>` **inverse_lerp** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` weight **)**
  3069. Returns an interpolation or extrapolation factor considering the range specified in ``from`` and ``to``, and the interpolated value specified in ``weight``. The returned value will be between ``0.0`` and ``1.0`` if ``weight`` is between ``from`` and ``to`` (inclusive). If ``weight`` is located outside this range, then an extrapolation factor will be returned (return value lower than ``0.0`` or greater than ``1.0``). Use :ref:`clamp<class_@GlobalScope_method_clamp>` on the result of :ref:`inverse_lerp<class_@GlobalScope_method_inverse_lerp>` if this is not desired.
  3070. ::
  3071. # The interpolation ratio in the `lerp()` call below is 0.75.
  3072. var middle = lerp(20, 30, 0.75)
  3073. # middle is now 27.5.
  3074. # Now, we pretend to have forgotten the original ratio and want to get it back.
  3075. var ratio = inverse_lerp(20, 30, 27.5)
  3076. # ratio is now 0.75.
  3077. See also :ref:`lerp<class_@GlobalScope_method_lerp>`, which performs the reverse of this operation, and :ref:`remap<class_@GlobalScope_method_remap>` to map a continuous series of values to another.
  3078. .. rst-class:: classref-item-separator
  3079. ----
  3080. .. _class_@GlobalScope_method_is_equal_approx:
  3081. .. rst-class:: classref-method
  3082. :ref:`bool<class_bool>` **is_equal_approx** **(** :ref:`float<class_float>` a, :ref:`float<class_float>` b **)**
  3083. Returns ``true`` if ``a`` and ``b`` are approximately equal to each other.
  3084. Here, "approximately equal" means that ``a`` and ``b`` are within a small internal epsilon of each other, which scales with the magnitude of the numbers.
  3085. Infinity values of the same sign are considered equal.
  3086. .. rst-class:: classref-item-separator
  3087. ----
  3088. .. _class_@GlobalScope_method_is_finite:
  3089. .. rst-class:: classref-method
  3090. :ref:`bool<class_bool>` **is_finite** **(** :ref:`float<class_float>` x **)**
  3091. Returns whether ``x`` is a finite value, i.e. it is not :ref:`@GDScript.NAN<class_@GDScript_constant_NAN>`, positive infinity, or negative infinity.
  3092. .. rst-class:: classref-item-separator
  3093. ----
  3094. .. _class_@GlobalScope_method_is_inf:
  3095. .. rst-class:: classref-method
  3096. :ref:`bool<class_bool>` **is_inf** **(** :ref:`float<class_float>` x **)**
  3097. Returns ``true`` if ``x`` is either positive infinity or negative infinity.
  3098. .. rst-class:: classref-item-separator
  3099. ----
  3100. .. _class_@GlobalScope_method_is_instance_id_valid:
  3101. .. rst-class:: classref-method
  3102. :ref:`bool<class_bool>` **is_instance_id_valid** **(** :ref:`int<class_int>` id **)**
  3103. Returns ``true`` if the Object that corresponds to ``id`` is a valid object (e.g. has not been deleted from memory). All Objects have a unique instance ID.
  3104. .. rst-class:: classref-item-separator
  3105. ----
  3106. .. _class_@GlobalScope_method_is_instance_valid:
  3107. .. rst-class:: classref-method
  3108. :ref:`bool<class_bool>` **is_instance_valid** **(** :ref:`Variant<class_Variant>` instance **)**
  3109. Returns ``true`` if ``instance`` is a valid Object (e.g. has not been deleted from memory).
  3110. .. rst-class:: classref-item-separator
  3111. ----
  3112. .. _class_@GlobalScope_method_is_nan:
  3113. .. rst-class:: classref-method
  3114. :ref:`bool<class_bool>` **is_nan** **(** :ref:`float<class_float>` x **)**
  3115. Returns ``true`` if ``x`` is a NaN ("Not a Number" or invalid) value.
  3116. .. rst-class:: classref-item-separator
  3117. ----
  3118. .. _class_@GlobalScope_method_is_same:
  3119. .. rst-class:: classref-method
  3120. :ref:`bool<class_bool>` **is_same** **(** :ref:`Variant<class_Variant>` a, :ref:`Variant<class_Variant>` b **)**
  3121. Returns ``true``, for value types, if ``a`` and ``b`` share the same value. Returns ``true``, for reference types, if the references of ``a`` and ``b`` are the same.
  3122. ::
  3123. # Vector2 is a value type
  3124. var vec2_a = Vector2(0, 0)
  3125. var vec2_b = Vector2(0, 0)
  3126. var vec2_c = Vector2(1, 1)
  3127. is_same(vec2_a, vec2_a) # true
  3128. is_same(vec2_a, vec2_b) # true
  3129. is_same(vec2_a, vec2_c) # false
  3130. # Array is a reference type
  3131. var arr_a = []
  3132. var arr_b = []
  3133. is_same(arr_a, arr_a) # true
  3134. is_same(arr_a, arr_b) # false
  3135. These are :ref:`Variant<class_Variant>` value types: ``null``, :ref:`bool<class_bool>`, :ref:`int<class_int>`, :ref:`float<class_float>`, :ref:`String<class_String>`, :ref:`StringName<class_StringName>`, :ref:`Vector2<class_Vector2>`, :ref:`Vector2i<class_Vector2i>`, :ref:`Vector3<class_Vector3>`, :ref:`Vector3i<class_Vector3i>`, :ref:`Vector4<class_Vector4>`, :ref:`Vector4i<class_Vector4i>`, :ref:`Rect2<class_Rect2>`, :ref:`Rect2i<class_Rect2i>`, :ref:`Transform2D<class_Transform2D>`, :ref:`Transform3D<class_Transform3D>`, :ref:`Plane<class_Plane>`, :ref:`Quaternion<class_Quaternion>`, :ref:`AABB<class_AABB>`, :ref:`Basis<class_Basis>`, :ref:`Projection<class_Projection>`, :ref:`Color<class_Color>`, :ref:`NodePath<class_NodePath>`, :ref:`RID<class_RID>`, :ref:`Callable<class_Callable>` and :ref:`Signal<class_Signal>`.
  3136. These are :ref:`Variant<class_Variant>` reference types: :ref:`Object<class_Object>`, :ref:`Dictionary<class_Dictionary>`, :ref:`Array<class_Array>`, :ref:`PackedByteArray<class_PackedByteArray>`, :ref:`PackedInt32Array<class_PackedInt32Array>`, :ref:`PackedInt64Array<class_PackedInt64Array>`, :ref:`PackedFloat32Array<class_PackedFloat32Array>`, :ref:`PackedFloat64Array<class_PackedFloat64Array>`, :ref:`PackedStringArray<class_PackedStringArray>`, :ref:`PackedVector2Array<class_PackedVector2Array>`, :ref:`PackedVector3Array<class_PackedVector3Array>` and :ref:`PackedColorArray<class_PackedColorArray>`.
  3137. .. rst-class:: classref-item-separator
  3138. ----
  3139. .. _class_@GlobalScope_method_is_zero_approx:
  3140. .. rst-class:: classref-method
  3141. :ref:`bool<class_bool>` **is_zero_approx** **(** :ref:`float<class_float>` x **)**
  3142. Returns ``true`` if ``x`` is zero or almost zero. The comparison is done using a tolerance calculation with a small internal epsilon.
  3143. This function is faster than using :ref:`is_equal_approx<class_@GlobalScope_method_is_equal_approx>` with one value as zero.
  3144. .. rst-class:: classref-item-separator
  3145. ----
  3146. .. _class_@GlobalScope_method_lerp:
  3147. .. rst-class:: classref-method
  3148. :ref:`Variant<class_Variant>` **lerp** **(** :ref:`Variant<class_Variant>` from, :ref:`Variant<class_Variant>` to, :ref:`Variant<class_Variant>` weight **)**
  3149. Linearly interpolates between two values by the factor defined in ``weight``. To perform interpolation, ``weight`` should be between ``0.0`` and ``1.0`` (inclusive). However, values outside this range are allowed and can be used to perform *extrapolation*. If this is not desired, use :ref:`clamp<class_@GlobalScope_method_clamp>` on the result of this function.
  3150. Both ``from`` and ``to`` must be the same type. Supported types: :ref:`int<class_int>`, :ref:`float<class_float>`, :ref:`Vector2<class_Vector2>`, :ref:`Vector3<class_Vector3>`, :ref:`Vector4<class_Vector4>`, :ref:`Color<class_Color>`, :ref:`Quaternion<class_Quaternion>`, :ref:`Basis<class_Basis>`.
  3151. ::
  3152. lerp(0, 4, 0.75) # Returns 3.0
  3153. See also :ref:`inverse_lerp<class_@GlobalScope_method_inverse_lerp>` which performs the reverse of this operation. To perform eased interpolation with :ref:`lerp<class_@GlobalScope_method_lerp>`, combine it with :ref:`ease<class_@GlobalScope_method_ease>` or :ref:`smoothstep<class_@GlobalScope_method_smoothstep>`. See also :ref:`remap<class_@GlobalScope_method_remap>` to map a continuous series of values to another.
  3154. \ **Note:** For better type safety, use :ref:`lerpf<class_@GlobalScope_method_lerpf>`, :ref:`Vector2.lerp<class_Vector2_method_lerp>`, :ref:`Vector3.lerp<class_Vector3_method_lerp>`, :ref:`Vector4.lerp<class_Vector4_method_lerp>`, :ref:`Color.lerp<class_Color_method_lerp>`, :ref:`Quaternion.slerp<class_Quaternion_method_slerp>` or :ref:`Basis.slerp<class_Basis_method_slerp>`.
  3155. .. rst-class:: classref-item-separator
  3156. ----
  3157. .. _class_@GlobalScope_method_lerp_angle:
  3158. .. rst-class:: classref-method
  3159. :ref:`float<class_float>` **lerp_angle** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` weight **)**
  3160. Linearly interpolates between two angles (in radians) by a ``weight`` value between 0.0 and 1.0.
  3161. Similar to :ref:`lerp<class_@GlobalScope_method_lerp>`, but interpolates correctly when the angles wrap around :ref:`@GDScript.TAU<class_@GDScript_constant_TAU>`. To perform eased interpolation with :ref:`lerp_angle<class_@GlobalScope_method_lerp_angle>`, combine it with :ref:`ease<class_@GlobalScope_method_ease>` or :ref:`smoothstep<class_@GlobalScope_method_smoothstep>`.
  3162. ::
  3163. extends Sprite
  3164. var elapsed = 0.0
  3165. func _process(delta):
  3166. var min_angle = deg_to_rad(0.0)
  3167. var max_angle = deg_to_rad(90.0)
  3168. rotation = lerp_angle(min_angle, max_angle, elapsed)
  3169. elapsed += delta
  3170. \ **Note:** This function lerps through the shortest path between ``from`` and ``to``. However, when these two angles are approximately ``PI + k * TAU`` apart for any integer ``k``, it's not obvious which way they lerp due to floating-point precision errors. For example, ``lerp_angle(0, PI, weight)`` lerps counter-clockwise, while ``lerp_angle(0, PI + 5 * TAU, weight)`` lerps clockwise.
  3171. .. rst-class:: classref-item-separator
  3172. ----
  3173. .. _class_@GlobalScope_method_lerpf:
  3174. .. rst-class:: classref-method
  3175. :ref:`float<class_float>` **lerpf** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` weight **)**
  3176. Linearly interpolates between two values by the factor defined in ``weight``. To perform interpolation, ``weight`` should be between ``0.0`` and ``1.0`` (inclusive). However, values outside this range are allowed and can be used to perform *extrapolation*. If this is not desired, use :ref:`clampf<class_@GlobalScope_method_clampf>` on the result of this function.
  3177. ::
  3178. lerpf(0, 4, 0.75) # Returns 3.0
  3179. See also :ref:`inverse_lerp<class_@GlobalScope_method_inverse_lerp>` which performs the reverse of this operation. To perform eased interpolation with :ref:`lerp<class_@GlobalScope_method_lerp>`, combine it with :ref:`ease<class_@GlobalScope_method_ease>` or :ref:`smoothstep<class_@GlobalScope_method_smoothstep>`.
  3180. .. rst-class:: classref-item-separator
  3181. ----
  3182. .. _class_@GlobalScope_method_linear_to_db:
  3183. .. rst-class:: classref-method
  3184. :ref:`float<class_float>` **linear_to_db** **(** :ref:`float<class_float>` lin **)**
  3185. Converts from linear energy to decibels (audio). This can be used to implement volume sliders that behave as expected (since volume isn't linear).
  3186. \ **Example:**\
  3187. ::
  3188. # "Slider" refers to a node that inherits Range such as HSlider or VSlider.
  3189. # Its range must be configured to go from 0 to 1.
  3190. # Change the bus name if you'd like to change the volume of a specific bus only.
  3191. AudioServer.set_bus_volume_db(AudioServer.get_bus_index("Master"), linear_to_db($Slider.value))
  3192. .. rst-class:: classref-item-separator
  3193. ----
  3194. .. _class_@GlobalScope_method_log:
  3195. .. rst-class:: classref-method
  3196. :ref:`float<class_float>` **log** **(** :ref:`float<class_float>` x **)**
  3197. Returns the `natural logarithm <https://en.wikipedia.org/wiki/Natural_logarithm>`__ of ``x`` (base `[i]e[/i] <https://en.wikipedia.org/wiki/E_(mathematical_constant)>`__, with *e* being approximately 2.71828). This is the amount of time needed to reach a certain level of continuous growth.
  3198. \ **Note:** This is not the same as the "log" function on most calculators, which uses a base 10 logarithm. To use base 10 logarithm, use ``log(x) / log(10)``.
  3199. ::
  3200. log(10) # Returns 2.302585
  3201. \ **Note:** The logarithm of ``0`` returns ``-inf``, while negative values return ``-nan``.
  3202. .. rst-class:: classref-item-separator
  3203. ----
  3204. .. _class_@GlobalScope_method_max:
  3205. .. rst-class:: classref-method
  3206. :ref:`Variant<class_Variant>` **max** **(** ... **)** |vararg|
  3207. Returns the maximum of the given numeric values. This function can take any number of arguments.
  3208. ::
  3209. max(1, 7, 3, -6, 5) # Returns 7
  3210. .. rst-class:: classref-item-separator
  3211. ----
  3212. .. _class_@GlobalScope_method_maxf:
  3213. .. rst-class:: classref-method
  3214. :ref:`float<class_float>` **maxf** **(** :ref:`float<class_float>` a, :ref:`float<class_float>` b **)**
  3215. Returns the maximum of two :ref:`float<class_float>` values.
  3216. ::
  3217. maxf(3.6, 24) # Returns 24.0
  3218. maxf(-3.99, -4) # Returns -3.99
  3219. .. rst-class:: classref-item-separator
  3220. ----
  3221. .. _class_@GlobalScope_method_maxi:
  3222. .. rst-class:: classref-method
  3223. :ref:`int<class_int>` **maxi** **(** :ref:`int<class_int>` a, :ref:`int<class_int>` b **)**
  3224. Returns the maximum of two :ref:`int<class_int>` values.
  3225. ::
  3226. maxi(1, 2) # Returns 2
  3227. maxi(-3, -4) # Returns -3
  3228. .. rst-class:: classref-item-separator
  3229. ----
  3230. .. _class_@GlobalScope_method_min:
  3231. .. rst-class:: classref-method
  3232. :ref:`Variant<class_Variant>` **min** **(** ... **)** |vararg|
  3233. Returns the minimum of the given numeric values. This function can take any number of arguments.
  3234. ::
  3235. min(1, 7, 3, -6, 5) # Returns -6
  3236. .. rst-class:: classref-item-separator
  3237. ----
  3238. .. _class_@GlobalScope_method_minf:
  3239. .. rst-class:: classref-method
  3240. :ref:`float<class_float>` **minf** **(** :ref:`float<class_float>` a, :ref:`float<class_float>` b **)**
  3241. Returns the minimum of two :ref:`float<class_float>` values.
  3242. ::
  3243. minf(3.6, 24) # Returns 3.6
  3244. minf(-3.99, -4) # Returns -4.0
  3245. .. rst-class:: classref-item-separator
  3246. ----
  3247. .. _class_@GlobalScope_method_mini:
  3248. .. rst-class:: classref-method
  3249. :ref:`int<class_int>` **mini** **(** :ref:`int<class_int>` a, :ref:`int<class_int>` b **)**
  3250. Returns the minimum of two :ref:`int<class_int>` values.
  3251. ::
  3252. mini(1, 2) # Returns 1
  3253. mini(-3, -4) # Returns -4
  3254. .. rst-class:: classref-item-separator
  3255. ----
  3256. .. _class_@GlobalScope_method_move_toward:
  3257. .. rst-class:: classref-method
  3258. :ref:`float<class_float>` **move_toward** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` delta **)**
  3259. Moves ``from`` toward ``to`` by the ``delta`` amount. Will not go past ``to``.
  3260. Use a negative ``delta`` value to move away.
  3261. ::
  3262. move_toward(5, 10, 4) # Returns 9
  3263. move_toward(10, 5, 4) # Returns 6
  3264. move_toward(5, 10, 9) # Returns 10
  3265. move_toward(10, 5, -1.5) # Returns 11.5
  3266. .. rst-class:: classref-item-separator
  3267. ----
  3268. .. _class_@GlobalScope_method_nearest_po2:
  3269. .. rst-class:: classref-method
  3270. :ref:`int<class_int>` **nearest_po2** **(** :ref:`int<class_int>` value **)**
  3271. Returns the smallest integer power of 2 that is greater than or equal to ``value``.
  3272. ::
  3273. nearest_po2(3) # Returns 4
  3274. nearest_po2(4) # Returns 4
  3275. nearest_po2(5) # Returns 8
  3276. nearest_po2(0) # Returns 0 (this may not be expected)
  3277. nearest_po2(-1) # Returns 0 (this may not be expected)
  3278. \ **Warning:** Due to its implementation, this method returns ``0`` rather than ``1`` for values less than or equal to ``0``, with an exception for ``value`` being the smallest negative 64-bit integer (``-9223372036854775808``) in which case the ``value`` is returned unchanged.
  3279. .. rst-class:: classref-item-separator
  3280. ----
  3281. .. _class_@GlobalScope_method_pingpong:
  3282. .. rst-class:: classref-method
  3283. :ref:`float<class_float>` **pingpong** **(** :ref:`float<class_float>` value, :ref:`float<class_float>` length **)**
  3284. Wraps ``value`` between ``0`` and the ``length``. If the limit is reached, the next value the function returns is decreased to the ``0`` side or increased to the ``length`` side (like a triangle wave). If ``length`` is less than zero, it becomes positive.
  3285. ::
  3286. pingpong(-3.0, 3.0) # Returns 3.0
  3287. pingpong(-2.0, 3.0) # Returns 2.0
  3288. pingpong(-1.0, 3.0) # Returns 1.0
  3289. pingpong(0.0, 3.0) # Returns 0.0
  3290. pingpong(1.0, 3.0) # Returns 1.0
  3291. pingpong(2.0, 3.0) # Returns 2.0
  3292. pingpong(3.0, 3.0) # Returns 3.0
  3293. pingpong(4.0, 3.0) # Returns 2.0
  3294. pingpong(5.0, 3.0) # Returns 1.0
  3295. pingpong(6.0, 3.0) # Returns 0.0
  3296. .. rst-class:: classref-item-separator
  3297. ----
  3298. .. _class_@GlobalScope_method_posmod:
  3299. .. rst-class:: classref-method
  3300. :ref:`int<class_int>` **posmod** **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y **)**
  3301. Returns the integer modulus of ``x`` divided by ``y`` that wraps equally in positive and negative.
  3302. ::
  3303. print("#(i) (i % 3) (posmod(i, 3))")
  3304. for i in range(-3, 4):
  3305. print("%2d %2d | %2d" % [i, i % 3, posmod(i, 3)])
  3306. Produces:
  3307. ::
  3308. (i) (i % 3) (posmod(i, 3))
  3309. -3 0 | 0
  3310. -2 -2 | 1
  3311. -1 -1 | 2
  3312. 0 0 | 0
  3313. 1 1 | 1
  3314. 2 2 | 2
  3315. 3 0 | 0
  3316. .. rst-class:: classref-item-separator
  3317. ----
  3318. .. _class_@GlobalScope_method_pow:
  3319. .. rst-class:: classref-method
  3320. :ref:`float<class_float>` **pow** **(** :ref:`float<class_float>` base, :ref:`float<class_float>` exp **)**
  3321. Returns the result of ``base`` raised to the power of ``exp``.
  3322. In GDScript, this is the equivalent of the ``**`` operator.
  3323. ::
  3324. pow(2, 5) # Returns 32.0
  3325. pow(4, 1.5) # Returns 8.0
  3326. .. rst-class:: classref-item-separator
  3327. ----
  3328. .. _class_@GlobalScope_method_print:
  3329. .. rst-class:: classref-method
  3330. void **print** **(** ... **)** |vararg|
  3331. Converts one or more arguments of any type to string in the best way possible and prints them to the console.
  3332. .. tabs::
  3333. .. code-tab:: gdscript
  3334. var a = [1, 2, 3]
  3335. print("a", "b", a) # Prints ab[1, 2, 3]
  3336. .. code-tab:: csharp
  3337. var a = new Godot.Collections.Array { 1, 2, 3 };
  3338. GD.Print("a", "b", a); // Prints ab[1, 2, 3]
  3339. \ **Note:** Consider using :ref:`push_error<class_@GlobalScope_method_push_error>` and :ref:`push_warning<class_@GlobalScope_method_push_warning>` to print error and warning messages instead of :ref:`print<class_@GlobalScope_method_print>` or :ref:`print_rich<class_@GlobalScope_method_print_rich>`. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed.
  3340. .. rst-class:: classref-item-separator
  3341. ----
  3342. .. _class_@GlobalScope_method_print_rich:
  3343. .. rst-class:: classref-method
  3344. void **print_rich** **(** ... **)** |vararg|
  3345. Converts one or more arguments of any type to string in the best way possible and prints them to the console.
  3346. The following BBCode tags are supported: ``b``, ``i``, ``u``, ``s``, ``indent``, ``code``, ``url``, ``center``, ``right``, ``color``, ``bgcolor``, ``fgcolor``.
  3347. Color tags only support the following named colors: ``black``, ``red``, ``green``, ``yellow``, ``blue``, ``magenta``, ``pink``, ``purple``, ``cyan``, ``white``, ``orange``, ``gray``. Hexadecimal color codes are not supported.
  3348. URL tags only support URLs wrapped by a URL tag, not URLs with a different title.
  3349. When printing to standard output, the supported subset of BBCode is converted to ANSI escape codes for the terminal emulator to display. Support for ANSI escape codes varies across terminal emulators, especially for italic and strikethrough. In standard output, ``code`` is represented with faint text but without any font change. Unsupported tags are left as-is in standard output.
  3350. .. tabs::
  3351. .. code-tab:: gdscript
  3352. print_rich("[color=green][b]Hello world![/b][/color]") # Prints out "Hello world!" in green with a bold font
  3353. .. code-tab:: csharp
  3354. GD.PrintRich("[color=green][b]Hello world![/b][/color]"); // Prints out "Hello world!" in green with a bold font
  3355. \ **Note:** Consider using :ref:`push_error<class_@GlobalScope_method_push_error>` and :ref:`push_warning<class_@GlobalScope_method_push_warning>` to print error and warning messages instead of :ref:`print<class_@GlobalScope_method_print>` or :ref:`print_rich<class_@GlobalScope_method_print_rich>`. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed.
  3356. \ **Note:** On Windows, only Windows 10 and later correctly displays ANSI escape codes in standard output.
  3357. .. rst-class:: classref-item-separator
  3358. ----
  3359. .. _class_@GlobalScope_method_print_verbose:
  3360. .. rst-class:: classref-method
  3361. void **print_verbose** **(** ... **)** |vararg|
  3362. If verbose mode is enabled (:ref:`OS.is_stdout_verbose<class_OS_method_is_stdout_verbose>` returning ``true``), converts one or more arguments of any type to string in the best way possible and prints them to the console.
  3363. .. rst-class:: classref-item-separator
  3364. ----
  3365. .. _class_@GlobalScope_method_printerr:
  3366. .. rst-class:: classref-method
  3367. void **printerr** **(** ... **)** |vararg|
  3368. Prints one or more arguments to strings in the best way possible to standard error line.
  3369. .. tabs::
  3370. .. code-tab:: gdscript
  3371. printerr("prints to stderr")
  3372. .. code-tab:: csharp
  3373. GD.PrintErr("prints to stderr");
  3374. .. rst-class:: classref-item-separator
  3375. ----
  3376. .. _class_@GlobalScope_method_printraw:
  3377. .. rst-class:: classref-method
  3378. void **printraw** **(** ... **)** |vararg|
  3379. Prints one or more arguments to strings in the best way possible to the OS terminal. Unlike :ref:`print<class_@GlobalScope_method_print>`, no newline is automatically added at the end.
  3380. .. tabs::
  3381. .. code-tab:: gdscript
  3382. printraw("A")
  3383. printraw("B")
  3384. printraw("C")
  3385. # Prints ABC to terminal
  3386. .. code-tab:: csharp
  3387. GD.PrintRaw("A");
  3388. GD.PrintRaw("B");
  3389. GD.PrintRaw("C");
  3390. // Prints ABC to terminal
  3391. .. rst-class:: classref-item-separator
  3392. ----
  3393. .. _class_@GlobalScope_method_prints:
  3394. .. rst-class:: classref-method
  3395. void **prints** **(** ... **)** |vararg|
  3396. Prints one or more arguments to the console with a space between each argument.
  3397. .. tabs::
  3398. .. code-tab:: gdscript
  3399. prints("A", "B", "C") # Prints A B C
  3400. .. code-tab:: csharp
  3401. GD.PrintS("A", "B", "C"); // Prints A B C
  3402. .. rst-class:: classref-item-separator
  3403. ----
  3404. .. _class_@GlobalScope_method_printt:
  3405. .. rst-class:: classref-method
  3406. void **printt** **(** ... **)** |vararg|
  3407. Prints one or more arguments to the console with a tab between each argument.
  3408. .. tabs::
  3409. .. code-tab:: gdscript
  3410. printt("A", "B", "C") # Prints A B C
  3411. .. code-tab:: csharp
  3412. GD.PrintT("A", "B", "C"); // Prints A B C
  3413. .. rst-class:: classref-item-separator
  3414. ----
  3415. .. _class_@GlobalScope_method_push_error:
  3416. .. rst-class:: classref-method
  3417. void **push_error** **(** ... **)** |vararg|
  3418. Pushes an error message to Godot's built-in debugger and to the OS terminal.
  3419. .. tabs::
  3420. .. code-tab:: gdscript
  3421. push_error("test error") # Prints "test error" to debugger and terminal as error call
  3422. .. code-tab:: csharp
  3423. GD.PushError("test error"); // Prints "test error" to debugger and terminal as error call
  3424. \ **Note:** This function does not pause project execution. To print an error message and pause project execution in debug builds, use ``assert(false, "test error")`` instead.
  3425. .. rst-class:: classref-item-separator
  3426. ----
  3427. .. _class_@GlobalScope_method_push_warning:
  3428. .. rst-class:: classref-method
  3429. void **push_warning** **(** ... **)** |vararg|
  3430. Pushes a warning message to Godot's built-in debugger and to the OS terminal.
  3431. .. tabs::
  3432. .. code-tab:: gdscript
  3433. push_warning("test warning") # Prints "test warning" to debugger and terminal as warning call
  3434. .. code-tab:: csharp
  3435. GD.PushWarning("test warning"); // Prints "test warning" to debugger and terminal as warning call
  3436. .. rst-class:: classref-item-separator
  3437. ----
  3438. .. _class_@GlobalScope_method_rad_to_deg:
  3439. .. rst-class:: classref-method
  3440. :ref:`float<class_float>` **rad_to_deg** **(** :ref:`float<class_float>` rad **)**
  3441. Converts an angle expressed in radians to degrees.
  3442. ::
  3443. rad_to_deg(0.523599) # Returns 30
  3444. rad_to_deg(PI) # Returns 180
  3445. rad_to_deg(PI * 2) # Returns 360
  3446. .. rst-class:: classref-item-separator
  3447. ----
  3448. .. _class_@GlobalScope_method_rand_from_seed:
  3449. .. rst-class:: classref-method
  3450. :ref:`PackedInt64Array<class_PackedInt64Array>` **rand_from_seed** **(** :ref:`int<class_int>` seed **)**
  3451. Given a ``seed``, returns a :ref:`PackedInt64Array<class_PackedInt64Array>` of size ``2``, where its first element is the randomized :ref:`int<class_int>` value, and the second element is the same as ``seed``. Passing the same ``seed`` consistently returns the same array.
  3452. \ **Note:** "Seed" here refers to the internal state of the pseudo random number generator, currently implemented as a 64 bit integer.
  3453. ::
  3454. var a = rand_from_seed(4)
  3455. print(a[0]) # Prints 2879024997
  3456. print(a[1]) # Prints 4
  3457. .. rst-class:: classref-item-separator
  3458. ----
  3459. .. _class_@GlobalScope_method_randf:
  3460. .. rst-class:: classref-method
  3461. :ref:`float<class_float>` **randf** **(** **)**
  3462. Returns a random floating point value between ``0.0`` and ``1.0`` (inclusive).
  3463. .. tabs::
  3464. .. code-tab:: gdscript
  3465. randf() # Returns e.g. 0.375671
  3466. .. code-tab:: csharp
  3467. GD.Randf(); // Returns e.g. 0.375671
  3468. .. rst-class:: classref-item-separator
  3469. ----
  3470. .. _class_@GlobalScope_method_randf_range:
  3471. .. rst-class:: classref-method
  3472. :ref:`float<class_float>` **randf_range** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to **)**
  3473. Returns a random floating point value between ``from`` and ``to`` (inclusive).
  3474. .. tabs::
  3475. .. code-tab:: gdscript
  3476. randf_range(0, 20.5) # Returns e.g. 7.45315
  3477. randf_range(-10, 10) # Returns e.g. -3.844535
  3478. .. code-tab:: csharp
  3479. GD.RandRange(0.0, 20.5); // Returns e.g. 7.45315
  3480. GD.RandRange(-10.0, 10.0); // Returns e.g. -3.844535
  3481. .. rst-class:: classref-item-separator
  3482. ----
  3483. .. _class_@GlobalScope_method_randfn:
  3484. .. rst-class:: classref-method
  3485. :ref:`float<class_float>` **randfn** **(** :ref:`float<class_float>` mean, :ref:`float<class_float>` deviation **)**
  3486. Returns a normally-distributed pseudo-random floating point value using Box-Muller transform with the specified ``mean`` and a standard ``deviation``. This is also called Gaussian distribution.
  3487. .. rst-class:: classref-item-separator
  3488. ----
  3489. .. _class_@GlobalScope_method_randi:
  3490. .. rst-class:: classref-method
  3491. :ref:`int<class_int>` **randi** **(** **)**
  3492. Returns a random unsigned 32-bit integer. Use remainder to obtain a random value in the interval ``[0, N - 1]`` (where N is smaller than 2^32).
  3493. .. tabs::
  3494. .. code-tab:: gdscript
  3495. randi() # Returns random integer between 0 and 2^32 - 1
  3496. randi() % 20 # Returns random integer between 0 and 19
  3497. randi() % 100 # Returns random integer between 0 and 99
  3498. randi() % 100 + 1 # Returns random integer between 1 and 100
  3499. .. code-tab:: csharp
  3500. GD.Randi(); // Returns random integer between 0 and 2^32 - 1
  3501. GD.Randi() % 20; // Returns random integer between 0 and 19
  3502. GD.Randi() % 100; // Returns random integer between 0 and 99
  3503. GD.Randi() % 100 + 1; // Returns random integer between 1 and 100
  3504. .. rst-class:: classref-item-separator
  3505. ----
  3506. .. _class_@GlobalScope_method_randi_range:
  3507. .. rst-class:: classref-method
  3508. :ref:`int<class_int>` **randi_range** **(** :ref:`int<class_int>` from, :ref:`int<class_int>` to **)**
  3509. Returns a random signed 32-bit integer between ``from`` and ``to`` (inclusive). If ``to`` is lesser than ``from``, they are swapped.
  3510. .. tabs::
  3511. .. code-tab:: gdscript
  3512. randi_range(0, 1) # Returns either 0 or 1
  3513. randi_range(-10, 1000) # Returns random integer between -10 and 1000
  3514. .. code-tab:: csharp
  3515. GD.RandRange(0, 1); // Returns either 0 or 1
  3516. GD.RandRange(-10, 1000); // Returns random integer between -10 and 1000
  3517. .. rst-class:: classref-item-separator
  3518. ----
  3519. .. _class_@GlobalScope_method_randomize:
  3520. .. rst-class:: classref-method
  3521. void **randomize** **(** **)**
  3522. Randomizes the seed (or the internal state) of the random number generator. The current implementation uses a number based on the device's time.
  3523. \ **Note:** This function is called automatically when the project is run. If you need to fix the seed to have consistent, reproducible results, use :ref:`seed<class_@GlobalScope_method_seed>` to initialize the random number generator.
  3524. .. rst-class:: classref-item-separator
  3525. ----
  3526. .. _class_@GlobalScope_method_remap:
  3527. .. rst-class:: classref-method
  3528. :ref:`float<class_float>` **remap** **(** :ref:`float<class_float>` value, :ref:`float<class_float>` istart, :ref:`float<class_float>` istop, :ref:`float<class_float>` ostart, :ref:`float<class_float>` ostop **)**
  3529. Maps a ``value`` from range ``[istart, istop]`` to ``[ostart, ostop]``. See also :ref:`lerp<class_@GlobalScope_method_lerp>` and :ref:`inverse_lerp<class_@GlobalScope_method_inverse_lerp>`. If ``value`` is outside ``[istart, istop]``, then the resulting value will also be outside ``[ostart, ostop]``. If this is not desired, use :ref:`clamp<class_@GlobalScope_method_clamp>` on the result of this function.
  3530. ::
  3531. remap(75, 0, 100, -1, 1) # Returns 0.5
  3532. For complex use cases where multiple ranges are needed, consider using :ref:`Curve<class_Curve>` or :ref:`Gradient<class_Gradient>` instead.
  3533. .. rst-class:: classref-item-separator
  3534. ----
  3535. .. _class_@GlobalScope_method_rid_allocate_id:
  3536. .. rst-class:: classref-method
  3537. :ref:`int<class_int>` **rid_allocate_id** **(** **)**
  3538. Allocates a unique ID which can be used by the implementation to construct a RID. This is used mainly from native extensions to implement servers.
  3539. .. rst-class:: classref-item-separator
  3540. ----
  3541. .. _class_@GlobalScope_method_rid_from_int64:
  3542. .. rst-class:: classref-method
  3543. :ref:`RID<class_RID>` **rid_from_int64** **(** :ref:`int<class_int>` base **)**
  3544. Creates a RID from a ``base``. This is used mainly from native extensions to build servers.
  3545. .. rst-class:: classref-item-separator
  3546. ----
  3547. .. _class_@GlobalScope_method_round:
  3548. .. rst-class:: classref-method
  3549. :ref:`Variant<class_Variant>` **round** **(** :ref:`Variant<class_Variant>` x **)**
  3550. Rounds ``x`` to the nearest whole number, with halfway cases rounded away from 0. Supported types: :ref:`int<class_int>`, :ref:`float<class_float>`, :ref:`Vector2<class_Vector2>`, :ref:`Vector3<class_Vector3>`, :ref:`Vector4<class_Vector4>`.
  3551. ::
  3552. round(2.4) # Returns 2
  3553. round(2.5) # Returns 3
  3554. round(2.6) # Returns 3
  3555. See also :ref:`floor<class_@GlobalScope_method_floor>`, :ref:`ceil<class_@GlobalScope_method_ceil>`, and :ref:`snapped<class_@GlobalScope_method_snapped>`.
  3556. \ **Note:** For better type safety, use :ref:`roundf<class_@GlobalScope_method_roundf>`, :ref:`roundi<class_@GlobalScope_method_roundi>`, :ref:`Vector2.round<class_Vector2_method_round>`, :ref:`Vector3.round<class_Vector3_method_round>`, or :ref:`Vector4.round<class_Vector4_method_round>`.
  3557. .. rst-class:: classref-item-separator
  3558. ----
  3559. .. _class_@GlobalScope_method_roundf:
  3560. .. rst-class:: classref-method
  3561. :ref:`float<class_float>` **roundf** **(** :ref:`float<class_float>` x **)**
  3562. Rounds ``x`` to the nearest whole number, with halfway cases rounded away from 0.
  3563. A type-safe version of :ref:`round<class_@GlobalScope_method_round>`, returning a :ref:`float<class_float>`.
  3564. .. rst-class:: classref-item-separator
  3565. ----
  3566. .. _class_@GlobalScope_method_roundi:
  3567. .. rst-class:: classref-method
  3568. :ref:`int<class_int>` **roundi** **(** :ref:`float<class_float>` x **)**
  3569. Rounds ``x`` to the nearest whole number, with halfway cases rounded away from 0.
  3570. A type-safe version of :ref:`round<class_@GlobalScope_method_round>`, returning an :ref:`int<class_int>`.
  3571. .. rst-class:: classref-item-separator
  3572. ----
  3573. .. _class_@GlobalScope_method_seed:
  3574. .. rst-class:: classref-method
  3575. void **seed** **(** :ref:`int<class_int>` base **)**
  3576. Sets the seed for the random number generator to ``base``. Setting the seed manually can ensure consistent, repeatable results for most random functions.
  3577. .. tabs::
  3578. .. code-tab:: gdscript
  3579. var my_seed = "Godot Rocks".hash()
  3580. seed(my_seed)
  3581. var a = randf() + randi()
  3582. seed(my_seed)
  3583. var b = randf() + randi()
  3584. # a and b are now identical
  3585. .. code-tab:: csharp
  3586. ulong mySeed = (ulong)GD.Hash("Godot Rocks");
  3587. GD.Seed(mySeed);
  3588. var a = GD.Randf() + GD.Randi();
  3589. GD.Seed(mySeed);
  3590. var b = GD.Randf() + GD.Randi();
  3591. // a and b are now identical
  3592. .. rst-class:: classref-item-separator
  3593. ----
  3594. .. _class_@GlobalScope_method_sign:
  3595. .. rst-class:: classref-method
  3596. :ref:`Variant<class_Variant>` **sign** **(** :ref:`Variant<class_Variant>` x **)**
  3597. Returns the same type of :ref:`Variant<class_Variant>` as ``x``, with ``-1`` for negative values, ``1`` for positive values, and ``0`` for zeros. Supported types: :ref:`int<class_int>`, :ref:`float<class_float>`, :ref:`Vector2<class_Vector2>`, :ref:`Vector2i<class_Vector2i>`, :ref:`Vector3<class_Vector3>`, :ref:`Vector3i<class_Vector3i>`, :ref:`Vector4<class_Vector4>`, :ref:`Vector4i<class_Vector4i>`.
  3598. ::
  3599. sign(-6.0) # Returns -1
  3600. sign(0.0) # Returns 0
  3601. sign(6.0) # Returns 1
  3602. sign(Vector3(-6.0, 0.0, 6.0)) # Returns (-1, 0, 1)
  3603. \ **Note:** For better type safety, use :ref:`signf<class_@GlobalScope_method_signf>`, :ref:`signi<class_@GlobalScope_method_signi>`, :ref:`Vector2.sign<class_Vector2_method_sign>`, :ref:`Vector2i.sign<class_Vector2i_method_sign>`, :ref:`Vector3.sign<class_Vector3_method_sign>`, :ref:`Vector3i.sign<class_Vector3i_method_sign>`, :ref:`Vector4.sign<class_Vector4_method_sign>`, or :ref:`Vector4i.sign<class_Vector4i_method_sign>`.
  3604. .. rst-class:: classref-item-separator
  3605. ----
  3606. .. _class_@GlobalScope_method_signf:
  3607. .. rst-class:: classref-method
  3608. :ref:`float<class_float>` **signf** **(** :ref:`float<class_float>` x **)**
  3609. Returns ``-1.0`` if ``x`` is negative, ``1.0`` if ``x`` is positive, and ``0.0`` if ``x`` is zero.
  3610. ::
  3611. signf(-6.5) # Returns -1.0
  3612. signf(0.0) # Returns 0.0
  3613. signf(6.5) # Returns 1.0
  3614. .. rst-class:: classref-item-separator
  3615. ----
  3616. .. _class_@GlobalScope_method_signi:
  3617. .. rst-class:: classref-method
  3618. :ref:`int<class_int>` **signi** **(** :ref:`int<class_int>` x **)**
  3619. Returns ``-1`` if ``x`` is negative, ``1`` if ``x`` is positive, and ``0`` if if ``x`` is zero.
  3620. ::
  3621. signi(-6) # Returns -1
  3622. signi(0) # Returns 0
  3623. signi(6) # Returns 1
  3624. .. rst-class:: classref-item-separator
  3625. ----
  3626. .. _class_@GlobalScope_method_sin:
  3627. .. rst-class:: classref-method
  3628. :ref:`float<class_float>` **sin** **(** :ref:`float<class_float>` angle_rad **)**
  3629. Returns the sine of angle ``angle_rad`` in radians.
  3630. ::
  3631. sin(0.523599) # Returns 0.5
  3632. sin(deg_to_rad(90)) # Returns 1.0
  3633. .. rst-class:: classref-item-separator
  3634. ----
  3635. .. _class_@GlobalScope_method_sinh:
  3636. .. rst-class:: classref-method
  3637. :ref:`float<class_float>` **sinh** **(** :ref:`float<class_float>` x **)**
  3638. Returns the hyperbolic sine of ``x``.
  3639. ::
  3640. var a = log(2.0) # Returns 0.693147
  3641. sinh(a) # Returns 0.75
  3642. .. rst-class:: classref-item-separator
  3643. ----
  3644. .. _class_@GlobalScope_method_smoothstep:
  3645. .. rst-class:: classref-method
  3646. :ref:`float<class_float>` **smoothstep** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` x **)**
  3647. Returns the result of smoothly interpolating the value of ``x`` between ``0`` and ``1``, based on the where ``x`` lies with respect to the edges ``from`` and ``to``.
  3648. The return value is ``0`` if ``x <= from``, and ``1`` if ``x >= to``. If ``x`` lies between ``from`` and ``to``, the returned value follows an S-shaped curve that maps ``x`` between ``0`` and ``1``.
  3649. This S-shaped curve is the cubic Hermite interpolator, given by ``f(y) = 3*y^2 - 2*y^3`` where ``y = (x-from) / (to-from)``.
  3650. ::
  3651. smoothstep(0, 2, -5.0) # Returns 0.0
  3652. smoothstep(0, 2, 0.5) # Returns 0.15625
  3653. smoothstep(0, 2, 1.0) # Returns 0.5
  3654. smoothstep(0, 2, 2.0) # Returns 1.0
  3655. Compared to :ref:`ease<class_@GlobalScope_method_ease>` with a curve value of ``-1.6521``, :ref:`smoothstep<class_@GlobalScope_method_smoothstep>` returns the smoothest possible curve with no sudden changes in the derivative. If you need to perform more advanced transitions, use :ref:`Tween<class_Tween>` or :ref:`AnimationPlayer<class_AnimationPlayer>`.
  3656. \ `Comparison between smoothstep() and ease(x, -1.6521) return values <https://raw.githubusercontent.com/godotengine/godot-docs/master/img/smoothstep_ease_comparison.png>`__
  3657. .. rst-class:: classref-item-separator
  3658. ----
  3659. .. _class_@GlobalScope_method_snapped:
  3660. .. rst-class:: classref-method
  3661. :ref:`Variant<class_Variant>` **snapped** **(** :ref:`Variant<class_Variant>` x, :ref:`Variant<class_Variant>` step **)**
  3662. Returns the multiple of ``step`` that is the closest to ``x``. This can also be used to round a floating point number to an arbitrary number of decimals.
  3663. The returned value is the same type of :ref:`Variant<class_Variant>` as ``step``. Supported types: :ref:`int<class_int>`, :ref:`float<class_float>`, :ref:`Vector2<class_Vector2>`, :ref:`Vector2i<class_Vector2i>`, :ref:`Vector3<class_Vector3>`, :ref:`Vector3i<class_Vector3i>`, :ref:`Vector4<class_Vector4>`, :ref:`Vector4i<class_Vector4i>`.
  3664. ::
  3665. snapped(100, 32) # Returns 96
  3666. snapped(3.14159, 0.01) # Returns 3.14
  3667. snapped(Vector2(34, 70), Vector2(8, 8)) # Returns (32, 72)
  3668. See also :ref:`ceil<class_@GlobalScope_method_ceil>`, :ref:`floor<class_@GlobalScope_method_floor>`, and :ref:`round<class_@GlobalScope_method_round>`.
  3669. \ **Note:** For better type safety, use :ref:`snappedf<class_@GlobalScope_method_snappedf>`, :ref:`snappedi<class_@GlobalScope_method_snappedi>`, :ref:`Vector2.snapped<class_Vector2_method_snapped>`, :ref:`Vector2i.snapped<class_Vector2i_method_snapped>`, :ref:`Vector3.snapped<class_Vector3_method_snapped>`, :ref:`Vector3i.snapped<class_Vector3i_method_snapped>`, :ref:`Vector4.snapped<class_Vector4_method_snapped>`, or :ref:`Vector4i.snapped<class_Vector4i_method_snapped>`.
  3670. .. rst-class:: classref-item-separator
  3671. ----
  3672. .. _class_@GlobalScope_method_snappedf:
  3673. .. rst-class:: classref-method
  3674. :ref:`float<class_float>` **snappedf** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` step **)**
  3675. Returns the multiple of ``step`` that is the closest to ``x``. This can also be used to round a floating point number to an arbitrary number of decimals.
  3676. A type-safe version of :ref:`snapped<class_@GlobalScope_method_snapped>`, returning a :ref:`float<class_float>`.
  3677. ::
  3678. snappedf(32.0, 2.5) # Returns 32.5
  3679. snappedf(3.14159, 0.01) # Returns 3.14
  3680. .. rst-class:: classref-item-separator
  3681. ----
  3682. .. _class_@GlobalScope_method_snappedi:
  3683. .. rst-class:: classref-method
  3684. :ref:`int<class_int>` **snappedi** **(** :ref:`float<class_float>` x, :ref:`int<class_int>` step **)**
  3685. Returns the multiple of ``step`` that is the closest to ``x``.
  3686. A type-safe version of :ref:`snapped<class_@GlobalScope_method_snapped>`, returning an :ref:`int<class_int>`.
  3687. ::
  3688. snappedi(53, 16) # Returns 48
  3689. snappedi(4096, 100) # Returns 4100
  3690. .. rst-class:: classref-item-separator
  3691. ----
  3692. .. _class_@GlobalScope_method_sqrt:
  3693. .. rst-class:: classref-method
  3694. :ref:`float<class_float>` **sqrt** **(** :ref:`float<class_float>` x **)**
  3695. Returns the square root of ``x``, where ``x`` is a non-negative number.
  3696. ::
  3697. sqrt(9) # Returns 3
  3698. sqrt(10.24) # Returns 3.2
  3699. sqrt(-1) # Returns NaN
  3700. \ **Note:** Negative values of ``x`` return NaN ("Not a Number"). in C#, if you need negative inputs, use ``System.Numerics.Complex``.
  3701. .. rst-class:: classref-item-separator
  3702. ----
  3703. .. _class_@GlobalScope_method_step_decimals:
  3704. .. rst-class:: classref-method
  3705. :ref:`int<class_int>` **step_decimals** **(** :ref:`float<class_float>` x **)**
  3706. Returns the position of the first non-zero digit, after the decimal point. Note that the maximum return value is 10, which is a design decision in the implementation.
  3707. ::
  3708. var n = step_decimals(5) # n is 0
  3709. n = step_decimals(1.0005) # n is 4
  3710. n = step_decimals(0.000000005) # n is 9
  3711. .. rst-class:: classref-item-separator
  3712. ----
  3713. .. _class_@GlobalScope_method_str:
  3714. .. rst-class:: classref-method
  3715. :ref:`String<class_String>` **str** **(** ... **)** |vararg|
  3716. Converts one or more arguments of any :ref:`Variant<class_Variant>` type to a :ref:`String<class_String>` in the best way possible.
  3717. ::
  3718. var a = [10, 20, 30]
  3719. var b = str(a)
  3720. print(len(a)) # Prints 3 (the number of elements in the array).
  3721. print(len(b)) # Prints 12 (the length of the string "[10, 20, 30]").
  3722. .. rst-class:: classref-item-separator
  3723. ----
  3724. .. _class_@GlobalScope_method_str_to_var:
  3725. .. rst-class:: classref-method
  3726. :ref:`Variant<class_Variant>` **str_to_var** **(** :ref:`String<class_String>` string **)**
  3727. Converts a formatted ``string`` that was returned by :ref:`var_to_str<class_@GlobalScope_method_var_to_str>` to the original :ref:`Variant<class_Variant>`.
  3728. .. tabs::
  3729. .. code-tab:: gdscript
  3730. var data = '{ "a": 1, "b": 2 }' # data is a String
  3731. var dict = str_to_var(data) # dict is a Dictionary
  3732. print(dict["a"]) # Prints 1
  3733. .. code-tab:: csharp
  3734. string data = "{ \"a\": 1, \"b\": 2 }"; // data is a string
  3735. var dict = GD.StrToVar(data).AsGodotDictionary(); // dict is a Dictionary
  3736. GD.Print(dict["a"]); // Prints 1
  3737. .. rst-class:: classref-item-separator
  3738. ----
  3739. .. _class_@GlobalScope_method_tan:
  3740. .. rst-class:: classref-method
  3741. :ref:`float<class_float>` **tan** **(** :ref:`float<class_float>` angle_rad **)**
  3742. Returns the tangent of angle ``angle_rad`` in radians.
  3743. ::
  3744. tan(deg_to_rad(45)) # Returns 1
  3745. .. rst-class:: classref-item-separator
  3746. ----
  3747. .. _class_@GlobalScope_method_tanh:
  3748. .. rst-class:: classref-method
  3749. :ref:`float<class_float>` **tanh** **(** :ref:`float<class_float>` x **)**
  3750. Returns the hyperbolic tangent of ``x``.
  3751. ::
  3752. var a = log(2.0) # Returns 0.693147
  3753. tanh(a) # Returns 0.6
  3754. .. rst-class:: classref-item-separator
  3755. ----
  3756. .. _class_@GlobalScope_method_typeof:
  3757. .. rst-class:: classref-method
  3758. :ref:`int<class_int>` **typeof** **(** :ref:`Variant<class_Variant>` variable **)**
  3759. Returns the internal type of the given ``variable``, using the :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` values.
  3760. ::
  3761. var json = JSON.new()
  3762. json.parse('["a", "b", "c"]')
  3763. var result = json.get_data()
  3764. if typeof(result) == TYPE_ARRAY:
  3765. print(result[0]) # Prints a
  3766. else:
  3767. print("Unexpected result")
  3768. .. rst-class:: classref-item-separator
  3769. ----
  3770. .. _class_@GlobalScope_method_var_to_bytes:
  3771. .. rst-class:: classref-method
  3772. :ref:`PackedByteArray<class_PackedByteArray>` **var_to_bytes** **(** :ref:`Variant<class_Variant>` variable **)**
  3773. Encodes a :ref:`Variant<class_Variant>` value to a byte array, without encoding objects. Deserialization can be done with :ref:`bytes_to_var<class_@GlobalScope_method_bytes_to_var>`.
  3774. \ **Note:** If you need object serialization, see :ref:`var_to_bytes_with_objects<class_@GlobalScope_method_var_to_bytes_with_objects>`.
  3775. .. rst-class:: classref-item-separator
  3776. ----
  3777. .. _class_@GlobalScope_method_var_to_bytes_with_objects:
  3778. .. rst-class:: classref-method
  3779. :ref:`PackedByteArray<class_PackedByteArray>` **var_to_bytes_with_objects** **(** :ref:`Variant<class_Variant>` variable **)**
  3780. Encodes a :ref:`Variant<class_Variant>` value to a byte array. Encoding objects is allowed (and can potentially include executable code). Deserialization can be done with :ref:`bytes_to_var_with_objects<class_@GlobalScope_method_bytes_to_var_with_objects>`.
  3781. .. rst-class:: classref-item-separator
  3782. ----
  3783. .. _class_@GlobalScope_method_var_to_str:
  3784. .. rst-class:: classref-method
  3785. :ref:`String<class_String>` **var_to_str** **(** :ref:`Variant<class_Variant>` variable **)**
  3786. Converts a :ref:`Variant<class_Variant>` ``variable`` to a formatted :ref:`String<class_String>` that can then be parsed using :ref:`str_to_var<class_@GlobalScope_method_str_to_var>`.
  3787. .. tabs::
  3788. .. code-tab:: gdscript
  3789. var a = { "a": 1, "b": 2 }
  3790. print(var_to_str(a))
  3791. .. code-tab:: csharp
  3792. var a = new Godot.Collections.Dictionary { ["a"] = 1, ["b"] = 2 };
  3793. GD.Print(GD.VarToStr(a));
  3794. Prints:
  3795. ::
  3796. {
  3797. "a": 1,
  3798. "b": 2
  3799. }
  3800. \ **Note:** Converting :ref:`Signal<class_Signal>` or :ref:`Callable<class_Callable>` is not supported and will result in an empty value for these types, regardless of their data.
  3801. .. rst-class:: classref-item-separator
  3802. ----
  3803. .. _class_@GlobalScope_method_weakref:
  3804. .. rst-class:: classref-method
  3805. :ref:`Variant<class_Variant>` **weakref** **(** :ref:`Variant<class_Variant>` obj **)**
  3806. Returns a weak reference to an object, or ``null`` if ``obj`` is invalid.
  3807. A weak reference to an object is not enough to keep the object alive: when the only remaining references to a referent are weak references, garbage collection is free to destroy the referent and reuse its memory for something else. However, until the object is actually destroyed the weak reference may return the object even if there are no strong references to it.
  3808. .. rst-class:: classref-item-separator
  3809. ----
  3810. .. _class_@GlobalScope_method_wrap:
  3811. .. rst-class:: classref-method
  3812. :ref:`Variant<class_Variant>` **wrap** **(** :ref:`Variant<class_Variant>` value, :ref:`Variant<class_Variant>` min, :ref:`Variant<class_Variant>` max **)**
  3813. Wraps the :ref:`Variant<class_Variant>` ``value`` between ``min`` and ``max``. Can be used for creating loop-alike behavior or infinite surfaces.
  3814. Variant types :ref:`int<class_int>` and :ref:`float<class_float>` are supported. If any of the arguments is :ref:`float<class_float>` this function returns a :ref:`float<class_float>`, otherwise it returns an :ref:`int<class_int>`.
  3815. ::
  3816. var a = wrap(4, 5, 10)
  3817. # a is 9 (int)
  3818. var a = wrap(7, 5, 10)
  3819. # a is 7 (int)
  3820. var a = wrap(10.5, 5, 10)
  3821. # a is 5.5 (float)
  3822. .. rst-class:: classref-item-separator
  3823. ----
  3824. .. _class_@GlobalScope_method_wrapf:
  3825. .. rst-class:: classref-method
  3826. :ref:`float<class_float>` **wrapf** **(** :ref:`float<class_float>` value, :ref:`float<class_float>` min, :ref:`float<class_float>` max **)**
  3827. Wraps the float ``value`` between ``min`` and ``max``. Can be used for creating loop-alike behavior or infinite surfaces.
  3828. ::
  3829. # Infinite loop between 5.0 and 9.9
  3830. value = wrapf(value + 0.1, 5.0, 10.0)
  3831. ::
  3832. # Infinite rotation (in radians)
  3833. angle = wrapf(angle + 0.1, 0.0, TAU)
  3834. ::
  3835. # Infinite rotation (in radians)
  3836. angle = wrapf(angle + 0.1, -PI, PI)
  3837. \ **Note:** If ``min`` is ``0``, this is equivalent to :ref:`fposmod<class_@GlobalScope_method_fposmod>`, so prefer using that instead.
  3838. \ ``wrapf`` is more flexible than using the :ref:`fposmod<class_@GlobalScope_method_fposmod>` approach by giving the user control over the minimum value.
  3839. .. rst-class:: classref-item-separator
  3840. ----
  3841. .. _class_@GlobalScope_method_wrapi:
  3842. .. rst-class:: classref-method
  3843. :ref:`int<class_int>` **wrapi** **(** :ref:`int<class_int>` value, :ref:`int<class_int>` min, :ref:`int<class_int>` max **)**
  3844. Wraps the integer ``value`` between ``min`` and ``max``. Can be used for creating loop-alike behavior or infinite surfaces.
  3845. ::
  3846. # Infinite loop between 5 and 9
  3847. frame = wrapi(frame + 1, 5, 10)
  3848. ::
  3849. # result is -2
  3850. var result = wrapi(-6, -5, -1)
  3851. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  3852. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  3853. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  3854. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  3855. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  3856. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  3857. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`