[email protected] 295 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280
  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/4.1/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/4.1/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. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - :doc:`Random number generation <../tutorials/math/random_number_generation>`
  20. .. rst-class:: classref-reftable-group
  21. Properties
  22. ----------
  23. .. table::
  24. :widths: auto
  25. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  26. | :ref:`AudioServer<class_AudioServer>` | :ref:`AudioServer<class_@GlobalScope_property_AudioServer>` |
  27. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  28. | :ref:`CameraServer<class_CameraServer>` | :ref:`CameraServer<class_@GlobalScope_property_CameraServer>` |
  29. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  30. | :ref:`ClassDB<class_ClassDB>` | :ref:`ClassDB<class_@GlobalScope_property_ClassDB>` |
  31. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  32. | :ref:`DisplayServer<class_DisplayServer>` | :ref:`DisplayServer<class_@GlobalScope_property_DisplayServer>` |
  33. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  34. | :ref:`Engine<class_Engine>` | :ref:`Engine<class_@GlobalScope_property_Engine>` |
  35. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  36. | :ref:`EngineDebugger<class_EngineDebugger>` | :ref:`EngineDebugger<class_@GlobalScope_property_EngineDebugger>` |
  37. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  38. | :ref:`GDExtensionManager<class_GDExtensionManager>` | :ref:`GDExtensionManager<class_@GlobalScope_property_GDExtensionManager>` |
  39. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  40. | :ref:`Geometry2D<class_Geometry2D>` | :ref:`Geometry2D<class_@GlobalScope_property_Geometry2D>` |
  41. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  42. | :ref:`Geometry3D<class_Geometry3D>` | :ref:`Geometry3D<class_@GlobalScope_property_Geometry3D>` |
  43. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  44. | :ref:`GodotSharp<class_GodotSharp>` | :ref:`GodotSharp<class_@GlobalScope_property_GodotSharp>` |
  45. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  46. | :ref:`IP<class_IP>` | :ref:`IP<class_@GlobalScope_property_IP>` |
  47. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  48. | :ref:`Input<class_Input>` | :ref:`Input<class_@GlobalScope_property_Input>` |
  49. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  50. | :ref:`InputMap<class_InputMap>` | :ref:`InputMap<class_@GlobalScope_property_InputMap>` |
  51. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  52. | :ref:`JavaClassWrapper<class_JavaClassWrapper>` | :ref:`JavaClassWrapper<class_@GlobalScope_property_JavaClassWrapper>` |
  53. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  54. | :ref:`JavaScriptBridge<class_JavaScriptBridge>` | :ref:`JavaScriptBridge<class_@GlobalScope_property_JavaScriptBridge>` |
  55. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  56. | :ref:`Marshalls<class_Marshalls>` | :ref:`Marshalls<class_@GlobalScope_property_Marshalls>` |
  57. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  58. | :ref:`NavigationMeshGenerator<class_NavigationMeshGenerator>` | :ref:`NavigationMeshGenerator<class_@GlobalScope_property_NavigationMeshGenerator>` |
  59. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  60. | :ref:`NavigationServer2D<class_NavigationServer2D>` | :ref:`NavigationServer2D<class_@GlobalScope_property_NavigationServer2D>` |
  61. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  62. | :ref:`NavigationServer3D<class_NavigationServer3D>` | :ref:`NavigationServer3D<class_@GlobalScope_property_NavigationServer3D>` |
  63. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  64. | :ref:`OS<class_OS>` | :ref:`OS<class_@GlobalScope_property_OS>` |
  65. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  66. | :ref:`Performance<class_Performance>` | :ref:`Performance<class_@GlobalScope_property_Performance>` |
  67. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  68. | :ref:`PhysicsServer2D<class_PhysicsServer2D>` | :ref:`PhysicsServer2D<class_@GlobalScope_property_PhysicsServer2D>` |
  69. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  70. | :ref:`PhysicsServer2DManager<class_PhysicsServer2DManager>` | :ref:`PhysicsServer2DManager<class_@GlobalScope_property_PhysicsServer2DManager>` |
  71. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  72. | :ref:`PhysicsServer3D<class_PhysicsServer3D>` | :ref:`PhysicsServer3D<class_@GlobalScope_property_PhysicsServer3D>` |
  73. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  74. | :ref:`PhysicsServer3DManager<class_PhysicsServer3DManager>` | :ref:`PhysicsServer3DManager<class_@GlobalScope_property_PhysicsServer3DManager>` |
  75. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  76. | :ref:`ProjectSettings<class_ProjectSettings>` | :ref:`ProjectSettings<class_@GlobalScope_property_ProjectSettings>` |
  77. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  78. | :ref:`RenderingServer<class_RenderingServer>` | :ref:`RenderingServer<class_@GlobalScope_property_RenderingServer>` |
  79. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  80. | :ref:`ResourceLoader<class_ResourceLoader>` | :ref:`ResourceLoader<class_@GlobalScope_property_ResourceLoader>` |
  81. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  82. | :ref:`ResourceSaver<class_ResourceSaver>` | :ref:`ResourceSaver<class_@GlobalScope_property_ResourceSaver>` |
  83. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  84. | :ref:`ResourceUID<class_ResourceUID>` | :ref:`ResourceUID<class_@GlobalScope_property_ResourceUID>` |
  85. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  86. | :ref:`TextServerManager<class_TextServerManager>` | :ref:`TextServerManager<class_@GlobalScope_property_TextServerManager>` |
  87. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  88. | :ref:`ThemeDB<class_ThemeDB>` | :ref:`ThemeDB<class_@GlobalScope_property_ThemeDB>` |
  89. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  90. | :ref:`Time<class_Time>` | :ref:`Time<class_@GlobalScope_property_Time>` |
  91. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  92. | :ref:`TranslationServer<class_TranslationServer>` | :ref:`TranslationServer<class_@GlobalScope_property_TranslationServer>` |
  93. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  94. | :ref:`WorkerThreadPool<class_WorkerThreadPool>` | :ref:`WorkerThreadPool<class_@GlobalScope_property_WorkerThreadPool>` |
  95. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  96. | :ref:`XRServer<class_XRServer>` | :ref:`XRServer<class_@GlobalScope_property_XRServer>` |
  97. +---------------------------------------------------------------+-------------------------------------------------------------------------------------+
  98. .. rst-class:: classref-reftable-group
  99. Methods
  100. -------
  101. .. table::
  102. :widths: auto
  103. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | :ref:`Variant<class_Variant>` | :ref:`abs<class_@GlobalScope_method_abs>` **(** :ref:`Variant<class_Variant>` x **)** |
  105. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | :ref:`float<class_float>` | :ref:`absf<class_@GlobalScope_method_absf>` **(** :ref:`float<class_float>` x **)** |
  107. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | :ref:`int<class_int>` | :ref:`absi<class_@GlobalScope_method_absi>` **(** :ref:`int<class_int>` x **)** |
  109. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | :ref:`float<class_float>` | :ref:`acos<class_@GlobalScope_method_acos>` **(** :ref:`float<class_float>` x **)** |
  111. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. | :ref:`float<class_float>` | :ref:`asin<class_@GlobalScope_method_asin>` **(** :ref:`float<class_float>` x **)** |
  113. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  114. | :ref:`float<class_float>` | :ref:`atan<class_@GlobalScope_method_atan>` **(** :ref:`float<class_float>` x **)** |
  115. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  116. | :ref:`float<class_float>` | :ref:`atan2<class_@GlobalScope_method_atan2>` **(** :ref:`float<class_float>` y, :ref:`float<class_float>` x **)** |
  117. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  118. | :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 **)** |
  119. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  120. | :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 **)** |
  121. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  122. | :ref:`Variant<class_Variant>` | :ref:`bytes_to_var<class_@GlobalScope_method_bytes_to_var>` **(** :ref:`PackedByteArray<class_PackedByteArray>` bytes **)** |
  123. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  124. | :ref:`Variant<class_Variant>` | :ref:`bytes_to_var_with_objects<class_@GlobalScope_method_bytes_to_var_with_objects>` **(** :ref:`PackedByteArray<class_PackedByteArray>` bytes **)** |
  125. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  126. | :ref:`Variant<class_Variant>` | :ref:`ceil<class_@GlobalScope_method_ceil>` **(** :ref:`Variant<class_Variant>` x **)** |
  127. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  128. | :ref:`float<class_float>` | :ref:`ceilf<class_@GlobalScope_method_ceilf>` **(** :ref:`float<class_float>` x **)** |
  129. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  130. | :ref:`int<class_int>` | :ref:`ceili<class_@GlobalScope_method_ceili>` **(** :ref:`float<class_float>` x **)** |
  131. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  132. | :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 **)** |
  133. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  134. | :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 **)** |
  135. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  136. | :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 **)** |
  137. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  138. | :ref:`float<class_float>` | :ref:`cos<class_@GlobalScope_method_cos>` **(** :ref:`float<class_float>` angle_rad **)** |
  139. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  140. | :ref:`float<class_float>` | :ref:`cosh<class_@GlobalScope_method_cosh>` **(** :ref:`float<class_float>` x **)** |
  141. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  142. | :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 **)** |
  143. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  144. | :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 **)** |
  145. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  146. | :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 **)** |
  147. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  148. | :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 **)** |
  149. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  150. | :ref:`float<class_float>` | :ref:`db_to_linear<class_@GlobalScope_method_db_to_linear>` **(** :ref:`float<class_float>` db **)** |
  151. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  152. | :ref:`float<class_float>` | :ref:`deg_to_rad<class_@GlobalScope_method_deg_to_rad>` **(** :ref:`float<class_float>` deg **)** |
  153. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  154. | :ref:`float<class_float>` | :ref:`ease<class_@GlobalScope_method_ease>` **(** :ref:`float<class_float>` x, :ref:`float<class_float>` curve **)** |
  155. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  156. | :ref:`String<class_String>` | :ref:`error_string<class_@GlobalScope_method_error_string>` **(** :ref:`int<class_int>` error **)** |
  157. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  158. | :ref:`float<class_float>` | :ref:`exp<class_@GlobalScope_method_exp>` **(** :ref:`float<class_float>` x **)** |
  159. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  160. | :ref:`Variant<class_Variant>` | :ref:`floor<class_@GlobalScope_method_floor>` **(** :ref:`Variant<class_Variant>` x **)** |
  161. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  162. | :ref:`float<class_float>` | :ref:`floorf<class_@GlobalScope_method_floorf>` **(** :ref:`float<class_float>` x **)** |
  163. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  164. | :ref:`int<class_int>` | :ref:`floori<class_@GlobalScope_method_floori>` **(** :ref:`float<class_float>` x **)** |
  165. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  166. | :ref:`float<class_float>` | :ref:`fmod<class_@GlobalScope_method_fmod>` **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)** |
  167. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  168. | :ref:`float<class_float>` | :ref:`fposmod<class_@GlobalScope_method_fposmod>` **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)** |
  169. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  170. | :ref:`int<class_int>` | :ref:`hash<class_@GlobalScope_method_hash>` **(** :ref:`Variant<class_Variant>` variable **)** |
  171. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  172. | :ref:`Object<class_Object>` | :ref:`instance_from_id<class_@GlobalScope_method_instance_from_id>` **(** :ref:`int<class_int>` instance_id **)** |
  173. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  174. | :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 **)** |
  175. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  176. | :ref:`bool<class_bool>` | :ref:`is_equal_approx<class_@GlobalScope_method_is_equal_approx>` **(** :ref:`float<class_float>` a, :ref:`float<class_float>` b **)** |
  177. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  178. | :ref:`bool<class_bool>` | :ref:`is_finite<class_@GlobalScope_method_is_finite>` **(** :ref:`float<class_float>` x **)** |
  179. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  180. | :ref:`bool<class_bool>` | :ref:`is_inf<class_@GlobalScope_method_is_inf>` **(** :ref:`float<class_float>` x **)** |
  181. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  182. | :ref:`bool<class_bool>` | :ref:`is_instance_id_valid<class_@GlobalScope_method_is_instance_id_valid>` **(** :ref:`int<class_int>` id **)** |
  183. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  184. | :ref:`bool<class_bool>` | :ref:`is_instance_valid<class_@GlobalScope_method_is_instance_valid>` **(** :ref:`Variant<class_Variant>` instance **)** |
  185. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  186. | :ref:`bool<class_bool>` | :ref:`is_nan<class_@GlobalScope_method_is_nan>` **(** :ref:`float<class_float>` x **)** |
  187. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  188. | :ref:`bool<class_bool>` | :ref:`is_same<class_@GlobalScope_method_is_same>` **(** :ref:`Variant<class_Variant>` a, :ref:`Variant<class_Variant>` b **)** |
  189. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  190. | :ref:`bool<class_bool>` | :ref:`is_zero_approx<class_@GlobalScope_method_is_zero_approx>` **(** :ref:`float<class_float>` x **)** |
  191. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  192. | :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 **)** |
  193. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  194. | :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 **)** |
  195. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  196. | :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 **)** |
  197. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  198. | :ref:`float<class_float>` | :ref:`linear_to_db<class_@GlobalScope_method_linear_to_db>` **(** :ref:`float<class_float>` lin **)** |
  199. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  200. | :ref:`float<class_float>` | :ref:`log<class_@GlobalScope_method_log>` **(** :ref:`float<class_float>` x **)** |
  201. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  202. | :ref:`Variant<class_Variant>` | :ref:`max<class_@GlobalScope_method_max>` **(** ... **)** |vararg| |
  203. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  204. | :ref:`float<class_float>` | :ref:`maxf<class_@GlobalScope_method_maxf>` **(** :ref:`float<class_float>` a, :ref:`float<class_float>` b **)** |
  205. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  206. | :ref:`int<class_int>` | :ref:`maxi<class_@GlobalScope_method_maxi>` **(** :ref:`int<class_int>` a, :ref:`int<class_int>` b **)** |
  207. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  208. | :ref:`Variant<class_Variant>` | :ref:`min<class_@GlobalScope_method_min>` **(** ... **)** |vararg| |
  209. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  210. | :ref:`float<class_float>` | :ref:`minf<class_@GlobalScope_method_minf>` **(** :ref:`float<class_float>` a, :ref:`float<class_float>` b **)** |
  211. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  212. | :ref:`int<class_int>` | :ref:`mini<class_@GlobalScope_method_mini>` **(** :ref:`int<class_int>` a, :ref:`int<class_int>` b **)** |
  213. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  214. | :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 **)** |
  215. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  216. | :ref:`int<class_int>` | :ref:`nearest_po2<class_@GlobalScope_method_nearest_po2>` **(** :ref:`int<class_int>` value **)** |
  217. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  218. | :ref:`float<class_float>` | :ref:`pingpong<class_@GlobalScope_method_pingpong>` **(** :ref:`float<class_float>` value, :ref:`float<class_float>` length **)** |
  219. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  220. | :ref:`int<class_int>` | :ref:`posmod<class_@GlobalScope_method_posmod>` **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y **)** |
  221. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  222. | :ref:`float<class_float>` | :ref:`pow<class_@GlobalScope_method_pow>` **(** :ref:`float<class_float>` base, :ref:`float<class_float>` exp **)** |
  223. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  224. | void | :ref:`print<class_@GlobalScope_method_print>` **(** ... **)** |vararg| |
  225. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  226. | void | :ref:`print_rich<class_@GlobalScope_method_print_rich>` **(** ... **)** |vararg| |
  227. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  228. | void | :ref:`print_verbose<class_@GlobalScope_method_print_verbose>` **(** ... **)** |vararg| |
  229. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  230. | void | :ref:`printerr<class_@GlobalScope_method_printerr>` **(** ... **)** |vararg| |
  231. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  232. | void | :ref:`printraw<class_@GlobalScope_method_printraw>` **(** ... **)** |vararg| |
  233. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  234. | void | :ref:`prints<class_@GlobalScope_method_prints>` **(** ... **)** |vararg| |
  235. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  236. | void | :ref:`printt<class_@GlobalScope_method_printt>` **(** ... **)** |vararg| |
  237. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  238. | void | :ref:`push_error<class_@GlobalScope_method_push_error>` **(** ... **)** |vararg| |
  239. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  240. | void | :ref:`push_warning<class_@GlobalScope_method_push_warning>` **(** ... **)** |vararg| |
  241. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  242. | :ref:`float<class_float>` | :ref:`rad_to_deg<class_@GlobalScope_method_rad_to_deg>` **(** :ref:`float<class_float>` rad **)** |
  243. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  244. | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`rand_from_seed<class_@GlobalScope_method_rand_from_seed>` **(** :ref:`int<class_int>` seed **)** |
  245. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  246. | :ref:`float<class_float>` | :ref:`randf<class_@GlobalScope_method_randf>` **(** **)** |
  247. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  248. | :ref:`float<class_float>` | :ref:`randf_range<class_@GlobalScope_method_randf_range>` **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to **)** |
  249. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  250. | :ref:`float<class_float>` | :ref:`randfn<class_@GlobalScope_method_randfn>` **(** :ref:`float<class_float>` mean, :ref:`float<class_float>` deviation **)** |
  251. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  252. | :ref:`int<class_int>` | :ref:`randi<class_@GlobalScope_method_randi>` **(** **)** |
  253. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  254. | :ref:`int<class_int>` | :ref:`randi_range<class_@GlobalScope_method_randi_range>` **(** :ref:`int<class_int>` from, :ref:`int<class_int>` to **)** |
  255. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  256. | void | :ref:`randomize<class_@GlobalScope_method_randomize>` **(** **)** |
  257. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  258. | :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 **)** |
  259. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  260. | :ref:`int<class_int>` | :ref:`rid_allocate_id<class_@GlobalScope_method_rid_allocate_id>` **(** **)** |
  261. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  262. | :ref:`RID<class_RID>` | :ref:`rid_from_int64<class_@GlobalScope_method_rid_from_int64>` **(** :ref:`int<class_int>` base **)** |
  263. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  264. | :ref:`Variant<class_Variant>` | :ref:`round<class_@GlobalScope_method_round>` **(** :ref:`Variant<class_Variant>` x **)** |
  265. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  266. | :ref:`float<class_float>` | :ref:`roundf<class_@GlobalScope_method_roundf>` **(** :ref:`float<class_float>` x **)** |
  267. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  268. | :ref:`int<class_int>` | :ref:`roundi<class_@GlobalScope_method_roundi>` **(** :ref:`float<class_float>` x **)** |
  269. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  270. | void | :ref:`seed<class_@GlobalScope_method_seed>` **(** :ref:`int<class_int>` base **)** |
  271. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  272. | :ref:`Variant<class_Variant>` | :ref:`sign<class_@GlobalScope_method_sign>` **(** :ref:`Variant<class_Variant>` x **)** |
  273. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  274. | :ref:`float<class_float>` | :ref:`signf<class_@GlobalScope_method_signf>` **(** :ref:`float<class_float>` x **)** |
  275. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  276. | :ref:`int<class_int>` | :ref:`signi<class_@GlobalScope_method_signi>` **(** :ref:`int<class_int>` x **)** |
  277. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  278. | :ref:`float<class_float>` | :ref:`sin<class_@GlobalScope_method_sin>` **(** :ref:`float<class_float>` angle_rad **)** |
  279. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  280. | :ref:`float<class_float>` | :ref:`sinh<class_@GlobalScope_method_sinh>` **(** :ref:`float<class_float>` x **)** |
  281. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  282. | :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 **)** |
  283. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  284. | :ref:`Variant<class_Variant>` | :ref:`snapped<class_@GlobalScope_method_snapped>` **(** :ref:`Variant<class_Variant>` x, :ref:`Variant<class_Variant>` step **)** |
  285. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  286. | :ref:`float<class_float>` | :ref:`snappedf<class_@GlobalScope_method_snappedf>` **(** :ref:`float<class_float>` x, :ref:`float<class_float>` step **)** |
  287. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  288. | :ref:`int<class_int>` | :ref:`snappedi<class_@GlobalScope_method_snappedi>` **(** :ref:`float<class_float>` x, :ref:`int<class_int>` step **)** |
  289. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  290. | :ref:`float<class_float>` | :ref:`sqrt<class_@GlobalScope_method_sqrt>` **(** :ref:`float<class_float>` x **)** |
  291. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  292. | :ref:`int<class_int>` | :ref:`step_decimals<class_@GlobalScope_method_step_decimals>` **(** :ref:`float<class_float>` x **)** |
  293. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  294. | :ref:`String<class_String>` | :ref:`str<class_@GlobalScope_method_str>` **(** ... **)** |vararg| |
  295. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  296. | :ref:`Variant<class_Variant>` | :ref:`str_to_var<class_@GlobalScope_method_str_to_var>` **(** :ref:`String<class_String>` string **)** |
  297. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  298. | :ref:`float<class_float>` | :ref:`tan<class_@GlobalScope_method_tan>` **(** :ref:`float<class_float>` angle_rad **)** |
  299. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  300. | :ref:`float<class_float>` | :ref:`tanh<class_@GlobalScope_method_tanh>` **(** :ref:`float<class_float>` x **)** |
  301. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  302. | :ref:`int<class_int>` | :ref:`typeof<class_@GlobalScope_method_typeof>` **(** :ref:`Variant<class_Variant>` variable **)** |
  303. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  304. | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`var_to_bytes<class_@GlobalScope_method_var_to_bytes>` **(** :ref:`Variant<class_Variant>` variable **)** |
  305. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  306. | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`var_to_bytes_with_objects<class_@GlobalScope_method_var_to_bytes_with_objects>` **(** :ref:`Variant<class_Variant>` variable **)** |
  307. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  308. | :ref:`String<class_String>` | :ref:`var_to_str<class_@GlobalScope_method_var_to_str>` **(** :ref:`Variant<class_Variant>` variable **)** |
  309. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  310. | :ref:`Variant<class_Variant>` | :ref:`weakref<class_@GlobalScope_method_weakref>` **(** :ref:`Variant<class_Variant>` obj **)** |
  311. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  312. | :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 **)** |
  313. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  314. | :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 **)** |
  315. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  316. | :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 **)** |
  317. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  318. .. rst-class:: classref-section-separator
  319. ----
  320. .. rst-class:: classref-descriptions-group
  321. Enumerations
  322. ------------
  323. .. _enum_@GlobalScope_Side:
  324. .. rst-class:: classref-enumeration
  325. enum **Side**:
  326. .. _class_@GlobalScope_constant_SIDE_LEFT:
  327. .. rst-class:: classref-enumeration-constant
  328. :ref:`Side<enum_@GlobalScope_Side>` **SIDE_LEFT** = ``0``
  329. Left side, usually used for :ref:`Control<class_Control>` or :ref:`StyleBox<class_StyleBox>`-derived classes.
  330. .. _class_@GlobalScope_constant_SIDE_TOP:
  331. .. rst-class:: classref-enumeration-constant
  332. :ref:`Side<enum_@GlobalScope_Side>` **SIDE_TOP** = ``1``
  333. Top side, usually used for :ref:`Control<class_Control>` or :ref:`StyleBox<class_StyleBox>`-derived classes.
  334. .. _class_@GlobalScope_constant_SIDE_RIGHT:
  335. .. rst-class:: classref-enumeration-constant
  336. :ref:`Side<enum_@GlobalScope_Side>` **SIDE_RIGHT** = ``2``
  337. Right side, usually used for :ref:`Control<class_Control>` or :ref:`StyleBox<class_StyleBox>`-derived classes.
  338. .. _class_@GlobalScope_constant_SIDE_BOTTOM:
  339. .. rst-class:: classref-enumeration-constant
  340. :ref:`Side<enum_@GlobalScope_Side>` **SIDE_BOTTOM** = ``3``
  341. Bottom side, usually used for :ref:`Control<class_Control>` or :ref:`StyleBox<class_StyleBox>`-derived classes.
  342. .. rst-class:: classref-item-separator
  343. ----
  344. .. _enum_@GlobalScope_Corner:
  345. .. rst-class:: classref-enumeration
  346. enum **Corner**:
  347. .. _class_@GlobalScope_constant_CORNER_TOP_LEFT:
  348. .. rst-class:: classref-enumeration-constant
  349. :ref:`Corner<enum_@GlobalScope_Corner>` **CORNER_TOP_LEFT** = ``0``
  350. Top-left corner.
  351. .. _class_@GlobalScope_constant_CORNER_TOP_RIGHT:
  352. .. rst-class:: classref-enumeration-constant
  353. :ref:`Corner<enum_@GlobalScope_Corner>` **CORNER_TOP_RIGHT** = ``1``
  354. Top-right corner.
  355. .. _class_@GlobalScope_constant_CORNER_BOTTOM_RIGHT:
  356. .. rst-class:: classref-enumeration-constant
  357. :ref:`Corner<enum_@GlobalScope_Corner>` **CORNER_BOTTOM_RIGHT** = ``2``
  358. Bottom-right corner.
  359. .. _class_@GlobalScope_constant_CORNER_BOTTOM_LEFT:
  360. .. rst-class:: classref-enumeration-constant
  361. :ref:`Corner<enum_@GlobalScope_Corner>` **CORNER_BOTTOM_LEFT** = ``3``
  362. Bottom-left corner.
  363. .. rst-class:: classref-item-separator
  364. ----
  365. .. _enum_@GlobalScope_Orientation:
  366. .. rst-class:: classref-enumeration
  367. enum **Orientation**:
  368. .. _class_@GlobalScope_constant_VERTICAL:
  369. .. rst-class:: classref-enumeration-constant
  370. :ref:`Orientation<enum_@GlobalScope_Orientation>` **VERTICAL** = ``1``
  371. General vertical alignment, usually used for :ref:`Separator<class_Separator>`, :ref:`ScrollBar<class_ScrollBar>`, :ref:`Slider<class_Slider>`, etc.
  372. .. _class_@GlobalScope_constant_HORIZONTAL:
  373. .. rst-class:: classref-enumeration-constant
  374. :ref:`Orientation<enum_@GlobalScope_Orientation>` **HORIZONTAL** = ``0``
  375. General horizontal alignment, usually used for :ref:`Separator<class_Separator>`, :ref:`ScrollBar<class_ScrollBar>`, :ref:`Slider<class_Slider>`, etc.
  376. .. rst-class:: classref-item-separator
  377. ----
  378. .. _enum_@GlobalScope_ClockDirection:
  379. .. rst-class:: classref-enumeration
  380. enum **ClockDirection**:
  381. .. _class_@GlobalScope_constant_CLOCKWISE:
  382. .. rst-class:: classref-enumeration-constant
  383. :ref:`ClockDirection<enum_@GlobalScope_ClockDirection>` **CLOCKWISE** = ``0``
  384. Clockwise rotation. Used by some methods (e.g. :ref:`Image.rotate_90<class_Image_method_rotate_90>`).
  385. .. _class_@GlobalScope_constant_COUNTERCLOCKWISE:
  386. .. rst-class:: classref-enumeration-constant
  387. :ref:`ClockDirection<enum_@GlobalScope_ClockDirection>` **COUNTERCLOCKWISE** = ``1``
  388. Counter-clockwise rotation. Used by some methods (e.g. :ref:`Image.rotate_90<class_Image_method_rotate_90>`).
  389. .. rst-class:: classref-item-separator
  390. ----
  391. .. _enum_@GlobalScope_HorizontalAlignment:
  392. .. rst-class:: classref-enumeration
  393. enum **HorizontalAlignment**:
  394. .. _class_@GlobalScope_constant_HORIZONTAL_ALIGNMENT_LEFT:
  395. .. rst-class:: classref-enumeration-constant
  396. :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **HORIZONTAL_ALIGNMENT_LEFT** = ``0``
  397. Horizontal left alignment, usually for text-derived classes.
  398. .. _class_@GlobalScope_constant_HORIZONTAL_ALIGNMENT_CENTER:
  399. .. rst-class:: classref-enumeration-constant
  400. :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **HORIZONTAL_ALIGNMENT_CENTER** = ``1``
  401. Horizontal center alignment, usually for text-derived classes.
  402. .. _class_@GlobalScope_constant_HORIZONTAL_ALIGNMENT_RIGHT:
  403. .. rst-class:: classref-enumeration-constant
  404. :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **HORIZONTAL_ALIGNMENT_RIGHT** = ``2``
  405. Horizontal right alignment, usually for text-derived classes.
  406. .. _class_@GlobalScope_constant_HORIZONTAL_ALIGNMENT_FILL:
  407. .. rst-class:: classref-enumeration-constant
  408. :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **HORIZONTAL_ALIGNMENT_FILL** = ``3``
  409. Expand row to fit width, usually for text-derived classes.
  410. .. rst-class:: classref-item-separator
  411. ----
  412. .. _enum_@GlobalScope_VerticalAlignment:
  413. .. rst-class:: classref-enumeration
  414. enum **VerticalAlignment**:
  415. .. _class_@GlobalScope_constant_VERTICAL_ALIGNMENT_TOP:
  416. .. rst-class:: classref-enumeration-constant
  417. :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` **VERTICAL_ALIGNMENT_TOP** = ``0``
  418. Vertical top alignment, usually for text-derived classes.
  419. .. _class_@GlobalScope_constant_VERTICAL_ALIGNMENT_CENTER:
  420. .. rst-class:: classref-enumeration-constant
  421. :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` **VERTICAL_ALIGNMENT_CENTER** = ``1``
  422. Vertical center alignment, usually for text-derived classes.
  423. .. _class_@GlobalScope_constant_VERTICAL_ALIGNMENT_BOTTOM:
  424. .. rst-class:: classref-enumeration-constant
  425. :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` **VERTICAL_ALIGNMENT_BOTTOM** = ``2``
  426. Vertical bottom alignment, usually for text-derived classes.
  427. .. _class_@GlobalScope_constant_VERTICAL_ALIGNMENT_FILL:
  428. .. rst-class:: classref-enumeration-constant
  429. :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` **VERTICAL_ALIGNMENT_FILL** = ``3``
  430. Expand rows to fit height, usually for text-derived classes.
  431. .. rst-class:: classref-item-separator
  432. ----
  433. .. _enum_@GlobalScope_InlineAlignment:
  434. .. rst-class:: classref-enumeration
  435. enum **InlineAlignment**:
  436. .. _class_@GlobalScope_constant_INLINE_ALIGNMENT_TOP_TO:
  437. .. rst-class:: classref-enumeration-constant
  438. :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` **INLINE_ALIGNMENT_TOP_TO** = ``0``
  439. Aligns the top of the inline object (e.g. image, table) to the position of the text specified by ``INLINE_ALIGNMENT_TO_*`` constant.
  440. .. _class_@GlobalScope_constant_INLINE_ALIGNMENT_CENTER_TO:
  441. .. rst-class:: classref-enumeration-constant
  442. :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` **INLINE_ALIGNMENT_CENTER_TO** = ``1``
  443. Aligns the center 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_BASELINE_TO:
  445. .. rst-class:: classref-enumeration-constant
  446. :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` **INLINE_ALIGNMENT_BASELINE_TO** = ``3``
  447. 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.
  448. .. _class_@GlobalScope_constant_INLINE_ALIGNMENT_BOTTOM_TO:
  449. .. rst-class:: classref-enumeration-constant
  450. :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` **INLINE_ALIGNMENT_BOTTOM_TO** = ``2``
  451. Aligns the bottom 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_TO_TOP:
  453. .. rst-class:: classref-enumeration-constant
  454. :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` **INLINE_ALIGNMENT_TO_TOP** = ``0``
  455. Aligns the position of the inline object (e.g. image, table) specified by ``INLINE_ALIGNMENT_*_TO`` constant to the top of the text.
  456. .. _class_@GlobalScope_constant_INLINE_ALIGNMENT_TO_CENTER:
  457. .. rst-class:: classref-enumeration-constant
  458. :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` **INLINE_ALIGNMENT_TO_CENTER** = ``4``
  459. Aligns the position of the inline object (e.g. image, table) specified by ``INLINE_ALIGNMENT_*_TO`` constant to the center of the text.
  460. .. _class_@GlobalScope_constant_INLINE_ALIGNMENT_TO_BASELINE:
  461. .. rst-class:: classref-enumeration-constant
  462. :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` **INLINE_ALIGNMENT_TO_BASELINE** = ``8``
  463. Aligns the position of the inline object (e.g. image, table) specified by ``INLINE_ALIGNMENT_*_TO`` constant to the baseline of the text.
  464. .. _class_@GlobalScope_constant_INLINE_ALIGNMENT_TO_BOTTOM:
  465. .. rst-class:: classref-enumeration-constant
  466. :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` **INLINE_ALIGNMENT_TO_BOTTOM** = ``12``
  467. Aligns inline object (e.g. image, table) to the bottom of the text.
  468. .. _class_@GlobalScope_constant_INLINE_ALIGNMENT_TOP:
  469. .. rst-class:: classref-enumeration-constant
  470. :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` **INLINE_ALIGNMENT_TOP** = ``0``
  471. 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``.
  472. .. _class_@GlobalScope_constant_INLINE_ALIGNMENT_CENTER:
  473. .. rst-class:: classref-enumeration-constant
  474. :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` **INLINE_ALIGNMENT_CENTER** = ``5``
  475. 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``.
  476. .. _class_@GlobalScope_constant_INLINE_ALIGNMENT_BOTTOM:
  477. .. rst-class:: classref-enumeration-constant
  478. :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` **INLINE_ALIGNMENT_BOTTOM** = ``14``
  479. 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``.
  480. .. _class_@GlobalScope_constant_INLINE_ALIGNMENT_IMAGE_MASK:
  481. .. rst-class:: classref-enumeration-constant
  482. :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` **INLINE_ALIGNMENT_IMAGE_MASK** = ``3``
  483. A bit mask for ``INLINE_ALIGNMENT_*_TO`` alignment constants.
  484. .. _class_@GlobalScope_constant_INLINE_ALIGNMENT_TEXT_MASK:
  485. .. rst-class:: classref-enumeration-constant
  486. :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` **INLINE_ALIGNMENT_TEXT_MASK** = ``12``
  487. A bit mask for ``INLINE_ALIGNMENT_TO_*`` alignment constants.
  488. .. rst-class:: classref-item-separator
  489. ----
  490. .. _enum_@GlobalScope_EulerOrder:
  491. .. rst-class:: classref-enumeration
  492. enum **EulerOrder**:
  493. .. _class_@GlobalScope_constant_EULER_ORDER_XYZ:
  494. .. rst-class:: classref-enumeration-constant
  495. :ref:`EulerOrder<enum_@GlobalScope_EulerOrder>` **EULER_ORDER_XYZ** = ``0``
  496. 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.
  497. .. _class_@GlobalScope_constant_EULER_ORDER_XZY:
  498. .. rst-class:: classref-enumeration-constant
  499. :ref:`EulerOrder<enum_@GlobalScope_EulerOrder>` **EULER_ORDER_XZY** = ``1``
  500. 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.
  501. .. _class_@GlobalScope_constant_EULER_ORDER_YXZ:
  502. .. rst-class:: classref-enumeration-constant
  503. :ref:`EulerOrder<enum_@GlobalScope_EulerOrder>` **EULER_ORDER_YXZ** = ``2``
  504. 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.
  505. .. _class_@GlobalScope_constant_EULER_ORDER_YZX:
  506. .. rst-class:: classref-enumeration-constant
  507. :ref:`EulerOrder<enum_@GlobalScope_EulerOrder>` **EULER_ORDER_YZX** = ``3``
  508. 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.
  509. .. _class_@GlobalScope_constant_EULER_ORDER_ZXY:
  510. .. rst-class:: classref-enumeration-constant
  511. :ref:`EulerOrder<enum_@GlobalScope_EulerOrder>` **EULER_ORDER_ZXY** = ``4``
  512. 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.
  513. .. _class_@GlobalScope_constant_EULER_ORDER_ZYX:
  514. .. rst-class:: classref-enumeration-constant
  515. :ref:`EulerOrder<enum_@GlobalScope_EulerOrder>` **EULER_ORDER_ZYX** = ``5``
  516. 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.
  517. .. rst-class:: classref-item-separator
  518. ----
  519. .. _enum_@GlobalScope_Key:
  520. .. rst-class:: classref-enumeration
  521. enum **Key**:
  522. .. _class_@GlobalScope_constant_KEY_NONE:
  523. .. rst-class:: classref-enumeration-constant
  524. :ref:`Key<enum_@GlobalScope_Key>` **KEY_NONE** = ``0``
  525. Enum value which doesn't correspond to any key. This is used to initialize :ref:`Key<enum_@GlobalScope_Key>` properties with a generic state.
  526. .. _class_@GlobalScope_constant_KEY_SPECIAL:
  527. .. rst-class:: classref-enumeration-constant
  528. :ref:`Key<enum_@GlobalScope_Key>` **KEY_SPECIAL** = ``4194304``
  529. Keycodes with this bit applied are non-printable.
  530. .. _class_@GlobalScope_constant_KEY_ESCAPE:
  531. .. rst-class:: classref-enumeration-constant
  532. :ref:`Key<enum_@GlobalScope_Key>` **KEY_ESCAPE** = ``4194305``
  533. Escape key.
  534. .. _class_@GlobalScope_constant_KEY_TAB:
  535. .. rst-class:: classref-enumeration-constant
  536. :ref:`Key<enum_@GlobalScope_Key>` **KEY_TAB** = ``4194306``
  537. Tab key.
  538. .. _class_@GlobalScope_constant_KEY_BACKTAB:
  539. .. rst-class:: classref-enumeration-constant
  540. :ref:`Key<enum_@GlobalScope_Key>` **KEY_BACKTAB** = ``4194307``
  541. Shift + Tab key.
  542. .. _class_@GlobalScope_constant_KEY_BACKSPACE:
  543. .. rst-class:: classref-enumeration-constant
  544. :ref:`Key<enum_@GlobalScope_Key>` **KEY_BACKSPACE** = ``4194308``
  545. Backspace key.
  546. .. _class_@GlobalScope_constant_KEY_ENTER:
  547. .. rst-class:: classref-enumeration-constant
  548. :ref:`Key<enum_@GlobalScope_Key>` **KEY_ENTER** = ``4194309``
  549. Return key (on the main keyboard).
  550. .. _class_@GlobalScope_constant_KEY_KP_ENTER:
  551. .. rst-class:: classref-enumeration-constant
  552. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_ENTER** = ``4194310``
  553. Enter key on the numeric keypad.
  554. .. _class_@GlobalScope_constant_KEY_INSERT:
  555. .. rst-class:: classref-enumeration-constant
  556. :ref:`Key<enum_@GlobalScope_Key>` **KEY_INSERT** = ``4194311``
  557. Insert key.
  558. .. _class_@GlobalScope_constant_KEY_DELETE:
  559. .. rst-class:: classref-enumeration-constant
  560. :ref:`Key<enum_@GlobalScope_Key>` **KEY_DELETE** = ``4194312``
  561. Delete key.
  562. .. _class_@GlobalScope_constant_KEY_PAUSE:
  563. .. rst-class:: classref-enumeration-constant
  564. :ref:`Key<enum_@GlobalScope_Key>` **KEY_PAUSE** = ``4194313``
  565. Pause key.
  566. .. _class_@GlobalScope_constant_KEY_PRINT:
  567. .. rst-class:: classref-enumeration-constant
  568. :ref:`Key<enum_@GlobalScope_Key>` **KEY_PRINT** = ``4194314``
  569. Print Screen key.
  570. .. _class_@GlobalScope_constant_KEY_SYSREQ:
  571. .. rst-class:: classref-enumeration-constant
  572. :ref:`Key<enum_@GlobalScope_Key>` **KEY_SYSREQ** = ``4194315``
  573. System Request key.
  574. .. _class_@GlobalScope_constant_KEY_CLEAR:
  575. .. rst-class:: classref-enumeration-constant
  576. :ref:`Key<enum_@GlobalScope_Key>` **KEY_CLEAR** = ``4194316``
  577. Clear key.
  578. .. _class_@GlobalScope_constant_KEY_HOME:
  579. .. rst-class:: classref-enumeration-constant
  580. :ref:`Key<enum_@GlobalScope_Key>` **KEY_HOME** = ``4194317``
  581. Home key.
  582. .. _class_@GlobalScope_constant_KEY_END:
  583. .. rst-class:: classref-enumeration-constant
  584. :ref:`Key<enum_@GlobalScope_Key>` **KEY_END** = ``4194318``
  585. End key.
  586. .. _class_@GlobalScope_constant_KEY_LEFT:
  587. .. rst-class:: classref-enumeration-constant
  588. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LEFT** = ``4194319``
  589. Left arrow key.
  590. .. _class_@GlobalScope_constant_KEY_UP:
  591. .. rst-class:: classref-enumeration-constant
  592. :ref:`Key<enum_@GlobalScope_Key>` **KEY_UP** = ``4194320``
  593. Up arrow key.
  594. .. _class_@GlobalScope_constant_KEY_RIGHT:
  595. .. rst-class:: classref-enumeration-constant
  596. :ref:`Key<enum_@GlobalScope_Key>` **KEY_RIGHT** = ``4194321``
  597. Right arrow key.
  598. .. _class_@GlobalScope_constant_KEY_DOWN:
  599. .. rst-class:: classref-enumeration-constant
  600. :ref:`Key<enum_@GlobalScope_Key>` **KEY_DOWN** = ``4194322``
  601. Down arrow key.
  602. .. _class_@GlobalScope_constant_KEY_PAGEUP:
  603. .. rst-class:: classref-enumeration-constant
  604. :ref:`Key<enum_@GlobalScope_Key>` **KEY_PAGEUP** = ``4194323``
  605. Page Up key.
  606. .. _class_@GlobalScope_constant_KEY_PAGEDOWN:
  607. .. rst-class:: classref-enumeration-constant
  608. :ref:`Key<enum_@GlobalScope_Key>` **KEY_PAGEDOWN** = ``4194324``
  609. Page Down key.
  610. .. _class_@GlobalScope_constant_KEY_SHIFT:
  611. .. rst-class:: classref-enumeration-constant
  612. :ref:`Key<enum_@GlobalScope_Key>` **KEY_SHIFT** = ``4194325``
  613. Shift key.
  614. .. _class_@GlobalScope_constant_KEY_CTRL:
  615. .. rst-class:: classref-enumeration-constant
  616. :ref:`Key<enum_@GlobalScope_Key>` **KEY_CTRL** = ``4194326``
  617. Control key.
  618. .. _class_@GlobalScope_constant_KEY_META:
  619. .. rst-class:: classref-enumeration-constant
  620. :ref:`Key<enum_@GlobalScope_Key>` **KEY_META** = ``4194327``
  621. Meta key.
  622. .. _class_@GlobalScope_constant_KEY_ALT:
  623. .. rst-class:: classref-enumeration-constant
  624. :ref:`Key<enum_@GlobalScope_Key>` **KEY_ALT** = ``4194328``
  625. Alt key.
  626. .. _class_@GlobalScope_constant_KEY_CAPSLOCK:
  627. .. rst-class:: classref-enumeration-constant
  628. :ref:`Key<enum_@GlobalScope_Key>` **KEY_CAPSLOCK** = ``4194329``
  629. Caps Lock key.
  630. .. _class_@GlobalScope_constant_KEY_NUMLOCK:
  631. .. rst-class:: classref-enumeration-constant
  632. :ref:`Key<enum_@GlobalScope_Key>` **KEY_NUMLOCK** = ``4194330``
  633. Num Lock key.
  634. .. _class_@GlobalScope_constant_KEY_SCROLLLOCK:
  635. .. rst-class:: classref-enumeration-constant
  636. :ref:`Key<enum_@GlobalScope_Key>` **KEY_SCROLLLOCK** = ``4194331``
  637. Scroll Lock key.
  638. .. _class_@GlobalScope_constant_KEY_F1:
  639. .. rst-class:: classref-enumeration-constant
  640. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F1** = ``4194332``
  641. F1 key.
  642. .. _class_@GlobalScope_constant_KEY_F2:
  643. .. rst-class:: classref-enumeration-constant
  644. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F2** = ``4194333``
  645. F2 key.
  646. .. _class_@GlobalScope_constant_KEY_F3:
  647. .. rst-class:: classref-enumeration-constant
  648. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F3** = ``4194334``
  649. F3 key.
  650. .. _class_@GlobalScope_constant_KEY_F4:
  651. .. rst-class:: classref-enumeration-constant
  652. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F4** = ``4194335``
  653. F4 key.
  654. .. _class_@GlobalScope_constant_KEY_F5:
  655. .. rst-class:: classref-enumeration-constant
  656. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F5** = ``4194336``
  657. F5 key.
  658. .. _class_@GlobalScope_constant_KEY_F6:
  659. .. rst-class:: classref-enumeration-constant
  660. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F6** = ``4194337``
  661. F6 key.
  662. .. _class_@GlobalScope_constant_KEY_F7:
  663. .. rst-class:: classref-enumeration-constant
  664. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F7** = ``4194338``
  665. F7 key.
  666. .. _class_@GlobalScope_constant_KEY_F8:
  667. .. rst-class:: classref-enumeration-constant
  668. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F8** = ``4194339``
  669. F8 key.
  670. .. _class_@GlobalScope_constant_KEY_F9:
  671. .. rst-class:: classref-enumeration-constant
  672. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F9** = ``4194340``
  673. F9 key.
  674. .. _class_@GlobalScope_constant_KEY_F10:
  675. .. rst-class:: classref-enumeration-constant
  676. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F10** = ``4194341``
  677. F10 key.
  678. .. _class_@GlobalScope_constant_KEY_F11:
  679. .. rst-class:: classref-enumeration-constant
  680. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F11** = ``4194342``
  681. F11 key.
  682. .. _class_@GlobalScope_constant_KEY_F12:
  683. .. rst-class:: classref-enumeration-constant
  684. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F12** = ``4194343``
  685. F12 key.
  686. .. _class_@GlobalScope_constant_KEY_F13:
  687. .. rst-class:: classref-enumeration-constant
  688. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F13** = ``4194344``
  689. F13 key.
  690. .. _class_@GlobalScope_constant_KEY_F14:
  691. .. rst-class:: classref-enumeration-constant
  692. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F14** = ``4194345``
  693. F14 key.
  694. .. _class_@GlobalScope_constant_KEY_F15:
  695. .. rst-class:: classref-enumeration-constant
  696. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F15** = ``4194346``
  697. F15 key.
  698. .. _class_@GlobalScope_constant_KEY_F16:
  699. .. rst-class:: classref-enumeration-constant
  700. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F16** = ``4194347``
  701. F16 key.
  702. .. _class_@GlobalScope_constant_KEY_F17:
  703. .. rst-class:: classref-enumeration-constant
  704. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F17** = ``4194348``
  705. F17 key.
  706. .. _class_@GlobalScope_constant_KEY_F18:
  707. .. rst-class:: classref-enumeration-constant
  708. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F18** = ``4194349``
  709. F18 key.
  710. .. _class_@GlobalScope_constant_KEY_F19:
  711. .. rst-class:: classref-enumeration-constant
  712. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F19** = ``4194350``
  713. F19 key.
  714. .. _class_@GlobalScope_constant_KEY_F20:
  715. .. rst-class:: classref-enumeration-constant
  716. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F20** = ``4194351``
  717. F20 key.
  718. .. _class_@GlobalScope_constant_KEY_F21:
  719. .. rst-class:: classref-enumeration-constant
  720. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F21** = ``4194352``
  721. F21 key.
  722. .. _class_@GlobalScope_constant_KEY_F22:
  723. .. rst-class:: classref-enumeration-constant
  724. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F22** = ``4194353``
  725. F22 key.
  726. .. _class_@GlobalScope_constant_KEY_F23:
  727. .. rst-class:: classref-enumeration-constant
  728. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F23** = ``4194354``
  729. F23 key.
  730. .. _class_@GlobalScope_constant_KEY_F24:
  731. .. rst-class:: classref-enumeration-constant
  732. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F24** = ``4194355``
  733. F24 key.
  734. .. _class_@GlobalScope_constant_KEY_F25:
  735. .. rst-class:: classref-enumeration-constant
  736. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F25** = ``4194356``
  737. F25 key. Only supported on macOS and Linux due to a Windows limitation.
  738. .. _class_@GlobalScope_constant_KEY_F26:
  739. .. rst-class:: classref-enumeration-constant
  740. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F26** = ``4194357``
  741. F26 key. Only supported on macOS and Linux due to a Windows limitation.
  742. .. _class_@GlobalScope_constant_KEY_F27:
  743. .. rst-class:: classref-enumeration-constant
  744. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F27** = ``4194358``
  745. F27 key. Only supported on macOS and Linux due to a Windows limitation.
  746. .. _class_@GlobalScope_constant_KEY_F28:
  747. .. rst-class:: classref-enumeration-constant
  748. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F28** = ``4194359``
  749. F28 key. Only supported on macOS and Linux due to a Windows limitation.
  750. .. _class_@GlobalScope_constant_KEY_F29:
  751. .. rst-class:: classref-enumeration-constant
  752. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F29** = ``4194360``
  753. F29 key. Only supported on macOS and Linux due to a Windows limitation.
  754. .. _class_@GlobalScope_constant_KEY_F30:
  755. .. rst-class:: classref-enumeration-constant
  756. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F30** = ``4194361``
  757. F30 key. Only supported on macOS and Linux due to a Windows limitation.
  758. .. _class_@GlobalScope_constant_KEY_F31:
  759. .. rst-class:: classref-enumeration-constant
  760. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F31** = ``4194362``
  761. F31 key. Only supported on macOS and Linux due to a Windows limitation.
  762. .. _class_@GlobalScope_constant_KEY_F32:
  763. .. rst-class:: classref-enumeration-constant
  764. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F32** = ``4194363``
  765. F32 key. Only supported on macOS and Linux due to a Windows limitation.
  766. .. _class_@GlobalScope_constant_KEY_F33:
  767. .. rst-class:: classref-enumeration-constant
  768. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F33** = ``4194364``
  769. F33 key. Only supported on macOS and Linux due to a Windows limitation.
  770. .. _class_@GlobalScope_constant_KEY_F34:
  771. .. rst-class:: classref-enumeration-constant
  772. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F34** = ``4194365``
  773. F34 key. Only supported on macOS and Linux due to a Windows limitation.
  774. .. _class_@GlobalScope_constant_KEY_F35:
  775. .. rst-class:: classref-enumeration-constant
  776. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F35** = ``4194366``
  777. F35 key. Only supported on macOS and Linux due to a Windows limitation.
  778. .. _class_@GlobalScope_constant_KEY_KP_MULTIPLY:
  779. .. rst-class:: classref-enumeration-constant
  780. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_MULTIPLY** = ``4194433``
  781. Multiply (\*) key on the numeric keypad.
  782. .. _class_@GlobalScope_constant_KEY_KP_DIVIDE:
  783. .. rst-class:: classref-enumeration-constant
  784. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_DIVIDE** = ``4194434``
  785. Divide (/) key on the numeric keypad.
  786. .. _class_@GlobalScope_constant_KEY_KP_SUBTRACT:
  787. .. rst-class:: classref-enumeration-constant
  788. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_SUBTRACT** = ``4194435``
  789. Subtract (-) key on the numeric keypad.
  790. .. _class_@GlobalScope_constant_KEY_KP_PERIOD:
  791. .. rst-class:: classref-enumeration-constant
  792. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_PERIOD** = ``4194436``
  793. Period (.) key on the numeric keypad.
  794. .. _class_@GlobalScope_constant_KEY_KP_ADD:
  795. .. rst-class:: classref-enumeration-constant
  796. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_ADD** = ``4194437``
  797. Add (+) key on the numeric keypad.
  798. .. _class_@GlobalScope_constant_KEY_KP_0:
  799. .. rst-class:: classref-enumeration-constant
  800. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_0** = ``4194438``
  801. Number 0 on the numeric keypad.
  802. .. _class_@GlobalScope_constant_KEY_KP_1:
  803. .. rst-class:: classref-enumeration-constant
  804. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_1** = ``4194439``
  805. Number 1 on the numeric keypad.
  806. .. _class_@GlobalScope_constant_KEY_KP_2:
  807. .. rst-class:: classref-enumeration-constant
  808. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_2** = ``4194440``
  809. Number 2 on the numeric keypad.
  810. .. _class_@GlobalScope_constant_KEY_KP_3:
  811. .. rst-class:: classref-enumeration-constant
  812. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_3** = ``4194441``
  813. Number 3 on the numeric keypad.
  814. .. _class_@GlobalScope_constant_KEY_KP_4:
  815. .. rst-class:: classref-enumeration-constant
  816. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_4** = ``4194442``
  817. Number 4 on the numeric keypad.
  818. .. _class_@GlobalScope_constant_KEY_KP_5:
  819. .. rst-class:: classref-enumeration-constant
  820. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_5** = ``4194443``
  821. Number 5 on the numeric keypad.
  822. .. _class_@GlobalScope_constant_KEY_KP_6:
  823. .. rst-class:: classref-enumeration-constant
  824. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_6** = ``4194444``
  825. Number 6 on the numeric keypad.
  826. .. _class_@GlobalScope_constant_KEY_KP_7:
  827. .. rst-class:: classref-enumeration-constant
  828. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_7** = ``4194445``
  829. Number 7 on the numeric keypad.
  830. .. _class_@GlobalScope_constant_KEY_KP_8:
  831. .. rst-class:: classref-enumeration-constant
  832. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_8** = ``4194446``
  833. Number 8 on the numeric keypad.
  834. .. _class_@GlobalScope_constant_KEY_KP_9:
  835. .. rst-class:: classref-enumeration-constant
  836. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KP_9** = ``4194447``
  837. Number 9 on the numeric keypad.
  838. .. _class_@GlobalScope_constant_KEY_MENU:
  839. .. rst-class:: classref-enumeration-constant
  840. :ref:`Key<enum_@GlobalScope_Key>` **KEY_MENU** = ``4194370``
  841. Context menu key.
  842. .. _class_@GlobalScope_constant_KEY_HYPER:
  843. .. rst-class:: classref-enumeration-constant
  844. :ref:`Key<enum_@GlobalScope_Key>` **KEY_HYPER** = ``4194371``
  845. Hyper key. (On Linux/X11 only).
  846. .. _class_@GlobalScope_constant_KEY_HELP:
  847. .. rst-class:: classref-enumeration-constant
  848. :ref:`Key<enum_@GlobalScope_Key>` **KEY_HELP** = ``4194373``
  849. Help key.
  850. .. _class_@GlobalScope_constant_KEY_BACK:
  851. .. rst-class:: classref-enumeration-constant
  852. :ref:`Key<enum_@GlobalScope_Key>` **KEY_BACK** = ``4194376``
  853. Media back key. Not to be confused with the Back button on an Android device.
  854. .. _class_@GlobalScope_constant_KEY_FORWARD:
  855. .. rst-class:: classref-enumeration-constant
  856. :ref:`Key<enum_@GlobalScope_Key>` **KEY_FORWARD** = ``4194377``
  857. Media forward key.
  858. .. _class_@GlobalScope_constant_KEY_STOP:
  859. .. rst-class:: classref-enumeration-constant
  860. :ref:`Key<enum_@GlobalScope_Key>` **KEY_STOP** = ``4194378``
  861. Media stop key.
  862. .. _class_@GlobalScope_constant_KEY_REFRESH:
  863. .. rst-class:: classref-enumeration-constant
  864. :ref:`Key<enum_@GlobalScope_Key>` **KEY_REFRESH** = ``4194379``
  865. Media refresh key.
  866. .. _class_@GlobalScope_constant_KEY_VOLUMEDOWN:
  867. .. rst-class:: classref-enumeration-constant
  868. :ref:`Key<enum_@GlobalScope_Key>` **KEY_VOLUMEDOWN** = ``4194380``
  869. Volume down key.
  870. .. _class_@GlobalScope_constant_KEY_VOLUMEMUTE:
  871. .. rst-class:: classref-enumeration-constant
  872. :ref:`Key<enum_@GlobalScope_Key>` **KEY_VOLUMEMUTE** = ``4194381``
  873. Mute volume key.
  874. .. _class_@GlobalScope_constant_KEY_VOLUMEUP:
  875. .. rst-class:: classref-enumeration-constant
  876. :ref:`Key<enum_@GlobalScope_Key>` **KEY_VOLUMEUP** = ``4194382``
  877. Volume up key.
  878. .. _class_@GlobalScope_constant_KEY_MEDIAPLAY:
  879. .. rst-class:: classref-enumeration-constant
  880. :ref:`Key<enum_@GlobalScope_Key>` **KEY_MEDIAPLAY** = ``4194388``
  881. Media play key.
  882. .. _class_@GlobalScope_constant_KEY_MEDIASTOP:
  883. .. rst-class:: classref-enumeration-constant
  884. :ref:`Key<enum_@GlobalScope_Key>` **KEY_MEDIASTOP** = ``4194389``
  885. Media stop key.
  886. .. _class_@GlobalScope_constant_KEY_MEDIAPREVIOUS:
  887. .. rst-class:: classref-enumeration-constant
  888. :ref:`Key<enum_@GlobalScope_Key>` **KEY_MEDIAPREVIOUS** = ``4194390``
  889. Previous song key.
  890. .. _class_@GlobalScope_constant_KEY_MEDIANEXT:
  891. .. rst-class:: classref-enumeration-constant
  892. :ref:`Key<enum_@GlobalScope_Key>` **KEY_MEDIANEXT** = ``4194391``
  893. Next song key.
  894. .. _class_@GlobalScope_constant_KEY_MEDIARECORD:
  895. .. rst-class:: classref-enumeration-constant
  896. :ref:`Key<enum_@GlobalScope_Key>` **KEY_MEDIARECORD** = ``4194392``
  897. Media record key.
  898. .. _class_@GlobalScope_constant_KEY_HOMEPAGE:
  899. .. rst-class:: classref-enumeration-constant
  900. :ref:`Key<enum_@GlobalScope_Key>` **KEY_HOMEPAGE** = ``4194393``
  901. Home page key.
  902. .. _class_@GlobalScope_constant_KEY_FAVORITES:
  903. .. rst-class:: classref-enumeration-constant
  904. :ref:`Key<enum_@GlobalScope_Key>` **KEY_FAVORITES** = ``4194394``
  905. Favorites key.
  906. .. _class_@GlobalScope_constant_KEY_SEARCH:
  907. .. rst-class:: classref-enumeration-constant
  908. :ref:`Key<enum_@GlobalScope_Key>` **KEY_SEARCH** = ``4194395``
  909. Search key.
  910. .. _class_@GlobalScope_constant_KEY_STANDBY:
  911. .. rst-class:: classref-enumeration-constant
  912. :ref:`Key<enum_@GlobalScope_Key>` **KEY_STANDBY** = ``4194396``
  913. Standby key.
  914. .. _class_@GlobalScope_constant_KEY_OPENURL:
  915. .. rst-class:: classref-enumeration-constant
  916. :ref:`Key<enum_@GlobalScope_Key>` **KEY_OPENURL** = ``4194397``
  917. Open URL / Launch Browser key.
  918. .. _class_@GlobalScope_constant_KEY_LAUNCHMAIL:
  919. .. rst-class:: classref-enumeration-constant
  920. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCHMAIL** = ``4194398``
  921. Launch Mail key.
  922. .. _class_@GlobalScope_constant_KEY_LAUNCHMEDIA:
  923. .. rst-class:: classref-enumeration-constant
  924. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCHMEDIA** = ``4194399``
  925. Launch Media key.
  926. .. _class_@GlobalScope_constant_KEY_LAUNCH0:
  927. .. rst-class:: classref-enumeration-constant
  928. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCH0** = ``4194400``
  929. Launch Shortcut 0 key.
  930. .. _class_@GlobalScope_constant_KEY_LAUNCH1:
  931. .. rst-class:: classref-enumeration-constant
  932. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCH1** = ``4194401``
  933. Launch Shortcut 1 key.
  934. .. _class_@GlobalScope_constant_KEY_LAUNCH2:
  935. .. rst-class:: classref-enumeration-constant
  936. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCH2** = ``4194402``
  937. Launch Shortcut 2 key.
  938. .. _class_@GlobalScope_constant_KEY_LAUNCH3:
  939. .. rst-class:: classref-enumeration-constant
  940. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCH3** = ``4194403``
  941. Launch Shortcut 3 key.
  942. .. _class_@GlobalScope_constant_KEY_LAUNCH4:
  943. .. rst-class:: classref-enumeration-constant
  944. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCH4** = ``4194404``
  945. Launch Shortcut 4 key.
  946. .. _class_@GlobalScope_constant_KEY_LAUNCH5:
  947. .. rst-class:: classref-enumeration-constant
  948. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCH5** = ``4194405``
  949. Launch Shortcut 5 key.
  950. .. _class_@GlobalScope_constant_KEY_LAUNCH6:
  951. .. rst-class:: classref-enumeration-constant
  952. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCH6** = ``4194406``
  953. Launch Shortcut 6 key.
  954. .. _class_@GlobalScope_constant_KEY_LAUNCH7:
  955. .. rst-class:: classref-enumeration-constant
  956. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCH7** = ``4194407``
  957. Launch Shortcut 7 key.
  958. .. _class_@GlobalScope_constant_KEY_LAUNCH8:
  959. .. rst-class:: classref-enumeration-constant
  960. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCH8** = ``4194408``
  961. Launch Shortcut 8 key.
  962. .. _class_@GlobalScope_constant_KEY_LAUNCH9:
  963. .. rst-class:: classref-enumeration-constant
  964. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCH9** = ``4194409``
  965. Launch Shortcut 9 key.
  966. .. _class_@GlobalScope_constant_KEY_LAUNCHA:
  967. .. rst-class:: classref-enumeration-constant
  968. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCHA** = ``4194410``
  969. Launch Shortcut A key.
  970. .. _class_@GlobalScope_constant_KEY_LAUNCHB:
  971. .. rst-class:: classref-enumeration-constant
  972. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCHB** = ``4194411``
  973. Launch Shortcut B key.
  974. .. _class_@GlobalScope_constant_KEY_LAUNCHC:
  975. .. rst-class:: classref-enumeration-constant
  976. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCHC** = ``4194412``
  977. Launch Shortcut C key.
  978. .. _class_@GlobalScope_constant_KEY_LAUNCHD:
  979. .. rst-class:: classref-enumeration-constant
  980. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCHD** = ``4194413``
  981. Launch Shortcut D key.
  982. .. _class_@GlobalScope_constant_KEY_LAUNCHE:
  983. .. rst-class:: classref-enumeration-constant
  984. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCHE** = ``4194414``
  985. Launch Shortcut E key.
  986. .. _class_@GlobalScope_constant_KEY_LAUNCHF:
  987. .. rst-class:: classref-enumeration-constant
  988. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LAUNCHF** = ``4194415``
  989. Launch Shortcut F key.
  990. .. _class_@GlobalScope_constant_KEY_GLOBE:
  991. .. rst-class:: classref-enumeration-constant
  992. :ref:`Key<enum_@GlobalScope_Key>` **KEY_GLOBE** = ``4194416``
  993. "Globe" key on Mac / iPad keyboard.
  994. .. _class_@GlobalScope_constant_KEY_KEYBOARD:
  995. .. rst-class:: classref-enumeration-constant
  996. :ref:`Key<enum_@GlobalScope_Key>` **KEY_KEYBOARD** = ``4194417``
  997. "On-screen keyboard" key on iPad keyboard.
  998. .. _class_@GlobalScope_constant_KEY_JIS_EISU:
  999. .. rst-class:: classref-enumeration-constant
  1000. :ref:`Key<enum_@GlobalScope_Key>` **KEY_JIS_EISU** = ``4194418``
  1001. 英数 key on Mac keyboard.
  1002. .. _class_@GlobalScope_constant_KEY_JIS_KANA:
  1003. .. rst-class:: classref-enumeration-constant
  1004. :ref:`Key<enum_@GlobalScope_Key>` **KEY_JIS_KANA** = ``4194419``
  1005. かな key on Mac keyboard.
  1006. .. _class_@GlobalScope_constant_KEY_UNKNOWN:
  1007. .. rst-class:: classref-enumeration-constant
  1008. :ref:`Key<enum_@GlobalScope_Key>` **KEY_UNKNOWN** = ``8388607``
  1009. Unknown key.
  1010. .. _class_@GlobalScope_constant_KEY_SPACE:
  1011. .. rst-class:: classref-enumeration-constant
  1012. :ref:`Key<enum_@GlobalScope_Key>` **KEY_SPACE** = ``32``
  1013. Space key.
  1014. .. _class_@GlobalScope_constant_KEY_EXCLAM:
  1015. .. rst-class:: classref-enumeration-constant
  1016. :ref:`Key<enum_@GlobalScope_Key>` **KEY_EXCLAM** = ``33``
  1017. ! key.
  1018. .. _class_@GlobalScope_constant_KEY_QUOTEDBL:
  1019. .. rst-class:: classref-enumeration-constant
  1020. :ref:`Key<enum_@GlobalScope_Key>` **KEY_QUOTEDBL** = ``34``
  1021. " key.
  1022. .. _class_@GlobalScope_constant_KEY_NUMBERSIGN:
  1023. .. rst-class:: classref-enumeration-constant
  1024. :ref:`Key<enum_@GlobalScope_Key>` **KEY_NUMBERSIGN** = ``35``
  1025. # key.
  1026. .. _class_@GlobalScope_constant_KEY_DOLLAR:
  1027. .. rst-class:: classref-enumeration-constant
  1028. :ref:`Key<enum_@GlobalScope_Key>` **KEY_DOLLAR** = ``36``
  1029. $ key.
  1030. .. _class_@GlobalScope_constant_KEY_PERCENT:
  1031. .. rst-class:: classref-enumeration-constant
  1032. :ref:`Key<enum_@GlobalScope_Key>` **KEY_PERCENT** = ``37``
  1033. % key.
  1034. .. _class_@GlobalScope_constant_KEY_AMPERSAND:
  1035. .. rst-class:: classref-enumeration-constant
  1036. :ref:`Key<enum_@GlobalScope_Key>` **KEY_AMPERSAND** = ``38``
  1037. & key.
  1038. .. _class_@GlobalScope_constant_KEY_APOSTROPHE:
  1039. .. rst-class:: classref-enumeration-constant
  1040. :ref:`Key<enum_@GlobalScope_Key>` **KEY_APOSTROPHE** = ``39``
  1041. ' key.
  1042. .. _class_@GlobalScope_constant_KEY_PARENLEFT:
  1043. .. rst-class:: classref-enumeration-constant
  1044. :ref:`Key<enum_@GlobalScope_Key>` **KEY_PARENLEFT** = ``40``
  1045. ( key.
  1046. .. _class_@GlobalScope_constant_KEY_PARENRIGHT:
  1047. .. rst-class:: classref-enumeration-constant
  1048. :ref:`Key<enum_@GlobalScope_Key>` **KEY_PARENRIGHT** = ``41``
  1049. ) key.
  1050. .. _class_@GlobalScope_constant_KEY_ASTERISK:
  1051. .. rst-class:: classref-enumeration-constant
  1052. :ref:`Key<enum_@GlobalScope_Key>` **KEY_ASTERISK** = ``42``
  1053. \* key.
  1054. .. _class_@GlobalScope_constant_KEY_PLUS:
  1055. .. rst-class:: classref-enumeration-constant
  1056. :ref:`Key<enum_@GlobalScope_Key>` **KEY_PLUS** = ``43``
  1057. + key.
  1058. .. _class_@GlobalScope_constant_KEY_COMMA:
  1059. .. rst-class:: classref-enumeration-constant
  1060. :ref:`Key<enum_@GlobalScope_Key>` **KEY_COMMA** = ``44``
  1061. , key.
  1062. .. _class_@GlobalScope_constant_KEY_MINUS:
  1063. .. rst-class:: classref-enumeration-constant
  1064. :ref:`Key<enum_@GlobalScope_Key>` **KEY_MINUS** = ``45``
  1065. - key.
  1066. .. _class_@GlobalScope_constant_KEY_PERIOD:
  1067. .. rst-class:: classref-enumeration-constant
  1068. :ref:`Key<enum_@GlobalScope_Key>` **KEY_PERIOD** = ``46``
  1069. . key.
  1070. .. _class_@GlobalScope_constant_KEY_SLASH:
  1071. .. rst-class:: classref-enumeration-constant
  1072. :ref:`Key<enum_@GlobalScope_Key>` **KEY_SLASH** = ``47``
  1073. / key.
  1074. .. _class_@GlobalScope_constant_KEY_0:
  1075. .. rst-class:: classref-enumeration-constant
  1076. :ref:`Key<enum_@GlobalScope_Key>` **KEY_0** = ``48``
  1077. Number 0 key.
  1078. .. _class_@GlobalScope_constant_KEY_1:
  1079. .. rst-class:: classref-enumeration-constant
  1080. :ref:`Key<enum_@GlobalScope_Key>` **KEY_1** = ``49``
  1081. Number 1 key.
  1082. .. _class_@GlobalScope_constant_KEY_2:
  1083. .. rst-class:: classref-enumeration-constant
  1084. :ref:`Key<enum_@GlobalScope_Key>` **KEY_2** = ``50``
  1085. Number 2 key.
  1086. .. _class_@GlobalScope_constant_KEY_3:
  1087. .. rst-class:: classref-enumeration-constant
  1088. :ref:`Key<enum_@GlobalScope_Key>` **KEY_3** = ``51``
  1089. Number 3 key.
  1090. .. _class_@GlobalScope_constant_KEY_4:
  1091. .. rst-class:: classref-enumeration-constant
  1092. :ref:`Key<enum_@GlobalScope_Key>` **KEY_4** = ``52``
  1093. Number 4 key.
  1094. .. _class_@GlobalScope_constant_KEY_5:
  1095. .. rst-class:: classref-enumeration-constant
  1096. :ref:`Key<enum_@GlobalScope_Key>` **KEY_5** = ``53``
  1097. Number 5 key.
  1098. .. _class_@GlobalScope_constant_KEY_6:
  1099. .. rst-class:: classref-enumeration-constant
  1100. :ref:`Key<enum_@GlobalScope_Key>` **KEY_6** = ``54``
  1101. Number 6 key.
  1102. .. _class_@GlobalScope_constant_KEY_7:
  1103. .. rst-class:: classref-enumeration-constant
  1104. :ref:`Key<enum_@GlobalScope_Key>` **KEY_7** = ``55``
  1105. Number 7 key.
  1106. .. _class_@GlobalScope_constant_KEY_8:
  1107. .. rst-class:: classref-enumeration-constant
  1108. :ref:`Key<enum_@GlobalScope_Key>` **KEY_8** = ``56``
  1109. Number 8 key.
  1110. .. _class_@GlobalScope_constant_KEY_9:
  1111. .. rst-class:: classref-enumeration-constant
  1112. :ref:`Key<enum_@GlobalScope_Key>` **KEY_9** = ``57``
  1113. Number 9 key.
  1114. .. _class_@GlobalScope_constant_KEY_COLON:
  1115. .. rst-class:: classref-enumeration-constant
  1116. :ref:`Key<enum_@GlobalScope_Key>` **KEY_COLON** = ``58``
  1117. : key.
  1118. .. _class_@GlobalScope_constant_KEY_SEMICOLON:
  1119. .. rst-class:: classref-enumeration-constant
  1120. :ref:`Key<enum_@GlobalScope_Key>` **KEY_SEMICOLON** = ``59``
  1121. ; key.
  1122. .. _class_@GlobalScope_constant_KEY_LESS:
  1123. .. rst-class:: classref-enumeration-constant
  1124. :ref:`Key<enum_@GlobalScope_Key>` **KEY_LESS** = ``60``
  1125. < key.
  1126. .. _class_@GlobalScope_constant_KEY_EQUAL:
  1127. .. rst-class:: classref-enumeration-constant
  1128. :ref:`Key<enum_@GlobalScope_Key>` **KEY_EQUAL** = ``61``
  1129. = key.
  1130. .. _class_@GlobalScope_constant_KEY_GREATER:
  1131. .. rst-class:: classref-enumeration-constant
  1132. :ref:`Key<enum_@GlobalScope_Key>` **KEY_GREATER** = ``62``
  1133. > key.
  1134. .. _class_@GlobalScope_constant_KEY_QUESTION:
  1135. .. rst-class:: classref-enumeration-constant
  1136. :ref:`Key<enum_@GlobalScope_Key>` **KEY_QUESTION** = ``63``
  1137. ? key.
  1138. .. _class_@GlobalScope_constant_KEY_AT:
  1139. .. rst-class:: classref-enumeration-constant
  1140. :ref:`Key<enum_@GlobalScope_Key>` **KEY_AT** = ``64``
  1141. @ key.
  1142. .. _class_@GlobalScope_constant_KEY_A:
  1143. .. rst-class:: classref-enumeration-constant
  1144. :ref:`Key<enum_@GlobalScope_Key>` **KEY_A** = ``65``
  1145. A key.
  1146. .. _class_@GlobalScope_constant_KEY_B:
  1147. .. rst-class:: classref-enumeration-constant
  1148. :ref:`Key<enum_@GlobalScope_Key>` **KEY_B** = ``66``
  1149. B key.
  1150. .. _class_@GlobalScope_constant_KEY_C:
  1151. .. rst-class:: classref-enumeration-constant
  1152. :ref:`Key<enum_@GlobalScope_Key>` **KEY_C** = ``67``
  1153. C key.
  1154. .. _class_@GlobalScope_constant_KEY_D:
  1155. .. rst-class:: classref-enumeration-constant
  1156. :ref:`Key<enum_@GlobalScope_Key>` **KEY_D** = ``68``
  1157. D key.
  1158. .. _class_@GlobalScope_constant_KEY_E:
  1159. .. rst-class:: classref-enumeration-constant
  1160. :ref:`Key<enum_@GlobalScope_Key>` **KEY_E** = ``69``
  1161. E key.
  1162. .. _class_@GlobalScope_constant_KEY_F:
  1163. .. rst-class:: classref-enumeration-constant
  1164. :ref:`Key<enum_@GlobalScope_Key>` **KEY_F** = ``70``
  1165. F key.
  1166. .. _class_@GlobalScope_constant_KEY_G:
  1167. .. rst-class:: classref-enumeration-constant
  1168. :ref:`Key<enum_@GlobalScope_Key>` **KEY_G** = ``71``
  1169. G key.
  1170. .. _class_@GlobalScope_constant_KEY_H:
  1171. .. rst-class:: classref-enumeration-constant
  1172. :ref:`Key<enum_@GlobalScope_Key>` **KEY_H** = ``72``
  1173. H key.
  1174. .. _class_@GlobalScope_constant_KEY_I:
  1175. .. rst-class:: classref-enumeration-constant
  1176. :ref:`Key<enum_@GlobalScope_Key>` **KEY_I** = ``73``
  1177. I key.
  1178. .. _class_@GlobalScope_constant_KEY_J:
  1179. .. rst-class:: classref-enumeration-constant
  1180. :ref:`Key<enum_@GlobalScope_Key>` **KEY_J** = ``74``
  1181. J key.
  1182. .. _class_@GlobalScope_constant_KEY_K:
  1183. .. rst-class:: classref-enumeration-constant
  1184. :ref:`Key<enum_@GlobalScope_Key>` **KEY_K** = ``75``
  1185. K key.
  1186. .. _class_@GlobalScope_constant_KEY_L:
  1187. .. rst-class:: classref-enumeration-constant
  1188. :ref:`Key<enum_@GlobalScope_Key>` **KEY_L** = ``76``
  1189. L key.
  1190. .. _class_@GlobalScope_constant_KEY_M:
  1191. .. rst-class:: classref-enumeration-constant
  1192. :ref:`Key<enum_@GlobalScope_Key>` **KEY_M** = ``77``
  1193. M key.
  1194. .. _class_@GlobalScope_constant_KEY_N:
  1195. .. rst-class:: classref-enumeration-constant
  1196. :ref:`Key<enum_@GlobalScope_Key>` **KEY_N** = ``78``
  1197. N key.
  1198. .. _class_@GlobalScope_constant_KEY_O:
  1199. .. rst-class:: classref-enumeration-constant
  1200. :ref:`Key<enum_@GlobalScope_Key>` **KEY_O** = ``79``
  1201. O key.
  1202. .. _class_@GlobalScope_constant_KEY_P:
  1203. .. rst-class:: classref-enumeration-constant
  1204. :ref:`Key<enum_@GlobalScope_Key>` **KEY_P** = ``80``
  1205. P key.
  1206. .. _class_@GlobalScope_constant_KEY_Q:
  1207. .. rst-class:: classref-enumeration-constant
  1208. :ref:`Key<enum_@GlobalScope_Key>` **KEY_Q** = ``81``
  1209. Q key.
  1210. .. _class_@GlobalScope_constant_KEY_R:
  1211. .. rst-class:: classref-enumeration-constant
  1212. :ref:`Key<enum_@GlobalScope_Key>` **KEY_R** = ``82``
  1213. R key.
  1214. .. _class_@GlobalScope_constant_KEY_S:
  1215. .. rst-class:: classref-enumeration-constant
  1216. :ref:`Key<enum_@GlobalScope_Key>` **KEY_S** = ``83``
  1217. S key.
  1218. .. _class_@GlobalScope_constant_KEY_T:
  1219. .. rst-class:: classref-enumeration-constant
  1220. :ref:`Key<enum_@GlobalScope_Key>` **KEY_T** = ``84``
  1221. T key.
  1222. .. _class_@GlobalScope_constant_KEY_U:
  1223. .. rst-class:: classref-enumeration-constant
  1224. :ref:`Key<enum_@GlobalScope_Key>` **KEY_U** = ``85``
  1225. U key.
  1226. .. _class_@GlobalScope_constant_KEY_V:
  1227. .. rst-class:: classref-enumeration-constant
  1228. :ref:`Key<enum_@GlobalScope_Key>` **KEY_V** = ``86``
  1229. V key.
  1230. .. _class_@GlobalScope_constant_KEY_W:
  1231. .. rst-class:: classref-enumeration-constant
  1232. :ref:`Key<enum_@GlobalScope_Key>` **KEY_W** = ``87``
  1233. W key.
  1234. .. _class_@GlobalScope_constant_KEY_X:
  1235. .. rst-class:: classref-enumeration-constant
  1236. :ref:`Key<enum_@GlobalScope_Key>` **KEY_X** = ``88``
  1237. X key.
  1238. .. _class_@GlobalScope_constant_KEY_Y:
  1239. .. rst-class:: classref-enumeration-constant
  1240. :ref:`Key<enum_@GlobalScope_Key>` **KEY_Y** = ``89``
  1241. Y key.
  1242. .. _class_@GlobalScope_constant_KEY_Z:
  1243. .. rst-class:: classref-enumeration-constant
  1244. :ref:`Key<enum_@GlobalScope_Key>` **KEY_Z** = ``90``
  1245. Z key.
  1246. .. _class_@GlobalScope_constant_KEY_BRACKETLEFT:
  1247. .. rst-class:: classref-enumeration-constant
  1248. :ref:`Key<enum_@GlobalScope_Key>` **KEY_BRACKETLEFT** = ``91``
  1249. [ key.
  1250. .. _class_@GlobalScope_constant_KEY_BACKSLASH:
  1251. .. rst-class:: classref-enumeration-constant
  1252. :ref:`Key<enum_@GlobalScope_Key>` **KEY_BACKSLASH** = ``92``
  1253. \\ key.
  1254. .. _class_@GlobalScope_constant_KEY_BRACKETRIGHT:
  1255. .. rst-class:: classref-enumeration-constant
  1256. :ref:`Key<enum_@GlobalScope_Key>` **KEY_BRACKETRIGHT** = ``93``
  1257. ] key.
  1258. .. _class_@GlobalScope_constant_KEY_ASCIICIRCUM:
  1259. .. rst-class:: classref-enumeration-constant
  1260. :ref:`Key<enum_@GlobalScope_Key>` **KEY_ASCIICIRCUM** = ``94``
  1261. ^ key.
  1262. .. _class_@GlobalScope_constant_KEY_UNDERSCORE:
  1263. .. rst-class:: classref-enumeration-constant
  1264. :ref:`Key<enum_@GlobalScope_Key>` **KEY_UNDERSCORE** = ``95``
  1265. \_ key.
  1266. .. _class_@GlobalScope_constant_KEY_QUOTELEFT:
  1267. .. rst-class:: classref-enumeration-constant
  1268. :ref:`Key<enum_@GlobalScope_Key>` **KEY_QUOTELEFT** = ``96``
  1269. ` key.
  1270. .. _class_@GlobalScope_constant_KEY_BRACELEFT:
  1271. .. rst-class:: classref-enumeration-constant
  1272. :ref:`Key<enum_@GlobalScope_Key>` **KEY_BRACELEFT** = ``123``
  1273. { key.
  1274. .. _class_@GlobalScope_constant_KEY_BAR:
  1275. .. rst-class:: classref-enumeration-constant
  1276. :ref:`Key<enum_@GlobalScope_Key>` **KEY_BAR** = ``124``
  1277. | key.
  1278. .. _class_@GlobalScope_constant_KEY_BRACERIGHT:
  1279. .. rst-class:: classref-enumeration-constant
  1280. :ref:`Key<enum_@GlobalScope_Key>` **KEY_BRACERIGHT** = ``125``
  1281. } key.
  1282. .. _class_@GlobalScope_constant_KEY_ASCIITILDE:
  1283. .. rst-class:: classref-enumeration-constant
  1284. :ref:`Key<enum_@GlobalScope_Key>` **KEY_ASCIITILDE** = ``126``
  1285. ~ key.
  1286. .. _class_@GlobalScope_constant_KEY_YEN:
  1287. .. rst-class:: classref-enumeration-constant
  1288. :ref:`Key<enum_@GlobalScope_Key>` **KEY_YEN** = ``165``
  1289. ¥ key.
  1290. .. _class_@GlobalScope_constant_KEY_SECTION:
  1291. .. rst-class:: classref-enumeration-constant
  1292. :ref:`Key<enum_@GlobalScope_Key>` **KEY_SECTION** = ``167``
  1293. § key.
  1294. .. rst-class:: classref-item-separator
  1295. ----
  1296. .. _enum_@GlobalScope_KeyModifierMask:
  1297. .. rst-class:: classref-enumeration
  1298. flags **KeyModifierMask**:
  1299. .. _class_@GlobalScope_constant_KEY_CODE_MASK:
  1300. .. rst-class:: classref-enumeration-constant
  1301. :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>` **KEY_CODE_MASK** = ``8388607``
  1302. Key Code mask.
  1303. .. _class_@GlobalScope_constant_KEY_MODIFIER_MASK:
  1304. .. rst-class:: classref-enumeration-constant
  1305. :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>` **KEY_MODIFIER_MASK** = ``532676608``
  1306. Modifier key mask.
  1307. .. _class_@GlobalScope_constant_KEY_MASK_CMD_OR_CTRL:
  1308. .. rst-class:: classref-enumeration-constant
  1309. :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>` **KEY_MASK_CMD_OR_CTRL** = ``16777216``
  1310. 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.
  1311. .. _class_@GlobalScope_constant_KEY_MASK_SHIFT:
  1312. .. rst-class:: classref-enumeration-constant
  1313. :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>` **KEY_MASK_SHIFT** = ``33554432``
  1314. Shift key mask.
  1315. .. _class_@GlobalScope_constant_KEY_MASK_ALT:
  1316. .. rst-class:: classref-enumeration-constant
  1317. :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>` **KEY_MASK_ALT** = ``67108864``
  1318. Alt or Option (on macOS) key mask.
  1319. .. _class_@GlobalScope_constant_KEY_MASK_META:
  1320. .. rst-class:: classref-enumeration-constant
  1321. :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>` **KEY_MASK_META** = ``134217728``
  1322. Command (on macOS) or Meta/Windows key mask.
  1323. .. _class_@GlobalScope_constant_KEY_MASK_CTRL:
  1324. .. rst-class:: classref-enumeration-constant
  1325. :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>` **KEY_MASK_CTRL** = ``268435456``
  1326. Control key mask.
  1327. .. _class_@GlobalScope_constant_KEY_MASK_KPAD:
  1328. .. rst-class:: classref-enumeration-constant
  1329. :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>` **KEY_MASK_KPAD** = ``536870912``
  1330. Keypad key mask.
  1331. .. _class_@GlobalScope_constant_KEY_MASK_GROUP_SWITCH:
  1332. .. rst-class:: classref-enumeration-constant
  1333. :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>` **KEY_MASK_GROUP_SWITCH** = ``1073741824``
  1334. Group Switch key mask.
  1335. .. rst-class:: classref-item-separator
  1336. ----
  1337. .. _enum_@GlobalScope_MouseButton:
  1338. .. rst-class:: classref-enumeration
  1339. enum **MouseButton**:
  1340. .. _class_@GlobalScope_constant_MOUSE_BUTTON_NONE:
  1341. .. rst-class:: classref-enumeration-constant
  1342. :ref:`MouseButton<enum_@GlobalScope_MouseButton>` **MOUSE_BUTTON_NONE** = ``0``
  1343. 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.
  1344. .. _class_@GlobalScope_constant_MOUSE_BUTTON_LEFT:
  1345. .. rst-class:: classref-enumeration-constant
  1346. :ref:`MouseButton<enum_@GlobalScope_MouseButton>` **MOUSE_BUTTON_LEFT** = ``1``
  1347. Primary mouse button, usually assigned to the left button.
  1348. .. _class_@GlobalScope_constant_MOUSE_BUTTON_RIGHT:
  1349. .. rst-class:: classref-enumeration-constant
  1350. :ref:`MouseButton<enum_@GlobalScope_MouseButton>` **MOUSE_BUTTON_RIGHT** = ``2``
  1351. Secondary mouse button, usually assigned to the right button.
  1352. .. _class_@GlobalScope_constant_MOUSE_BUTTON_MIDDLE:
  1353. .. rst-class:: classref-enumeration-constant
  1354. :ref:`MouseButton<enum_@GlobalScope_MouseButton>` **MOUSE_BUTTON_MIDDLE** = ``3``
  1355. Middle mouse button.
  1356. .. _class_@GlobalScope_constant_MOUSE_BUTTON_WHEEL_UP:
  1357. .. rst-class:: classref-enumeration-constant
  1358. :ref:`MouseButton<enum_@GlobalScope_MouseButton>` **MOUSE_BUTTON_WHEEL_UP** = ``4``
  1359. Mouse wheel scrolling up.
  1360. .. _class_@GlobalScope_constant_MOUSE_BUTTON_WHEEL_DOWN:
  1361. .. rst-class:: classref-enumeration-constant
  1362. :ref:`MouseButton<enum_@GlobalScope_MouseButton>` **MOUSE_BUTTON_WHEEL_DOWN** = ``5``
  1363. Mouse wheel scrolling down.
  1364. .. _class_@GlobalScope_constant_MOUSE_BUTTON_WHEEL_LEFT:
  1365. .. rst-class:: classref-enumeration-constant
  1366. :ref:`MouseButton<enum_@GlobalScope_MouseButton>` **MOUSE_BUTTON_WHEEL_LEFT** = ``6``
  1367. Mouse wheel left button (only present on some mice).
  1368. .. _class_@GlobalScope_constant_MOUSE_BUTTON_WHEEL_RIGHT:
  1369. .. rst-class:: classref-enumeration-constant
  1370. :ref:`MouseButton<enum_@GlobalScope_MouseButton>` **MOUSE_BUTTON_WHEEL_RIGHT** = ``7``
  1371. Mouse wheel right button (only present on some mice).
  1372. .. _class_@GlobalScope_constant_MOUSE_BUTTON_XBUTTON1:
  1373. .. rst-class:: classref-enumeration-constant
  1374. :ref:`MouseButton<enum_@GlobalScope_MouseButton>` **MOUSE_BUTTON_XBUTTON1** = ``8``
  1375. Extra mouse button 1. This is sometimes present, usually to the sides of the mouse.
  1376. .. _class_@GlobalScope_constant_MOUSE_BUTTON_XBUTTON2:
  1377. .. rst-class:: classref-enumeration-constant
  1378. :ref:`MouseButton<enum_@GlobalScope_MouseButton>` **MOUSE_BUTTON_XBUTTON2** = ``9``
  1379. Extra mouse button 2. This is sometimes present, usually to the sides of the mouse.
  1380. .. rst-class:: classref-item-separator
  1381. ----
  1382. .. _enum_@GlobalScope_MouseButtonMask:
  1383. .. rst-class:: classref-enumeration
  1384. flags **MouseButtonMask**:
  1385. .. _class_@GlobalScope_constant_MOUSE_BUTTON_MASK_LEFT:
  1386. .. rst-class:: classref-enumeration-constant
  1387. :ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>` **MOUSE_BUTTON_MASK_LEFT** = ``1``
  1388. Primary mouse button mask, usually for the left button.
  1389. .. _class_@GlobalScope_constant_MOUSE_BUTTON_MASK_RIGHT:
  1390. .. rst-class:: classref-enumeration-constant
  1391. :ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>` **MOUSE_BUTTON_MASK_RIGHT** = ``2``
  1392. Secondary mouse button mask, usually for the right button.
  1393. .. _class_@GlobalScope_constant_MOUSE_BUTTON_MASK_MIDDLE:
  1394. .. rst-class:: classref-enumeration-constant
  1395. :ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>` **MOUSE_BUTTON_MASK_MIDDLE** = ``4``
  1396. Middle mouse button mask.
  1397. .. _class_@GlobalScope_constant_MOUSE_BUTTON_MASK_MB_XBUTTON1:
  1398. .. rst-class:: classref-enumeration-constant
  1399. :ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>` **MOUSE_BUTTON_MASK_MB_XBUTTON1** = ``128``
  1400. Extra mouse button 1 mask.
  1401. .. _class_@GlobalScope_constant_MOUSE_BUTTON_MASK_MB_XBUTTON2:
  1402. .. rst-class:: classref-enumeration-constant
  1403. :ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>` **MOUSE_BUTTON_MASK_MB_XBUTTON2** = ``256``
  1404. Extra mouse button 2 mask.
  1405. .. rst-class:: classref-item-separator
  1406. ----
  1407. .. _enum_@GlobalScope_JoyButton:
  1408. .. rst-class:: classref-enumeration
  1409. enum **JoyButton**:
  1410. .. _class_@GlobalScope_constant_JOY_BUTTON_INVALID:
  1411. .. rst-class:: classref-enumeration-constant
  1412. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_INVALID** = ``-1``
  1413. An invalid game controller button.
  1414. .. _class_@GlobalScope_constant_JOY_BUTTON_A:
  1415. .. rst-class:: classref-enumeration-constant
  1416. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_A** = ``0``
  1417. Game controller SDL button A. Corresponds to the bottom action button: Sony Cross, Xbox A, Nintendo B.
  1418. .. _class_@GlobalScope_constant_JOY_BUTTON_B:
  1419. .. rst-class:: classref-enumeration-constant
  1420. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_B** = ``1``
  1421. Game controller SDL button B. Corresponds to the right action button: Sony Circle, Xbox B, Nintendo A.
  1422. .. _class_@GlobalScope_constant_JOY_BUTTON_X:
  1423. .. rst-class:: classref-enumeration-constant
  1424. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_X** = ``2``
  1425. Game controller SDL button X. Corresponds to the left action button: Sony Square, Xbox X, Nintendo Y.
  1426. .. _class_@GlobalScope_constant_JOY_BUTTON_Y:
  1427. .. rst-class:: classref-enumeration-constant
  1428. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_Y** = ``3``
  1429. Game controller SDL button Y. Corresponds to the top action button: Sony Triangle, Xbox Y, Nintendo X.
  1430. .. _class_@GlobalScope_constant_JOY_BUTTON_BACK:
  1431. .. rst-class:: classref-enumeration-constant
  1432. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_BACK** = ``4``
  1433. Game controller SDL back button. Corresponds to the Sony Select, Xbox Back, Nintendo - button.
  1434. .. _class_@GlobalScope_constant_JOY_BUTTON_GUIDE:
  1435. .. rst-class:: classref-enumeration-constant
  1436. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_GUIDE** = ``5``
  1437. Game controller SDL guide button. Corresponds to the Sony PS, Xbox Home button.
  1438. .. _class_@GlobalScope_constant_JOY_BUTTON_START:
  1439. .. rst-class:: classref-enumeration-constant
  1440. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_START** = ``6``
  1441. Game controller SDL start button. Corresponds to the Nintendo + button.
  1442. .. _class_@GlobalScope_constant_JOY_BUTTON_LEFT_STICK:
  1443. .. rst-class:: classref-enumeration-constant
  1444. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_LEFT_STICK** = ``7``
  1445. Game controller SDL left stick button. Corresponds to the Sony L3, Xbox L/LS button.
  1446. .. _class_@GlobalScope_constant_JOY_BUTTON_RIGHT_STICK:
  1447. .. rst-class:: classref-enumeration-constant
  1448. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_RIGHT_STICK** = ``8``
  1449. Game controller SDL right stick button. Corresponds to the Sony R3, Xbox R/RS button.
  1450. .. _class_@GlobalScope_constant_JOY_BUTTON_LEFT_SHOULDER:
  1451. .. rst-class:: classref-enumeration-constant
  1452. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_LEFT_SHOULDER** = ``9``
  1453. Game controller SDL left shoulder button. Corresponds to the Sony L1, Xbox LB button.
  1454. .. _class_@GlobalScope_constant_JOY_BUTTON_RIGHT_SHOULDER:
  1455. .. rst-class:: classref-enumeration-constant
  1456. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_RIGHT_SHOULDER** = ``10``
  1457. Game controller SDL right shoulder button. Corresponds to the Sony R1, Xbox RB button.
  1458. .. _class_@GlobalScope_constant_JOY_BUTTON_DPAD_UP:
  1459. .. rst-class:: classref-enumeration-constant
  1460. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_DPAD_UP** = ``11``
  1461. Game controller D-pad up button.
  1462. .. _class_@GlobalScope_constant_JOY_BUTTON_DPAD_DOWN:
  1463. .. rst-class:: classref-enumeration-constant
  1464. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_DPAD_DOWN** = ``12``
  1465. Game controller D-pad down button.
  1466. .. _class_@GlobalScope_constant_JOY_BUTTON_DPAD_LEFT:
  1467. .. rst-class:: classref-enumeration-constant
  1468. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_DPAD_LEFT** = ``13``
  1469. Game controller D-pad left button.
  1470. .. _class_@GlobalScope_constant_JOY_BUTTON_DPAD_RIGHT:
  1471. .. rst-class:: classref-enumeration-constant
  1472. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_DPAD_RIGHT** = ``14``
  1473. Game controller D-pad right button.
  1474. .. _class_@GlobalScope_constant_JOY_BUTTON_MISC1:
  1475. .. rst-class:: classref-enumeration-constant
  1476. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_MISC1** = ``15``
  1477. Game controller SDL miscellaneous button. Corresponds to Xbox share button, PS5 microphone button, Nintendo Switch capture button.
  1478. .. _class_@GlobalScope_constant_JOY_BUTTON_PADDLE1:
  1479. .. rst-class:: classref-enumeration-constant
  1480. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_PADDLE1** = ``16``
  1481. Game controller SDL paddle 1 button.
  1482. .. _class_@GlobalScope_constant_JOY_BUTTON_PADDLE2:
  1483. .. rst-class:: classref-enumeration-constant
  1484. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_PADDLE2** = ``17``
  1485. Game controller SDL paddle 2 button.
  1486. .. _class_@GlobalScope_constant_JOY_BUTTON_PADDLE3:
  1487. .. rst-class:: classref-enumeration-constant
  1488. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_PADDLE3** = ``18``
  1489. Game controller SDL paddle 3 button.
  1490. .. _class_@GlobalScope_constant_JOY_BUTTON_PADDLE4:
  1491. .. rst-class:: classref-enumeration-constant
  1492. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_PADDLE4** = ``19``
  1493. Game controller SDL paddle 4 button.
  1494. .. _class_@GlobalScope_constant_JOY_BUTTON_TOUCHPAD:
  1495. .. rst-class:: classref-enumeration-constant
  1496. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_TOUCHPAD** = ``20``
  1497. Game controller SDL touchpad button.
  1498. .. _class_@GlobalScope_constant_JOY_BUTTON_SDL_MAX:
  1499. .. rst-class:: classref-enumeration-constant
  1500. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_SDL_MAX** = ``21``
  1501. The number of SDL game controller buttons.
  1502. .. _class_@GlobalScope_constant_JOY_BUTTON_MAX:
  1503. .. rst-class:: classref-enumeration-constant
  1504. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_MAX** = ``128``
  1505. The maximum number of game controller buttons supported by the engine. The actual limit may be lower on specific platforms:
  1506. - **Android:** Up to 36 buttons.
  1507. - **Linux:** Up to 80 buttons.
  1508. - **Windows** and **macOS:** Up to 128 buttons.
  1509. .. rst-class:: classref-item-separator
  1510. ----
  1511. .. _enum_@GlobalScope_JoyAxis:
  1512. .. rst-class:: classref-enumeration
  1513. enum **JoyAxis**:
  1514. .. _class_@GlobalScope_constant_JOY_AXIS_INVALID:
  1515. .. rst-class:: classref-enumeration-constant
  1516. :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` **JOY_AXIS_INVALID** = ``-1``
  1517. An invalid game controller axis.
  1518. .. _class_@GlobalScope_constant_JOY_AXIS_LEFT_X:
  1519. .. rst-class:: classref-enumeration-constant
  1520. :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` **JOY_AXIS_LEFT_X** = ``0``
  1521. Game controller left joystick x-axis.
  1522. .. _class_@GlobalScope_constant_JOY_AXIS_LEFT_Y:
  1523. .. rst-class:: classref-enumeration-constant
  1524. :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` **JOY_AXIS_LEFT_Y** = ``1``
  1525. Game controller left joystick y-axis.
  1526. .. _class_@GlobalScope_constant_JOY_AXIS_RIGHT_X:
  1527. .. rst-class:: classref-enumeration-constant
  1528. :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` **JOY_AXIS_RIGHT_X** = ``2``
  1529. Game controller right joystick x-axis.
  1530. .. _class_@GlobalScope_constant_JOY_AXIS_RIGHT_Y:
  1531. .. rst-class:: classref-enumeration-constant
  1532. :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` **JOY_AXIS_RIGHT_Y** = ``3``
  1533. Game controller right joystick y-axis.
  1534. .. _class_@GlobalScope_constant_JOY_AXIS_TRIGGER_LEFT:
  1535. .. rst-class:: classref-enumeration-constant
  1536. :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` **JOY_AXIS_TRIGGER_LEFT** = ``4``
  1537. Game controller left trigger axis.
  1538. .. _class_@GlobalScope_constant_JOY_AXIS_TRIGGER_RIGHT:
  1539. .. rst-class:: classref-enumeration-constant
  1540. :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` **JOY_AXIS_TRIGGER_RIGHT** = ``5``
  1541. Game controller right trigger axis.
  1542. .. _class_@GlobalScope_constant_JOY_AXIS_SDL_MAX:
  1543. .. rst-class:: classref-enumeration-constant
  1544. :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` **JOY_AXIS_SDL_MAX** = ``6``
  1545. The number of SDL game controller axes.
  1546. .. _class_@GlobalScope_constant_JOY_AXIS_MAX:
  1547. .. rst-class:: classref-enumeration-constant
  1548. :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` **JOY_AXIS_MAX** = ``10``
  1549. The maximum number of game controller axes: OpenVR supports up to 5 Joysticks making a total of 10 axes.
  1550. .. rst-class:: classref-item-separator
  1551. ----
  1552. .. _enum_@GlobalScope_MIDIMessage:
  1553. .. rst-class:: classref-enumeration
  1554. enum **MIDIMessage**:
  1555. .. _class_@GlobalScope_constant_MIDI_MESSAGE_NONE:
  1556. .. rst-class:: classref-enumeration-constant
  1557. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_NONE** = ``0``
  1558. Does not correspond to any MIDI message. This is the default value of :ref:`InputEventMIDI.message<class_InputEventMIDI_property_message>`.
  1559. .. _class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_OFF:
  1560. .. rst-class:: classref-enumeration-constant
  1561. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_NOTE_OFF** = ``8``
  1562. MIDI message sent when a note is released.
  1563. \ **Note:** Not all MIDI devices send this message; some may send :ref:`MIDI_MESSAGE_NOTE_ON<class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_ON>` with :ref:`InputEventMIDI.velocity<class_InputEventMIDI_property_velocity>` set to ``0``.
  1564. .. _class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_ON:
  1565. .. rst-class:: classref-enumeration-constant
  1566. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_NOTE_ON** = ``9``
  1567. MIDI message sent when a note is pressed.
  1568. .. _class_@GlobalScope_constant_MIDI_MESSAGE_AFTERTOUCH:
  1569. .. rst-class:: classref-enumeration-constant
  1570. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_AFTERTOUCH** = ``10``
  1571. MIDI message sent to indicate a change in pressure while a note is being pressed down, also called aftertouch.
  1572. .. _class_@GlobalScope_constant_MIDI_MESSAGE_CONTROL_CHANGE:
  1573. .. rst-class:: classref-enumeration-constant
  1574. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_CONTROL_CHANGE** = ``11``
  1575. MIDI message sent when a controller value changes. In a MIDI device, a controller is any input that doesn't play notes. These may include sliders for volume, balance, and panning, as well as switches and pedals. See the `General MIDI specification <https://en.wikipedia.org/wiki/General_MIDI#Controller_events>`__ for a small list.
  1576. .. _class_@GlobalScope_constant_MIDI_MESSAGE_PROGRAM_CHANGE:
  1577. .. rst-class:: classref-enumeration-constant
  1578. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_PROGRAM_CHANGE** = ``12``
  1579. MIDI message sent when the MIDI device changes its current instrument (also called *program* or *preset*).
  1580. .. _class_@GlobalScope_constant_MIDI_MESSAGE_CHANNEL_PRESSURE:
  1581. .. rst-class:: classref-enumeration-constant
  1582. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_CHANNEL_PRESSURE** = ``13``
  1583. MIDI message sent to indicate a change in pressure for the whole channel. Some MIDI devices may send this instead of :ref:`MIDI_MESSAGE_AFTERTOUCH<class_@GlobalScope_constant_MIDI_MESSAGE_AFTERTOUCH>`.
  1584. .. _class_@GlobalScope_constant_MIDI_MESSAGE_PITCH_BEND:
  1585. .. rst-class:: classref-enumeration-constant
  1586. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_PITCH_BEND** = ``14``
  1587. MIDI message sent when the value of the pitch bender changes, usually a wheel on the MIDI device.
  1588. .. _class_@GlobalScope_constant_MIDI_MESSAGE_SYSTEM_EXCLUSIVE:
  1589. .. rst-class:: classref-enumeration-constant
  1590. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_SYSTEM_EXCLUSIVE** = ``240``
  1591. MIDI system exclusive (SysEx) message. This type of message is not standardized and it's highly dependent on the MIDI device sending it.
  1592. \ **Note:** Getting this message's data from :ref:`InputEventMIDI<class_InputEventMIDI>` is not implemented.
  1593. .. _class_@GlobalScope_constant_MIDI_MESSAGE_QUARTER_FRAME:
  1594. .. rst-class:: classref-enumeration-constant
  1595. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_QUARTER_FRAME** = ``241``
  1596. MIDI message sent every quarter frame to keep connected MIDI devices synchronized. Related to :ref:`MIDI_MESSAGE_TIMING_CLOCK<class_@GlobalScope_constant_MIDI_MESSAGE_TIMING_CLOCK>`.
  1597. \ **Note:** Getting this message's data from :ref:`InputEventMIDI<class_InputEventMIDI>` is not implemented.
  1598. .. _class_@GlobalScope_constant_MIDI_MESSAGE_SONG_POSITION_POINTER:
  1599. .. rst-class:: classref-enumeration-constant
  1600. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_SONG_POSITION_POINTER** = ``242``
  1601. MIDI message sent to jump onto a new position in the current sequence or song.
  1602. \ **Note:** Getting this message's data from :ref:`InputEventMIDI<class_InputEventMIDI>` is not implemented.
  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 message sent to select a sequence or song to play.
  1607. \ **Note:** Getting this message's data from :ref:`InputEventMIDI<class_InputEventMIDI>` is not implemented.
  1608. .. _class_@GlobalScope_constant_MIDI_MESSAGE_TUNE_REQUEST:
  1609. .. rst-class:: classref-enumeration-constant
  1610. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_TUNE_REQUEST** = ``246``
  1611. MIDI message sent to request a tuning calibration. Used on analog synthesizers. Most modern MIDI devices do not need this message.
  1612. .. _class_@GlobalScope_constant_MIDI_MESSAGE_TIMING_CLOCK:
  1613. .. rst-class:: classref-enumeration-constant
  1614. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_TIMING_CLOCK** = ``248``
  1615. MIDI message sent 24 times after :ref:`MIDI_MESSAGE_QUARTER_FRAME<class_@GlobalScope_constant_MIDI_MESSAGE_QUARTER_FRAME>`, to keep connected MIDI devices synchronized.
  1616. .. _class_@GlobalScope_constant_MIDI_MESSAGE_START:
  1617. .. rst-class:: classref-enumeration-constant
  1618. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_START** = ``250``
  1619. MIDI message sent to start the current sequence or song from the beginning.
  1620. .. _class_@GlobalScope_constant_MIDI_MESSAGE_CONTINUE:
  1621. .. rst-class:: classref-enumeration-constant
  1622. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_CONTINUE** = ``251``
  1623. MIDI message sent to resume from the point the current sequence or song was paused.
  1624. .. _class_@GlobalScope_constant_MIDI_MESSAGE_STOP:
  1625. .. rst-class:: classref-enumeration-constant
  1626. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_STOP** = ``252``
  1627. MIDI message sent to pause the current sequence or song.
  1628. .. _class_@GlobalScope_constant_MIDI_MESSAGE_ACTIVE_SENSING:
  1629. .. rst-class:: classref-enumeration-constant
  1630. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_ACTIVE_SENSING** = ``254``
  1631. MIDI message sent repeatedly while the MIDI device is idle, to tell the receiver that the connection is alive. Most MIDI devices do not send this message.
  1632. .. _class_@GlobalScope_constant_MIDI_MESSAGE_SYSTEM_RESET:
  1633. .. rst-class:: classref-enumeration-constant
  1634. :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_SYSTEM_RESET** = ``255``
  1635. MIDI message sent to reset a MIDI device to its default state, as if it was just turned on. It should not be sent when the MIDI device is being turned on.
  1636. .. rst-class:: classref-item-separator
  1637. ----
  1638. .. _enum_@GlobalScope_Error:
  1639. .. rst-class:: classref-enumeration
  1640. enum **Error**:
  1641. .. _class_@GlobalScope_constant_OK:
  1642. .. rst-class:: classref-enumeration-constant
  1643. :ref:`Error<enum_@GlobalScope_Error>` **OK** = ``0``
  1644. Methods that return :ref:`Error<enum_@GlobalScope_Error>` return :ref:`OK<class_@GlobalScope_constant_OK>` when no error occurred.
  1645. 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.
  1646. \ **Example:**\
  1647. ::
  1648. var error = method_that_returns_error()
  1649. if error != OK:
  1650. printerr("Failure!")
  1651. # Or, alternatively:
  1652. if error:
  1653. printerr("Still failing!")
  1654. \ **Note:** Many functions do not return an error code, but will print error messages to standard output.
  1655. .. _class_@GlobalScope_constant_FAILED:
  1656. .. rst-class:: classref-enumeration-constant
  1657. :ref:`Error<enum_@GlobalScope_Error>` **FAILED** = ``1``
  1658. Generic error.
  1659. .. _class_@GlobalScope_constant_ERR_UNAVAILABLE:
  1660. .. rst-class:: classref-enumeration-constant
  1661. :ref:`Error<enum_@GlobalScope_Error>` **ERR_UNAVAILABLE** = ``2``
  1662. Unavailable error.
  1663. .. _class_@GlobalScope_constant_ERR_UNCONFIGURED:
  1664. .. rst-class:: classref-enumeration-constant
  1665. :ref:`Error<enum_@GlobalScope_Error>` **ERR_UNCONFIGURED** = ``3``
  1666. Unconfigured error.
  1667. .. _class_@GlobalScope_constant_ERR_UNAUTHORIZED:
  1668. .. rst-class:: classref-enumeration-constant
  1669. :ref:`Error<enum_@GlobalScope_Error>` **ERR_UNAUTHORIZED** = ``4``
  1670. Unauthorized error.
  1671. .. _class_@GlobalScope_constant_ERR_PARAMETER_RANGE_ERROR:
  1672. .. rst-class:: classref-enumeration-constant
  1673. :ref:`Error<enum_@GlobalScope_Error>` **ERR_PARAMETER_RANGE_ERROR** = ``5``
  1674. Parameter range error.
  1675. .. _class_@GlobalScope_constant_ERR_OUT_OF_MEMORY:
  1676. .. rst-class:: classref-enumeration-constant
  1677. :ref:`Error<enum_@GlobalScope_Error>` **ERR_OUT_OF_MEMORY** = ``6``
  1678. Out of memory (OOM) error.
  1679. .. _class_@GlobalScope_constant_ERR_FILE_NOT_FOUND:
  1680. .. rst-class:: classref-enumeration-constant
  1681. :ref:`Error<enum_@GlobalScope_Error>` **ERR_FILE_NOT_FOUND** = ``7``
  1682. File: Not found error.
  1683. .. _class_@GlobalScope_constant_ERR_FILE_BAD_DRIVE:
  1684. .. rst-class:: classref-enumeration-constant
  1685. :ref:`Error<enum_@GlobalScope_Error>` **ERR_FILE_BAD_DRIVE** = ``8``
  1686. File: Bad drive error.
  1687. .. _class_@GlobalScope_constant_ERR_FILE_BAD_PATH:
  1688. .. rst-class:: classref-enumeration-constant
  1689. :ref:`Error<enum_@GlobalScope_Error>` **ERR_FILE_BAD_PATH** = ``9``
  1690. File: Bad path error.
  1691. .. _class_@GlobalScope_constant_ERR_FILE_NO_PERMISSION:
  1692. .. rst-class:: classref-enumeration-constant
  1693. :ref:`Error<enum_@GlobalScope_Error>` **ERR_FILE_NO_PERMISSION** = ``10``
  1694. File: No permission error.
  1695. .. _class_@GlobalScope_constant_ERR_FILE_ALREADY_IN_USE:
  1696. .. rst-class:: classref-enumeration-constant
  1697. :ref:`Error<enum_@GlobalScope_Error>` **ERR_FILE_ALREADY_IN_USE** = ``11``
  1698. File: Already in use error.
  1699. .. _class_@GlobalScope_constant_ERR_FILE_CANT_OPEN:
  1700. .. rst-class:: classref-enumeration-constant
  1701. :ref:`Error<enum_@GlobalScope_Error>` **ERR_FILE_CANT_OPEN** = ``12``
  1702. File: Can't open error.
  1703. .. _class_@GlobalScope_constant_ERR_FILE_CANT_WRITE:
  1704. .. rst-class:: classref-enumeration-constant
  1705. :ref:`Error<enum_@GlobalScope_Error>` **ERR_FILE_CANT_WRITE** = ``13``
  1706. File: Can't write error.
  1707. .. _class_@GlobalScope_constant_ERR_FILE_CANT_READ:
  1708. .. rst-class:: classref-enumeration-constant
  1709. :ref:`Error<enum_@GlobalScope_Error>` **ERR_FILE_CANT_READ** = ``14``
  1710. File: Can't read error.
  1711. .. _class_@GlobalScope_constant_ERR_FILE_UNRECOGNIZED:
  1712. .. rst-class:: classref-enumeration-constant
  1713. :ref:`Error<enum_@GlobalScope_Error>` **ERR_FILE_UNRECOGNIZED** = ``15``
  1714. File: Unrecognized error.
  1715. .. _class_@GlobalScope_constant_ERR_FILE_CORRUPT:
  1716. .. rst-class:: classref-enumeration-constant
  1717. :ref:`Error<enum_@GlobalScope_Error>` **ERR_FILE_CORRUPT** = ``16``
  1718. File: Corrupt error.
  1719. .. _class_@GlobalScope_constant_ERR_FILE_MISSING_DEPENDENCIES:
  1720. .. rst-class:: classref-enumeration-constant
  1721. :ref:`Error<enum_@GlobalScope_Error>` **ERR_FILE_MISSING_DEPENDENCIES** = ``17``
  1722. File: Missing dependencies error.
  1723. .. _class_@GlobalScope_constant_ERR_FILE_EOF:
  1724. .. rst-class:: classref-enumeration-constant
  1725. :ref:`Error<enum_@GlobalScope_Error>` **ERR_FILE_EOF** = ``18``
  1726. File: End of file (EOF) error.
  1727. .. _class_@GlobalScope_constant_ERR_CANT_OPEN:
  1728. .. rst-class:: classref-enumeration-constant
  1729. :ref:`Error<enum_@GlobalScope_Error>` **ERR_CANT_OPEN** = ``19``
  1730. Can't open error.
  1731. .. _class_@GlobalScope_constant_ERR_CANT_CREATE:
  1732. .. rst-class:: classref-enumeration-constant
  1733. :ref:`Error<enum_@GlobalScope_Error>` **ERR_CANT_CREATE** = ``20``
  1734. Can't create error.
  1735. .. _class_@GlobalScope_constant_ERR_QUERY_FAILED:
  1736. .. rst-class:: classref-enumeration-constant
  1737. :ref:`Error<enum_@GlobalScope_Error>` **ERR_QUERY_FAILED** = ``21``
  1738. Query failed error.
  1739. .. _class_@GlobalScope_constant_ERR_ALREADY_IN_USE:
  1740. .. rst-class:: classref-enumeration-constant
  1741. :ref:`Error<enum_@GlobalScope_Error>` **ERR_ALREADY_IN_USE** = ``22``
  1742. Already in use error.
  1743. .. _class_@GlobalScope_constant_ERR_LOCKED:
  1744. .. rst-class:: classref-enumeration-constant
  1745. :ref:`Error<enum_@GlobalScope_Error>` **ERR_LOCKED** = ``23``
  1746. Locked error.
  1747. .. _class_@GlobalScope_constant_ERR_TIMEOUT:
  1748. .. rst-class:: classref-enumeration-constant
  1749. :ref:`Error<enum_@GlobalScope_Error>` **ERR_TIMEOUT** = ``24``
  1750. Timeout error.
  1751. .. _class_@GlobalScope_constant_ERR_CANT_CONNECT:
  1752. .. rst-class:: classref-enumeration-constant
  1753. :ref:`Error<enum_@GlobalScope_Error>` **ERR_CANT_CONNECT** = ``25``
  1754. Can't connect error.
  1755. .. _class_@GlobalScope_constant_ERR_CANT_RESOLVE:
  1756. .. rst-class:: classref-enumeration-constant
  1757. :ref:`Error<enum_@GlobalScope_Error>` **ERR_CANT_RESOLVE** = ``26``
  1758. Can't resolve error.
  1759. .. _class_@GlobalScope_constant_ERR_CONNECTION_ERROR:
  1760. .. rst-class:: classref-enumeration-constant
  1761. :ref:`Error<enum_@GlobalScope_Error>` **ERR_CONNECTION_ERROR** = ``27``
  1762. Connection error.
  1763. .. _class_@GlobalScope_constant_ERR_CANT_ACQUIRE_RESOURCE:
  1764. .. rst-class:: classref-enumeration-constant
  1765. :ref:`Error<enum_@GlobalScope_Error>` **ERR_CANT_ACQUIRE_RESOURCE** = ``28``
  1766. Can't acquire resource error.
  1767. .. _class_@GlobalScope_constant_ERR_CANT_FORK:
  1768. .. rst-class:: classref-enumeration-constant
  1769. :ref:`Error<enum_@GlobalScope_Error>` **ERR_CANT_FORK** = ``29``
  1770. Can't fork process error.
  1771. .. _class_@GlobalScope_constant_ERR_INVALID_DATA:
  1772. .. rst-class:: classref-enumeration-constant
  1773. :ref:`Error<enum_@GlobalScope_Error>` **ERR_INVALID_DATA** = ``30``
  1774. Invalid data error.
  1775. .. _class_@GlobalScope_constant_ERR_INVALID_PARAMETER:
  1776. .. rst-class:: classref-enumeration-constant
  1777. :ref:`Error<enum_@GlobalScope_Error>` **ERR_INVALID_PARAMETER** = ``31``
  1778. Invalid parameter error.
  1779. .. _class_@GlobalScope_constant_ERR_ALREADY_EXISTS:
  1780. .. rst-class:: classref-enumeration-constant
  1781. :ref:`Error<enum_@GlobalScope_Error>` **ERR_ALREADY_EXISTS** = ``32``
  1782. Already exists error.
  1783. .. _class_@GlobalScope_constant_ERR_DOES_NOT_EXIST:
  1784. .. rst-class:: classref-enumeration-constant
  1785. :ref:`Error<enum_@GlobalScope_Error>` **ERR_DOES_NOT_EXIST** = ``33``
  1786. Does not exist error.
  1787. .. _class_@GlobalScope_constant_ERR_DATABASE_CANT_READ:
  1788. .. rst-class:: classref-enumeration-constant
  1789. :ref:`Error<enum_@GlobalScope_Error>` **ERR_DATABASE_CANT_READ** = ``34``
  1790. Database: Read error.
  1791. .. _class_@GlobalScope_constant_ERR_DATABASE_CANT_WRITE:
  1792. .. rst-class:: classref-enumeration-constant
  1793. :ref:`Error<enum_@GlobalScope_Error>` **ERR_DATABASE_CANT_WRITE** = ``35``
  1794. Database: Write error.
  1795. .. _class_@GlobalScope_constant_ERR_COMPILATION_FAILED:
  1796. .. rst-class:: classref-enumeration-constant
  1797. :ref:`Error<enum_@GlobalScope_Error>` **ERR_COMPILATION_FAILED** = ``36``
  1798. Compilation failed error.
  1799. .. _class_@GlobalScope_constant_ERR_METHOD_NOT_FOUND:
  1800. .. rst-class:: classref-enumeration-constant
  1801. :ref:`Error<enum_@GlobalScope_Error>` **ERR_METHOD_NOT_FOUND** = ``37``
  1802. Method not found error.
  1803. .. _class_@GlobalScope_constant_ERR_LINK_FAILED:
  1804. .. rst-class:: classref-enumeration-constant
  1805. :ref:`Error<enum_@GlobalScope_Error>` **ERR_LINK_FAILED** = ``38``
  1806. Linking failed error.
  1807. .. _class_@GlobalScope_constant_ERR_SCRIPT_FAILED:
  1808. .. rst-class:: classref-enumeration-constant
  1809. :ref:`Error<enum_@GlobalScope_Error>` **ERR_SCRIPT_FAILED** = ``39``
  1810. Script failed error.
  1811. .. _class_@GlobalScope_constant_ERR_CYCLIC_LINK:
  1812. .. rst-class:: classref-enumeration-constant
  1813. :ref:`Error<enum_@GlobalScope_Error>` **ERR_CYCLIC_LINK** = ``40``
  1814. Cycling link (import cycle) error.
  1815. .. _class_@GlobalScope_constant_ERR_INVALID_DECLARATION:
  1816. .. rst-class:: classref-enumeration-constant
  1817. :ref:`Error<enum_@GlobalScope_Error>` **ERR_INVALID_DECLARATION** = ``41``
  1818. Invalid declaration error.
  1819. .. _class_@GlobalScope_constant_ERR_DUPLICATE_SYMBOL:
  1820. .. rst-class:: classref-enumeration-constant
  1821. :ref:`Error<enum_@GlobalScope_Error>` **ERR_DUPLICATE_SYMBOL** = ``42``
  1822. Duplicate symbol error.
  1823. .. _class_@GlobalScope_constant_ERR_PARSE_ERROR:
  1824. .. rst-class:: classref-enumeration-constant
  1825. :ref:`Error<enum_@GlobalScope_Error>` **ERR_PARSE_ERROR** = ``43``
  1826. Parse error.
  1827. .. _class_@GlobalScope_constant_ERR_BUSY:
  1828. .. rst-class:: classref-enumeration-constant
  1829. :ref:`Error<enum_@GlobalScope_Error>` **ERR_BUSY** = ``44``
  1830. Busy error.
  1831. .. _class_@GlobalScope_constant_ERR_SKIP:
  1832. .. rst-class:: classref-enumeration-constant
  1833. :ref:`Error<enum_@GlobalScope_Error>` **ERR_SKIP** = ``45``
  1834. Skip error.
  1835. .. _class_@GlobalScope_constant_ERR_HELP:
  1836. .. rst-class:: classref-enumeration-constant
  1837. :ref:`Error<enum_@GlobalScope_Error>` **ERR_HELP** = ``46``
  1838. Help error. Used internally when passing ``--version`` or ``--help`` as executable options.
  1839. .. _class_@GlobalScope_constant_ERR_BUG:
  1840. .. rst-class:: classref-enumeration-constant
  1841. :ref:`Error<enum_@GlobalScope_Error>` **ERR_BUG** = ``47``
  1842. Bug error, caused by an implementation issue in the method.
  1843. \ **Note:** If a built-in method returns this code, please open an issue on `the GitHub Issue Tracker <https://github.com/godotengine/godot/issues>`__.
  1844. .. _class_@GlobalScope_constant_ERR_PRINTER_ON_FIRE:
  1845. .. rst-class:: classref-enumeration-constant
  1846. :ref:`Error<enum_@GlobalScope_Error>` **ERR_PRINTER_ON_FIRE** = ``48``
  1847. Printer on fire error (This is an easter egg, no built-in methods return this error code).
  1848. .. rst-class:: classref-item-separator
  1849. ----
  1850. .. _enum_@GlobalScope_PropertyHint:
  1851. .. rst-class:: classref-enumeration
  1852. enum **PropertyHint**:
  1853. .. _class_@GlobalScope_constant_PROPERTY_HINT_NONE:
  1854. .. rst-class:: classref-enumeration-constant
  1855. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_NONE** = ``0``
  1856. The property has no hint for the editor.
  1857. .. _class_@GlobalScope_constant_PROPERTY_HINT_RANGE:
  1858. .. rst-class:: classref-enumeration-constant
  1859. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_RANGE** = ``1``
  1860. 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.
  1861. \ **Example:** ``"-360,360,1,or_greater,or_less"``.
  1862. 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.
  1863. .. _class_@GlobalScope_constant_PROPERTY_HINT_ENUM:
  1864. .. rst-class:: classref-enumeration-constant
  1865. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_ENUM** = ``2``
  1866. 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.
  1867. 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"``.
  1868. .. _class_@GlobalScope_constant_PROPERTY_HINT_ENUM_SUGGESTION:
  1869. .. rst-class:: classref-enumeration-constant
  1870. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_ENUM_SUGGESTION** = ``3``
  1871. 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"``.
  1872. 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.
  1873. .. _class_@GlobalScope_constant_PROPERTY_HINT_EXP_EASING:
  1874. .. rst-class:: classref-enumeration-constant
  1875. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_EXP_EASING** = ``4``
  1876. 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.
  1877. .. _class_@GlobalScope_constant_PROPERTY_HINT_LINK:
  1878. .. rst-class:: classref-enumeration-constant
  1879. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_LINK** = ``5``
  1880. 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.
  1881. .. _class_@GlobalScope_constant_PROPERTY_HINT_FLAGS:
  1882. .. rst-class:: classref-enumeration-constant
  1883. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_FLAGS** = ``6``
  1884. Hints that an :ref:`int<class_int>` property is a bitmask with named bit flags.
  1885. 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"``).
  1886. \ **Note:** A flag value must be at least ``1`` and at most ``2 ** 32 - 1``.
  1887. \ **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.
  1888. .. _class_@GlobalScope_constant_PROPERTY_HINT_LAYERS_2D_RENDER:
  1889. .. rst-class:: classref-enumeration-constant
  1890. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_LAYERS_2D_RENDER** = ``7``
  1891. Hints that an :ref:`int<class_int>` property is a bitmask using the optionally named 2D render layers.
  1892. .. _class_@GlobalScope_constant_PROPERTY_HINT_LAYERS_2D_PHYSICS:
  1893. .. rst-class:: classref-enumeration-constant
  1894. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_LAYERS_2D_PHYSICS** = ``8``
  1895. Hints that an :ref:`int<class_int>` property is a bitmask using the optionally named 2D physics layers.
  1896. .. _class_@GlobalScope_constant_PROPERTY_HINT_LAYERS_2D_NAVIGATION:
  1897. .. rst-class:: classref-enumeration-constant
  1898. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_LAYERS_2D_NAVIGATION** = ``9``
  1899. Hints that an :ref:`int<class_int>` property is a bitmask using the optionally named 2D navigation layers.
  1900. .. _class_@GlobalScope_constant_PROPERTY_HINT_LAYERS_3D_RENDER:
  1901. .. rst-class:: classref-enumeration-constant
  1902. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_LAYERS_3D_RENDER** = ``10``
  1903. Hints that an :ref:`int<class_int>` property is a bitmask using the optionally named 3D render layers.
  1904. .. _class_@GlobalScope_constant_PROPERTY_HINT_LAYERS_3D_PHYSICS:
  1905. .. rst-class:: classref-enumeration-constant
  1906. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_LAYERS_3D_PHYSICS** = ``11``
  1907. Hints that an :ref:`int<class_int>` property is a bitmask using the optionally named 3D physics layers.
  1908. .. _class_@GlobalScope_constant_PROPERTY_HINT_LAYERS_3D_NAVIGATION:
  1909. .. rst-class:: classref-enumeration-constant
  1910. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_LAYERS_3D_NAVIGATION** = ``12``
  1911. Hints that an :ref:`int<class_int>` property is a bitmask using the optionally named 3D navigation layers.
  1912. .. _class_@GlobalScope_constant_PROPERTY_HINT_LAYERS_AVOIDANCE:
  1913. .. rst-class:: classref-enumeration-constant
  1914. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_LAYERS_AVOIDANCE** = ``37``
  1915. Hints that an integer property is a bitmask using the optionally named avoidance layers.
  1916. .. _class_@GlobalScope_constant_PROPERTY_HINT_FILE:
  1917. .. rst-class:: classref-enumeration-constant
  1918. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_FILE** = ``13``
  1919. 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"``.
  1920. .. _class_@GlobalScope_constant_PROPERTY_HINT_DIR:
  1921. .. rst-class:: classref-enumeration-constant
  1922. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_DIR** = ``14``
  1923. 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.
  1924. .. _class_@GlobalScope_constant_PROPERTY_HINT_GLOBAL_FILE:
  1925. .. rst-class:: classref-enumeration-constant
  1926. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_GLOBAL_FILE** = ``15``
  1927. 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"``.
  1928. .. _class_@GlobalScope_constant_PROPERTY_HINT_GLOBAL_DIR:
  1929. .. rst-class:: classref-enumeration-constant
  1930. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_GLOBAL_DIR** = ``16``
  1931. 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.
  1932. .. _class_@GlobalScope_constant_PROPERTY_HINT_RESOURCE_TYPE:
  1933. .. rst-class:: classref-enumeration-constant
  1934. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_RESOURCE_TYPE** = ``17``
  1935. 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.
  1936. .. _class_@GlobalScope_constant_PROPERTY_HINT_MULTILINE_TEXT:
  1937. .. rst-class:: classref-enumeration-constant
  1938. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_MULTILINE_TEXT** = ``18``
  1939. 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.
  1940. .. _class_@GlobalScope_constant_PROPERTY_HINT_EXPRESSION:
  1941. .. rst-class:: classref-enumeration-constant
  1942. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_EXPRESSION** = ``19``
  1943. Hints that a :ref:`String<class_String>` property is an :ref:`Expression<class_Expression>`.
  1944. .. _class_@GlobalScope_constant_PROPERTY_HINT_PLACEHOLDER_TEXT:
  1945. .. rst-class:: classref-enumeration-constant
  1946. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_PLACEHOLDER_TEXT** = ``20``
  1947. 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.
  1948. .. _class_@GlobalScope_constant_PROPERTY_HINT_COLOR_NO_ALPHA:
  1949. .. rst-class:: classref-enumeration-constant
  1950. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_COLOR_NO_ALPHA** = ``21``
  1951. 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).
  1952. .. _class_@GlobalScope_constant_PROPERTY_HINT_OBJECT_ID:
  1953. .. rst-class:: classref-enumeration-constant
  1954. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_OBJECT_ID** = ``22``
  1955. .. _class_@GlobalScope_constant_PROPERTY_HINT_TYPE_STRING:
  1956. .. rst-class:: classref-enumeration-constant
  1957. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_TYPE_STRING** = ``23``
  1958. 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.
  1959. If a property is :ref:`Array<class_Array>`, hints the editor how to show elements. The ``hint_string`` must encode nested types using ``":"`` and ``"/"``.
  1960. .. tabs::
  1961. .. code-tab:: gdscript
  1962. # Array of elem_type.
  1963. hint_string = "%d:" % [elem_type]
  1964. hint_string = "%d/%d:%s" % [elem_type, elem_hint, elem_hint_string]
  1965. # Two-dimensional array of elem_type (array of arrays of elem_type).
  1966. hint_string = "%d:%d:" % [TYPE_ARRAY, elem_type]
  1967. hint_string = "%d:%d/%d:%s" % [TYPE_ARRAY, elem_type, elem_hint, elem_hint_string]
  1968. # Three-dimensional array of elem_type (array of arrays of arrays of elem_type).
  1969. hint_string = "%d:%d:%d:" % [TYPE_ARRAY, TYPE_ARRAY, elem_type]
  1970. hint_string = "%d:%d:%d/%d:%s" % [TYPE_ARRAY, TYPE_ARRAY, elem_type, elem_hint, elem_hint_string]
  1971. .. code-tab:: csharp
  1972. // Array of elemType.
  1973. hintString = $"{elemType:D}:";
  1974. hintString = $"{elemType:}/{elemHint:D}:{elemHintString}";
  1975. // Two-dimensional array of elemType (array of arrays of elemType).
  1976. hintString = $"{Variant.Type.Array:D}:{elemType:D}:";
  1977. hintString = $"{Variant.Type.Array:D}:{elemType:D}/{elemHint:D}:{elemHintString}";
  1978. // Three-dimensional array of elemType (array of arrays of arrays of elemType).
  1979. hintString = $"{Variant.Type.Array:D}:{Variant.Type.Array:D}:{elemType:D}:";
  1980. hintString = $"{Variant.Type.Array:D}:{Variant.Type.Array:D}:{elemType:D}/{elemHint:D}:{elemHintString}";
  1981. Examples:
  1982. .. tabs::
  1983. .. code-tab:: gdscript
  1984. hint_string = "%d:" % [TYPE_INT] # Array of integers.
  1985. hint_string = "%d/%d:1,10,1" % [TYPE_INT, PROPERTY_HINT_RANGE] # Array of integers (in range from 1 to 10).
  1986. hint_string = "%d/%d:Zero,One,Two" % [TYPE_INT, PROPERTY_HINT_ENUM] # Array of integers (an enum).
  1987. hint_string = "%d/%d:Zero,One,Three:3,Six:6" % [TYPE_INT, PROPERTY_HINT_ENUM] # Array of integers (an enum).
  1988. hint_string = "%d/%d:*.png" % [TYPE_STRING, PROPERTY_HINT_FILE] # Array of strings (file paths).
  1989. hint_string = "%d/%d:Texture2D" % [TYPE_OBJECT, PROPERTY_HINT_RESOURCE_TYPE] # Array of textures.
  1990. hint_string = "%d:%d:" % [TYPE_ARRAY, TYPE_FLOAT] # Two-dimensional array of floats.
  1991. hint_string = "%d:%d/%d:" % [TYPE_ARRAY, TYPE_STRING, PROPERTY_HINT_MULTILINE_TEXT] # Two-dimensional array of multiline strings.
  1992. 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).
  1993. hint_string = "%d:%d/%d:Texture2D" % [TYPE_ARRAY, TYPE_OBJECT, PROPERTY_HINT_RESOURCE_TYPE] # Two-dimensional array of textures.
  1994. .. code-tab:: csharp
  1995. hintString = $"{Variant.Type.Int:D}/{PropertyHint.Range:D}:1,10,1"; // Array of integers (in range from 1 to 10).
  1996. hintString = $"{Variant.Type.Int:D}/{PropertyHint.Enum:D}:Zero,One,Two"; // Array of integers (an enum).
  1997. hintString = $"{Variant.Type.Int:D}/{PropertyHint.Enum:D}:Zero,One,Three:3,Six:6"; // Array of integers (an enum).
  1998. hintString = $"{Variant.Type.String:D}/{PropertyHint.File:D}:*.png"; // Array of strings (file paths).
  1999. hintString = $"{Variant.Type.Object:D}/{PropertyHint.ResourceType:D}:Texture2D"; // Array of textures.
  2000. hintString = $"{Variant.Type.Array:D}:{Variant.Type.Float:D}:"; // Two-dimensional array of floats.
  2001. hintString = $"{Variant.Type.Array:D}:{Variant.Type.String:D}/{PropertyHint.MultilineText:D}:"; // Two-dimensional array of multiline strings.
  2002. 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).
  2003. hintString = $"{Variant.Type.Array:D}:{Variant.Type.Object:D}/{PropertyHint.ResourceType:D}:Texture2D"; // Two-dimensional array of textures.
  2004. \ **Note:** The trailing colon is required for properly detecting built-in types.
  2005. .. _class_@GlobalScope_constant_PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE:
  2006. .. rst-class:: classref-enumeration-constant
  2007. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE** = ``24``
  2008. .. _class_@GlobalScope_constant_PROPERTY_HINT_OBJECT_TOO_BIG:
  2009. .. rst-class:: classref-enumeration-constant
  2010. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_OBJECT_TOO_BIG** = ``25``
  2011. .. _class_@GlobalScope_constant_PROPERTY_HINT_NODE_PATH_VALID_TYPES:
  2012. .. rst-class:: classref-enumeration-constant
  2013. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_NODE_PATH_VALID_TYPES** = ``26``
  2014. .. _class_@GlobalScope_constant_PROPERTY_HINT_SAVE_FILE:
  2015. .. rst-class:: classref-enumeration-constant
  2016. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_SAVE_FILE** = ``27``
  2017. .. _class_@GlobalScope_constant_PROPERTY_HINT_GLOBAL_SAVE_FILE:
  2018. .. rst-class:: classref-enumeration-constant
  2019. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_GLOBAL_SAVE_FILE** = ``28``
  2020. .. _class_@GlobalScope_constant_PROPERTY_HINT_INT_IS_OBJECTID:
  2021. .. rst-class:: classref-enumeration-constant
  2022. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_INT_IS_OBJECTID** = ``29``
  2023. .. _class_@GlobalScope_constant_PROPERTY_HINT_INT_IS_POINTER:
  2024. .. rst-class:: classref-enumeration-constant
  2025. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_INT_IS_POINTER** = ``30``
  2026. .. _class_@GlobalScope_constant_PROPERTY_HINT_ARRAY_TYPE:
  2027. .. rst-class:: classref-enumeration-constant
  2028. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_ARRAY_TYPE** = ``31``
  2029. .. _class_@GlobalScope_constant_PROPERTY_HINT_LOCALE_ID:
  2030. .. rst-class:: classref-enumeration-constant
  2031. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_LOCALE_ID** = ``32``
  2032. Hints that a string property is a locale code. Editing it will show a locale dialog for picking language and country.
  2033. .. _class_@GlobalScope_constant_PROPERTY_HINT_LOCALIZABLE_STRING:
  2034. .. rst-class:: classref-enumeration-constant
  2035. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_LOCALIZABLE_STRING** = ``33``
  2036. Hints that a dictionary property is string translation map. Dictionary keys are locale codes and, values are translated strings.
  2037. .. _class_@GlobalScope_constant_PROPERTY_HINT_NODE_TYPE:
  2038. .. rst-class:: classref-enumeration-constant
  2039. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_NODE_TYPE** = ``34``
  2040. .. _class_@GlobalScope_constant_PROPERTY_HINT_HIDE_QUATERNION_EDIT:
  2041. .. rst-class:: classref-enumeration-constant
  2042. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_HIDE_QUATERNION_EDIT** = ``35``
  2043. Hints that a quaternion property should disable the temporary euler editor.
  2044. .. _class_@GlobalScope_constant_PROPERTY_HINT_PASSWORD:
  2045. .. rst-class:: classref-enumeration-constant
  2046. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_PASSWORD** = ``36``
  2047. Hints that a string property is a password, and every character is replaced with the secret character.
  2048. .. _class_@GlobalScope_constant_PROPERTY_HINT_MAX:
  2049. .. rst-class:: classref-enumeration-constant
  2050. :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_MAX** = ``38``
  2051. Represents the size of the :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` enum.
  2052. .. rst-class:: classref-item-separator
  2053. ----
  2054. .. _enum_@GlobalScope_PropertyUsageFlags:
  2055. .. rst-class:: classref-enumeration
  2056. flags **PropertyUsageFlags**:
  2057. .. _class_@GlobalScope_constant_PROPERTY_USAGE_NONE:
  2058. .. rst-class:: classref-enumeration-constant
  2059. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_NONE** = ``0``
  2060. The property is not stored, and does not display in the editor. This is the default for non-exported properties.
  2061. .. _class_@GlobalScope_constant_PROPERTY_USAGE_STORAGE:
  2062. .. rst-class:: classref-enumeration-constant
  2063. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_STORAGE** = ``2``
  2064. The property is serialized and saved in the scene file (default).
  2065. .. _class_@GlobalScope_constant_PROPERTY_USAGE_EDITOR:
  2066. .. rst-class:: classref-enumeration-constant
  2067. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_EDITOR** = ``4``
  2068. The property is shown in the :ref:`EditorInspector<class_EditorInspector>` (default).
  2069. .. _class_@GlobalScope_constant_PROPERTY_USAGE_INTERNAL:
  2070. .. rst-class:: classref-enumeration-constant
  2071. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_INTERNAL** = ``8``
  2072. The property is excluded from the class reference.
  2073. .. _class_@GlobalScope_constant_PROPERTY_USAGE_CHECKABLE:
  2074. .. rst-class:: classref-enumeration-constant
  2075. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_CHECKABLE** = ``16``
  2076. The property can be checked in the :ref:`EditorInspector<class_EditorInspector>`.
  2077. .. _class_@GlobalScope_constant_PROPERTY_USAGE_CHECKED:
  2078. .. rst-class:: classref-enumeration-constant
  2079. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_CHECKED** = ``32``
  2080. The property is checked in the :ref:`EditorInspector<class_EditorInspector>`.
  2081. .. _class_@GlobalScope_constant_PROPERTY_USAGE_GROUP:
  2082. .. rst-class:: classref-enumeration-constant
  2083. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_GROUP** = ``64``
  2084. Used to group properties together in the editor. See :ref:`EditorInspector<class_EditorInspector>`.
  2085. .. _class_@GlobalScope_constant_PROPERTY_USAGE_CATEGORY:
  2086. .. rst-class:: classref-enumeration-constant
  2087. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_CATEGORY** = ``128``
  2088. Used to categorize properties together in the editor.
  2089. .. _class_@GlobalScope_constant_PROPERTY_USAGE_SUBGROUP:
  2090. .. rst-class:: classref-enumeration-constant
  2091. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_SUBGROUP** = ``256``
  2092. Used to group properties together in the editor in a subgroup (under a group). See :ref:`EditorInspector<class_EditorInspector>`.
  2093. .. _class_@GlobalScope_constant_PROPERTY_USAGE_CLASS_IS_BITFIELD:
  2094. .. rst-class:: classref-enumeration-constant
  2095. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_CLASS_IS_BITFIELD** = ``512``
  2096. .. _class_@GlobalScope_constant_PROPERTY_USAGE_NO_INSTANCE_STATE:
  2097. .. rst-class:: classref-enumeration-constant
  2098. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_NO_INSTANCE_STATE** = ``1024``
  2099. The property does not save its state in :ref:`PackedScene<class_PackedScene>`.
  2100. .. _class_@GlobalScope_constant_PROPERTY_USAGE_RESTART_IF_CHANGED:
  2101. .. rst-class:: classref-enumeration-constant
  2102. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_RESTART_IF_CHANGED** = ``2048``
  2103. Editing the property prompts the user for restarting the editor.
  2104. .. _class_@GlobalScope_constant_PROPERTY_USAGE_SCRIPT_VARIABLE:
  2105. .. rst-class:: classref-enumeration-constant
  2106. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_SCRIPT_VARIABLE** = ``4096``
  2107. The property is a script variable which should be serialized and saved in the scene file.
  2108. .. _class_@GlobalScope_constant_PROPERTY_USAGE_STORE_IF_NULL:
  2109. .. rst-class:: classref-enumeration-constant
  2110. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_STORE_IF_NULL** = ``8192``
  2111. .. _class_@GlobalScope_constant_PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED:
  2112. .. rst-class:: classref-enumeration-constant
  2113. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED** = ``16384``
  2114. .. _class_@GlobalScope_constant_PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE:
  2115. .. rst-class:: classref-enumeration-constant
  2116. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE** = ``32768``
  2117. .. _class_@GlobalScope_constant_PROPERTY_USAGE_CLASS_IS_ENUM:
  2118. .. rst-class:: classref-enumeration-constant
  2119. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_CLASS_IS_ENUM** = ``65536``
  2120. .. _class_@GlobalScope_constant_PROPERTY_USAGE_NIL_IS_VARIANT:
  2121. .. rst-class:: classref-enumeration-constant
  2122. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_NIL_IS_VARIANT** = ``131072``
  2123. .. _class_@GlobalScope_constant_PROPERTY_USAGE_ARRAY:
  2124. .. rst-class:: classref-enumeration-constant
  2125. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_ARRAY** = ``262144``
  2126. The property is an array.
  2127. .. _class_@GlobalScope_constant_PROPERTY_USAGE_ALWAYS_DUPLICATE:
  2128. .. rst-class:: classref-enumeration-constant
  2129. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_ALWAYS_DUPLICATE** = ``524288``
  2130. 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.
  2131. .. _class_@GlobalScope_constant_PROPERTY_USAGE_NEVER_DUPLICATE:
  2132. .. rst-class:: classref-enumeration-constant
  2133. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_NEVER_DUPLICATE** = ``1048576``
  2134. 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.
  2135. .. _class_@GlobalScope_constant_PROPERTY_USAGE_HIGH_END_GFX:
  2136. .. rst-class:: classref-enumeration-constant
  2137. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_HIGH_END_GFX** = ``2097152``
  2138. The property is only shown in the editor if modern renderers are supported (the Compatibility rendering method is excluded).
  2139. .. _class_@GlobalScope_constant_PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT:
  2140. .. rst-class:: classref-enumeration-constant
  2141. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT** = ``4194304``
  2142. .. _class_@GlobalScope_constant_PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT:
  2143. .. rst-class:: classref-enumeration-constant
  2144. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT** = ``8388608``
  2145. .. _class_@GlobalScope_constant_PROPERTY_USAGE_KEYING_INCREMENTS:
  2146. .. rst-class:: classref-enumeration-constant
  2147. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_KEYING_INCREMENTS** = ``16777216``
  2148. .. _class_@GlobalScope_constant_PROPERTY_USAGE_DEFERRED_SET_RESOURCE:
  2149. .. rst-class:: classref-enumeration-constant
  2150. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_DEFERRED_SET_RESOURCE** = ``33554432``
  2151. .. _class_@GlobalScope_constant_PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT:
  2152. .. rst-class:: classref-enumeration-constant
  2153. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT** = ``67108864``
  2154. .. _class_@GlobalScope_constant_PROPERTY_USAGE_EDITOR_BASIC_SETTING:
  2155. .. rst-class:: classref-enumeration-constant
  2156. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_EDITOR_BASIC_SETTING** = ``134217728``
  2157. .. _class_@GlobalScope_constant_PROPERTY_USAGE_READ_ONLY:
  2158. .. rst-class:: classref-enumeration-constant
  2159. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_READ_ONLY** = ``268435456``
  2160. The property is read-only in the :ref:`EditorInspector<class_EditorInspector>`.
  2161. .. _class_@GlobalScope_constant_PROPERTY_USAGE_SECRET:
  2162. .. rst-class:: classref-enumeration-constant
  2163. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_SECRET** = ``536870912``
  2164. An export preset property with this flag contains confidential information and is stored separately from the rest of the export preset configuration.
  2165. .. _class_@GlobalScope_constant_PROPERTY_USAGE_DEFAULT:
  2166. .. rst-class:: classref-enumeration-constant
  2167. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_DEFAULT** = ``6``
  2168. Default usage (storage and editor).
  2169. .. _class_@GlobalScope_constant_PROPERTY_USAGE_NO_EDITOR:
  2170. .. rst-class:: classref-enumeration-constant
  2171. :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_NO_EDITOR** = ``2``
  2172. Default usage but without showing the property in the editor (storage).
  2173. .. rst-class:: classref-item-separator
  2174. ----
  2175. .. _enum_@GlobalScope_MethodFlags:
  2176. .. rst-class:: classref-enumeration
  2177. flags **MethodFlags**:
  2178. .. _class_@GlobalScope_constant_METHOD_FLAG_NORMAL:
  2179. .. rst-class:: classref-enumeration-constant
  2180. :ref:`MethodFlags<enum_@GlobalScope_MethodFlags>` **METHOD_FLAG_NORMAL** = ``1``
  2181. Flag for a normal method.
  2182. .. _class_@GlobalScope_constant_METHOD_FLAG_EDITOR:
  2183. .. rst-class:: classref-enumeration-constant
  2184. :ref:`MethodFlags<enum_@GlobalScope_MethodFlags>` **METHOD_FLAG_EDITOR** = ``2``
  2185. Flag for an editor method.
  2186. .. _class_@GlobalScope_constant_METHOD_FLAG_CONST:
  2187. .. rst-class:: classref-enumeration-constant
  2188. :ref:`MethodFlags<enum_@GlobalScope_MethodFlags>` **METHOD_FLAG_CONST** = ``4``
  2189. Flag for a constant method.
  2190. .. _class_@GlobalScope_constant_METHOD_FLAG_VIRTUAL:
  2191. .. rst-class:: classref-enumeration-constant
  2192. :ref:`MethodFlags<enum_@GlobalScope_MethodFlags>` **METHOD_FLAG_VIRTUAL** = ``8``
  2193. Flag for a virtual method.
  2194. .. _class_@GlobalScope_constant_METHOD_FLAG_VARARG:
  2195. .. rst-class:: classref-enumeration-constant
  2196. :ref:`MethodFlags<enum_@GlobalScope_MethodFlags>` **METHOD_FLAG_VARARG** = ``16``
  2197. Flag for a method with a variable number of arguments.
  2198. .. _class_@GlobalScope_constant_METHOD_FLAG_STATIC:
  2199. .. rst-class:: classref-enumeration-constant
  2200. :ref:`MethodFlags<enum_@GlobalScope_MethodFlags>` **METHOD_FLAG_STATIC** = ``32``
  2201. Flag for a static method.
  2202. .. _class_@GlobalScope_constant_METHOD_FLAG_OBJECT_CORE:
  2203. .. rst-class:: classref-enumeration-constant
  2204. :ref:`MethodFlags<enum_@GlobalScope_MethodFlags>` **METHOD_FLAG_OBJECT_CORE** = ``64``
  2205. Used internally. Allows to not dump core virtual methods (such as :ref:`Object._notification<class_Object_method__notification>`) to the JSON API.
  2206. .. _class_@GlobalScope_constant_METHOD_FLAGS_DEFAULT:
  2207. .. rst-class:: classref-enumeration-constant
  2208. :ref:`MethodFlags<enum_@GlobalScope_MethodFlags>` **METHOD_FLAGS_DEFAULT** = ``1``
  2209. Default method flags (normal).
  2210. .. rst-class:: classref-item-separator
  2211. ----
  2212. .. _enum_@GlobalScope_Variant.Type:
  2213. .. rst-class:: classref-enumeration
  2214. enum **Variant.Type**:
  2215. .. _class_@GlobalScope_constant_TYPE_NIL:
  2216. .. rst-class:: classref-enumeration-constant
  2217. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_NIL** = ``0``
  2218. Variable is ``null``.
  2219. .. _class_@GlobalScope_constant_TYPE_BOOL:
  2220. .. rst-class:: classref-enumeration-constant
  2221. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_BOOL** = ``1``
  2222. Variable is of type :ref:`bool<class_bool>`.
  2223. .. _class_@GlobalScope_constant_TYPE_INT:
  2224. .. rst-class:: classref-enumeration-constant
  2225. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_INT** = ``2``
  2226. Variable is of type :ref:`int<class_int>`.
  2227. .. _class_@GlobalScope_constant_TYPE_FLOAT:
  2228. .. rst-class:: classref-enumeration-constant
  2229. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_FLOAT** = ``3``
  2230. Variable is of type :ref:`float<class_float>`.
  2231. .. _class_@GlobalScope_constant_TYPE_STRING:
  2232. .. rst-class:: classref-enumeration-constant
  2233. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_STRING** = ``4``
  2234. Variable is of type :ref:`String<class_String>`.
  2235. .. _class_@GlobalScope_constant_TYPE_VECTOR2:
  2236. .. rst-class:: classref-enumeration-constant
  2237. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_VECTOR2** = ``5``
  2238. Variable is of type :ref:`Vector2<class_Vector2>`.
  2239. .. _class_@GlobalScope_constant_TYPE_VECTOR2I:
  2240. .. rst-class:: classref-enumeration-constant
  2241. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_VECTOR2I** = ``6``
  2242. Variable is of type :ref:`Vector2i<class_Vector2i>`.
  2243. .. _class_@GlobalScope_constant_TYPE_RECT2:
  2244. .. rst-class:: classref-enumeration-constant
  2245. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_RECT2** = ``7``
  2246. Variable is of type :ref:`Rect2<class_Rect2>`.
  2247. .. _class_@GlobalScope_constant_TYPE_RECT2I:
  2248. .. rst-class:: classref-enumeration-constant
  2249. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_RECT2I** = ``8``
  2250. Variable is of type :ref:`Rect2i<class_Rect2i>`.
  2251. .. _class_@GlobalScope_constant_TYPE_VECTOR3:
  2252. .. rst-class:: classref-enumeration-constant
  2253. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_VECTOR3** = ``9``
  2254. Variable is of type :ref:`Vector3<class_Vector3>`.
  2255. .. _class_@GlobalScope_constant_TYPE_VECTOR3I:
  2256. .. rst-class:: classref-enumeration-constant
  2257. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_VECTOR3I** = ``10``
  2258. Variable is of type :ref:`Vector3i<class_Vector3i>`.
  2259. .. _class_@GlobalScope_constant_TYPE_TRANSFORM2D:
  2260. .. rst-class:: classref-enumeration-constant
  2261. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_TRANSFORM2D** = ``11``
  2262. Variable is of type :ref:`Transform2D<class_Transform2D>`.
  2263. .. _class_@GlobalScope_constant_TYPE_VECTOR4:
  2264. .. rst-class:: classref-enumeration-constant
  2265. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_VECTOR4** = ``12``
  2266. Variable is of type :ref:`Vector4<class_Vector4>`.
  2267. .. _class_@GlobalScope_constant_TYPE_VECTOR4I:
  2268. .. rst-class:: classref-enumeration-constant
  2269. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_VECTOR4I** = ``13``
  2270. Variable is of type :ref:`Vector4i<class_Vector4i>`.
  2271. .. _class_@GlobalScope_constant_TYPE_PLANE:
  2272. .. rst-class:: classref-enumeration-constant
  2273. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_PLANE** = ``14``
  2274. Variable is of type :ref:`Plane<class_Plane>`.
  2275. .. _class_@GlobalScope_constant_TYPE_QUATERNION:
  2276. .. rst-class:: classref-enumeration-constant
  2277. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_QUATERNION** = ``15``
  2278. Variable is of type :ref:`Quaternion<class_Quaternion>`.
  2279. .. _class_@GlobalScope_constant_TYPE_AABB:
  2280. .. rst-class:: classref-enumeration-constant
  2281. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_AABB** = ``16``
  2282. Variable is of type :ref:`AABB<class_AABB>`.
  2283. .. _class_@GlobalScope_constant_TYPE_BASIS:
  2284. .. rst-class:: classref-enumeration-constant
  2285. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_BASIS** = ``17``
  2286. Variable is of type :ref:`Basis<class_Basis>`.
  2287. .. _class_@GlobalScope_constant_TYPE_TRANSFORM3D:
  2288. .. rst-class:: classref-enumeration-constant
  2289. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_TRANSFORM3D** = ``18``
  2290. Variable is of type :ref:`Transform3D<class_Transform3D>`.
  2291. .. _class_@GlobalScope_constant_TYPE_PROJECTION:
  2292. .. rst-class:: classref-enumeration-constant
  2293. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_PROJECTION** = ``19``
  2294. Variable is of type :ref:`Projection<class_Projection>`.
  2295. .. _class_@GlobalScope_constant_TYPE_COLOR:
  2296. .. rst-class:: classref-enumeration-constant
  2297. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_COLOR** = ``20``
  2298. Variable is of type :ref:`Color<class_Color>`.
  2299. .. _class_@GlobalScope_constant_TYPE_STRING_NAME:
  2300. .. rst-class:: classref-enumeration-constant
  2301. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_STRING_NAME** = ``21``
  2302. Variable is of type :ref:`StringName<class_StringName>`.
  2303. .. _class_@GlobalScope_constant_TYPE_NODE_PATH:
  2304. .. rst-class:: classref-enumeration-constant
  2305. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_NODE_PATH** = ``22``
  2306. Variable is of type :ref:`NodePath<class_NodePath>`.
  2307. .. _class_@GlobalScope_constant_TYPE_RID:
  2308. .. rst-class:: classref-enumeration-constant
  2309. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_RID** = ``23``
  2310. Variable is of type :ref:`RID<class_RID>`.
  2311. .. _class_@GlobalScope_constant_TYPE_OBJECT:
  2312. .. rst-class:: classref-enumeration-constant
  2313. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_OBJECT** = ``24``
  2314. Variable is of type :ref:`Object<class_Object>`.
  2315. .. _class_@GlobalScope_constant_TYPE_CALLABLE:
  2316. .. rst-class:: classref-enumeration-constant
  2317. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_CALLABLE** = ``25``
  2318. Variable is of type :ref:`Callable<class_Callable>`.
  2319. .. _class_@GlobalScope_constant_TYPE_SIGNAL:
  2320. .. rst-class:: classref-enumeration-constant
  2321. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_SIGNAL** = ``26``
  2322. Variable is of type :ref:`Signal<class_Signal>`.
  2323. .. _class_@GlobalScope_constant_TYPE_DICTIONARY:
  2324. .. rst-class:: classref-enumeration-constant
  2325. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_DICTIONARY** = ``27``
  2326. Variable is of type :ref:`Dictionary<class_Dictionary>`.
  2327. .. _class_@GlobalScope_constant_TYPE_ARRAY:
  2328. .. rst-class:: classref-enumeration-constant
  2329. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_ARRAY** = ``28``
  2330. Variable is of type :ref:`Array<class_Array>`.
  2331. .. _class_@GlobalScope_constant_TYPE_PACKED_BYTE_ARRAY:
  2332. .. rst-class:: classref-enumeration-constant
  2333. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_PACKED_BYTE_ARRAY** = ``29``
  2334. Variable is of type :ref:`PackedByteArray<class_PackedByteArray>`.
  2335. .. _class_@GlobalScope_constant_TYPE_PACKED_INT32_ARRAY:
  2336. .. rst-class:: classref-enumeration-constant
  2337. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_PACKED_INT32_ARRAY** = ``30``
  2338. Variable is of type :ref:`PackedInt32Array<class_PackedInt32Array>`.
  2339. .. _class_@GlobalScope_constant_TYPE_PACKED_INT64_ARRAY:
  2340. .. rst-class:: classref-enumeration-constant
  2341. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_PACKED_INT64_ARRAY** = ``31``
  2342. Variable is of type :ref:`PackedInt64Array<class_PackedInt64Array>`.
  2343. .. _class_@GlobalScope_constant_TYPE_PACKED_FLOAT32_ARRAY:
  2344. .. rst-class:: classref-enumeration-constant
  2345. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_PACKED_FLOAT32_ARRAY** = ``32``
  2346. Variable is of type :ref:`PackedFloat32Array<class_PackedFloat32Array>`.
  2347. .. _class_@GlobalScope_constant_TYPE_PACKED_FLOAT64_ARRAY:
  2348. .. rst-class:: classref-enumeration-constant
  2349. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_PACKED_FLOAT64_ARRAY** = ``33``
  2350. Variable is of type :ref:`PackedFloat64Array<class_PackedFloat64Array>`.
  2351. .. _class_@GlobalScope_constant_TYPE_PACKED_STRING_ARRAY:
  2352. .. rst-class:: classref-enumeration-constant
  2353. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_PACKED_STRING_ARRAY** = ``34``
  2354. Variable is of type :ref:`PackedStringArray<class_PackedStringArray>`.
  2355. .. _class_@GlobalScope_constant_TYPE_PACKED_VECTOR2_ARRAY:
  2356. .. rst-class:: classref-enumeration-constant
  2357. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_PACKED_VECTOR2_ARRAY** = ``35``
  2358. Variable is of type :ref:`PackedVector2Array<class_PackedVector2Array>`.
  2359. .. _class_@GlobalScope_constant_TYPE_PACKED_VECTOR3_ARRAY:
  2360. .. rst-class:: classref-enumeration-constant
  2361. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_PACKED_VECTOR3_ARRAY** = ``36``
  2362. Variable is of type :ref:`PackedVector3Array<class_PackedVector3Array>`.
  2363. .. _class_@GlobalScope_constant_TYPE_PACKED_COLOR_ARRAY:
  2364. .. rst-class:: classref-enumeration-constant
  2365. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_PACKED_COLOR_ARRAY** = ``37``
  2366. Variable is of type :ref:`PackedColorArray<class_PackedColorArray>`.
  2367. .. _class_@GlobalScope_constant_TYPE_MAX:
  2368. .. rst-class:: classref-enumeration-constant
  2369. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **TYPE_MAX** = ``38``
  2370. Represents the size of the :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` enum.
  2371. .. rst-class:: classref-item-separator
  2372. ----
  2373. .. _enum_@GlobalScope_Variant.Operator:
  2374. .. rst-class:: classref-enumeration
  2375. enum **Variant.Operator**:
  2376. .. _class_@GlobalScope_constant_OP_EQUAL:
  2377. .. rst-class:: classref-enumeration-constant
  2378. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_EQUAL** = ``0``
  2379. Equality operator (``==``).
  2380. .. _class_@GlobalScope_constant_OP_NOT_EQUAL:
  2381. .. rst-class:: classref-enumeration-constant
  2382. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_NOT_EQUAL** = ``1``
  2383. Inequality operator (``!=``).
  2384. .. _class_@GlobalScope_constant_OP_LESS:
  2385. .. rst-class:: classref-enumeration-constant
  2386. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_LESS** = ``2``
  2387. Less than operator (``<``).
  2388. .. _class_@GlobalScope_constant_OP_LESS_EQUAL:
  2389. .. rst-class:: classref-enumeration-constant
  2390. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_LESS_EQUAL** = ``3``
  2391. Less than or equal operator (``<=``).
  2392. .. _class_@GlobalScope_constant_OP_GREATER:
  2393. .. rst-class:: classref-enumeration-constant
  2394. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_GREATER** = ``4``
  2395. Greater than operator (``>``).
  2396. .. _class_@GlobalScope_constant_OP_GREATER_EQUAL:
  2397. .. rst-class:: classref-enumeration-constant
  2398. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_GREATER_EQUAL** = ``5``
  2399. Greater than or equal operator (``>=``).
  2400. .. _class_@GlobalScope_constant_OP_ADD:
  2401. .. rst-class:: classref-enumeration-constant
  2402. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_ADD** = ``6``
  2403. Addition operator (``+``).
  2404. .. _class_@GlobalScope_constant_OP_SUBTRACT:
  2405. .. rst-class:: classref-enumeration-constant
  2406. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_SUBTRACT** = ``7``
  2407. Subtraction operator (``-``).
  2408. .. _class_@GlobalScope_constant_OP_MULTIPLY:
  2409. .. rst-class:: classref-enumeration-constant
  2410. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_MULTIPLY** = ``8``
  2411. Multiplication operator (``*``).
  2412. .. _class_@GlobalScope_constant_OP_DIVIDE:
  2413. .. rst-class:: classref-enumeration-constant
  2414. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_DIVIDE** = ``9``
  2415. Division operator (``/``).
  2416. .. _class_@GlobalScope_constant_OP_NEGATE:
  2417. .. rst-class:: classref-enumeration-constant
  2418. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_NEGATE** = ``10``
  2419. Unary negation operator (``-``).
  2420. .. _class_@GlobalScope_constant_OP_POSITIVE:
  2421. .. rst-class:: classref-enumeration-constant
  2422. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_POSITIVE** = ``11``
  2423. Unary plus operator (``+``).
  2424. .. _class_@GlobalScope_constant_OP_MODULE:
  2425. .. rst-class:: classref-enumeration-constant
  2426. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_MODULE** = ``12``
  2427. Remainder/modulo operator (``%``).
  2428. .. _class_@GlobalScope_constant_OP_POWER:
  2429. .. rst-class:: classref-enumeration-constant
  2430. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_POWER** = ``13``
  2431. Power operator (``**``).
  2432. .. _class_@GlobalScope_constant_OP_SHIFT_LEFT:
  2433. .. rst-class:: classref-enumeration-constant
  2434. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_SHIFT_LEFT** = ``14``
  2435. Left shift operator (``<<``).
  2436. .. _class_@GlobalScope_constant_OP_SHIFT_RIGHT:
  2437. .. rst-class:: classref-enumeration-constant
  2438. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_SHIFT_RIGHT** = ``15``
  2439. Right shift operator (``>>``).
  2440. .. _class_@GlobalScope_constant_OP_BIT_AND:
  2441. .. rst-class:: classref-enumeration-constant
  2442. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_BIT_AND** = ``16``
  2443. Bitwise AND operator (``&``).
  2444. .. _class_@GlobalScope_constant_OP_BIT_OR:
  2445. .. rst-class:: classref-enumeration-constant
  2446. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_BIT_OR** = ``17``
  2447. Bitwise OR operator (``|``).
  2448. .. _class_@GlobalScope_constant_OP_BIT_XOR:
  2449. .. rst-class:: classref-enumeration-constant
  2450. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_BIT_XOR** = ``18``
  2451. Bitwise XOR operator (``^``).
  2452. .. _class_@GlobalScope_constant_OP_BIT_NEGATE:
  2453. .. rst-class:: classref-enumeration-constant
  2454. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_BIT_NEGATE** = ``19``
  2455. Bitwise NOT operator (``~``).
  2456. .. _class_@GlobalScope_constant_OP_AND:
  2457. .. rst-class:: classref-enumeration-constant
  2458. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_AND** = ``20``
  2459. Logical AND operator (``and`` or ``&&``).
  2460. .. _class_@GlobalScope_constant_OP_OR:
  2461. .. rst-class:: classref-enumeration-constant
  2462. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_OR** = ``21``
  2463. Logical OR operator (``or`` or ``||``).
  2464. .. _class_@GlobalScope_constant_OP_XOR:
  2465. .. rst-class:: classref-enumeration-constant
  2466. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_XOR** = ``22``
  2467. Logical XOR operator (not implemented in GDScript).
  2468. .. _class_@GlobalScope_constant_OP_NOT:
  2469. .. rst-class:: classref-enumeration-constant
  2470. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_NOT** = ``23``
  2471. Logical NOT operator (``not`` or ``!``).
  2472. .. _class_@GlobalScope_constant_OP_IN:
  2473. .. rst-class:: classref-enumeration-constant
  2474. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_IN** = ``24``
  2475. Logical IN operator (``in``).
  2476. .. _class_@GlobalScope_constant_OP_MAX:
  2477. .. rst-class:: classref-enumeration-constant
  2478. :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` **OP_MAX** = ``25``
  2479. Represents the size of the :ref:`Variant.Operator<enum_@GlobalScope_Variant.Operator>` enum.
  2480. .. rst-class:: classref-section-separator
  2481. ----
  2482. .. rst-class:: classref-descriptions-group
  2483. Property Descriptions
  2484. ---------------------
  2485. .. _class_@GlobalScope_property_AudioServer:
  2486. .. rst-class:: classref-property
  2487. :ref:`AudioServer<class_AudioServer>` **AudioServer**
  2488. The :ref:`AudioServer<class_AudioServer>` singleton.
  2489. .. rst-class:: classref-item-separator
  2490. ----
  2491. .. _class_@GlobalScope_property_CameraServer:
  2492. .. rst-class:: classref-property
  2493. :ref:`CameraServer<class_CameraServer>` **CameraServer**
  2494. The :ref:`CameraServer<class_CameraServer>` singleton.
  2495. .. rst-class:: classref-item-separator
  2496. ----
  2497. .. _class_@GlobalScope_property_ClassDB:
  2498. .. rst-class:: classref-property
  2499. :ref:`ClassDB<class_ClassDB>` **ClassDB**
  2500. The :ref:`ClassDB<class_ClassDB>` singleton.
  2501. .. rst-class:: classref-item-separator
  2502. ----
  2503. .. _class_@GlobalScope_property_DisplayServer:
  2504. .. rst-class:: classref-property
  2505. :ref:`DisplayServer<class_DisplayServer>` **DisplayServer**
  2506. The :ref:`DisplayServer<class_DisplayServer>` singleton.
  2507. .. rst-class:: classref-item-separator
  2508. ----
  2509. .. _class_@GlobalScope_property_Engine:
  2510. .. rst-class:: classref-property
  2511. :ref:`Engine<class_Engine>` **Engine**
  2512. The :ref:`Engine<class_Engine>` singleton.
  2513. .. rst-class:: classref-item-separator
  2514. ----
  2515. .. _class_@GlobalScope_property_EngineDebugger:
  2516. .. rst-class:: classref-property
  2517. :ref:`EngineDebugger<class_EngineDebugger>` **EngineDebugger**
  2518. The :ref:`EngineDebugger<class_EngineDebugger>` singleton.
  2519. .. rst-class:: classref-item-separator
  2520. ----
  2521. .. _class_@GlobalScope_property_GDExtensionManager:
  2522. .. rst-class:: classref-property
  2523. :ref:`GDExtensionManager<class_GDExtensionManager>` **GDExtensionManager**
  2524. The :ref:`GDExtensionManager<class_GDExtensionManager>` singleton.
  2525. .. rst-class:: classref-item-separator
  2526. ----
  2527. .. _class_@GlobalScope_property_Geometry2D:
  2528. .. rst-class:: classref-property
  2529. :ref:`Geometry2D<class_Geometry2D>` **Geometry2D**
  2530. The :ref:`Geometry2D<class_Geometry2D>` singleton.
  2531. .. rst-class:: classref-item-separator
  2532. ----
  2533. .. _class_@GlobalScope_property_Geometry3D:
  2534. .. rst-class:: classref-property
  2535. :ref:`Geometry3D<class_Geometry3D>` **Geometry3D**
  2536. The :ref:`Geometry3D<class_Geometry3D>` singleton.
  2537. .. rst-class:: classref-item-separator
  2538. ----
  2539. .. _class_@GlobalScope_property_GodotSharp:
  2540. .. rst-class:: classref-property
  2541. :ref:`GodotSharp<class_GodotSharp>` **GodotSharp**
  2542. The :ref:`GodotSharp<class_GodotSharp>` singleton.
  2543. .. rst-class:: classref-item-separator
  2544. ----
  2545. .. _class_@GlobalScope_property_IP:
  2546. .. rst-class:: classref-property
  2547. :ref:`IP<class_IP>` **IP**
  2548. The :ref:`IP<class_IP>` singleton.
  2549. .. rst-class:: classref-item-separator
  2550. ----
  2551. .. _class_@GlobalScope_property_Input:
  2552. .. rst-class:: classref-property
  2553. :ref:`Input<class_Input>` **Input**
  2554. The :ref:`Input<class_Input>` singleton.
  2555. .. rst-class:: classref-item-separator
  2556. ----
  2557. .. _class_@GlobalScope_property_InputMap:
  2558. .. rst-class:: classref-property
  2559. :ref:`InputMap<class_InputMap>` **InputMap**
  2560. The :ref:`InputMap<class_InputMap>` singleton.
  2561. .. rst-class:: classref-item-separator
  2562. ----
  2563. .. _class_@GlobalScope_property_JavaClassWrapper:
  2564. .. rst-class:: classref-property
  2565. :ref:`JavaClassWrapper<class_JavaClassWrapper>` **JavaClassWrapper**
  2566. The :ref:`JavaClassWrapper<class_JavaClassWrapper>` singleton.
  2567. \ **Note:** Only implemented on Android.
  2568. .. rst-class:: classref-item-separator
  2569. ----
  2570. .. _class_@GlobalScope_property_JavaScriptBridge:
  2571. .. rst-class:: classref-property
  2572. :ref:`JavaScriptBridge<class_JavaScriptBridge>` **JavaScriptBridge**
  2573. The :ref:`JavaScriptBridge<class_JavaScriptBridge>` singleton.
  2574. \ **Note:** Only implemented on the Web platform.
  2575. .. rst-class:: classref-item-separator
  2576. ----
  2577. .. _class_@GlobalScope_property_Marshalls:
  2578. .. rst-class:: classref-property
  2579. :ref:`Marshalls<class_Marshalls>` **Marshalls**
  2580. The :ref:`Marshalls<class_Marshalls>` singleton.
  2581. .. rst-class:: classref-item-separator
  2582. ----
  2583. .. _class_@GlobalScope_property_NavigationMeshGenerator:
  2584. .. rst-class:: classref-property
  2585. :ref:`NavigationMeshGenerator<class_NavigationMeshGenerator>` **NavigationMeshGenerator**
  2586. The :ref:`NavigationMeshGenerator<class_NavigationMeshGenerator>` singleton.
  2587. .. rst-class:: classref-item-separator
  2588. ----
  2589. .. _class_@GlobalScope_property_NavigationServer2D:
  2590. .. rst-class:: classref-property
  2591. :ref:`NavigationServer2D<class_NavigationServer2D>` **NavigationServer2D**
  2592. The :ref:`NavigationServer2D<class_NavigationServer2D>` singleton.
  2593. .. rst-class:: classref-item-separator
  2594. ----
  2595. .. _class_@GlobalScope_property_NavigationServer3D:
  2596. .. rst-class:: classref-property
  2597. :ref:`NavigationServer3D<class_NavigationServer3D>` **NavigationServer3D**
  2598. The :ref:`NavigationServer3D<class_NavigationServer3D>` singleton.
  2599. .. rst-class:: classref-item-separator
  2600. ----
  2601. .. _class_@GlobalScope_property_OS:
  2602. .. rst-class:: classref-property
  2603. :ref:`OS<class_OS>` **OS**
  2604. The :ref:`OS<class_OS>` singleton.
  2605. .. rst-class:: classref-item-separator
  2606. ----
  2607. .. _class_@GlobalScope_property_Performance:
  2608. .. rst-class:: classref-property
  2609. :ref:`Performance<class_Performance>` **Performance**
  2610. The :ref:`Performance<class_Performance>` singleton.
  2611. .. rst-class:: classref-item-separator
  2612. ----
  2613. .. _class_@GlobalScope_property_PhysicsServer2D:
  2614. .. rst-class:: classref-property
  2615. :ref:`PhysicsServer2D<class_PhysicsServer2D>` **PhysicsServer2D**
  2616. The :ref:`PhysicsServer2D<class_PhysicsServer2D>` singleton.
  2617. .. rst-class:: classref-item-separator
  2618. ----
  2619. .. _class_@GlobalScope_property_PhysicsServer2DManager:
  2620. .. rst-class:: classref-property
  2621. :ref:`PhysicsServer2DManager<class_PhysicsServer2DManager>` **PhysicsServer2DManager**
  2622. The :ref:`PhysicsServer2DManager<class_PhysicsServer2DManager>` singleton.
  2623. .. rst-class:: classref-item-separator
  2624. ----
  2625. .. _class_@GlobalScope_property_PhysicsServer3D:
  2626. .. rst-class:: classref-property
  2627. :ref:`PhysicsServer3D<class_PhysicsServer3D>` **PhysicsServer3D**
  2628. The :ref:`PhysicsServer3D<class_PhysicsServer3D>` singleton.
  2629. .. rst-class:: classref-item-separator
  2630. ----
  2631. .. _class_@GlobalScope_property_PhysicsServer3DManager:
  2632. .. rst-class:: classref-property
  2633. :ref:`PhysicsServer3DManager<class_PhysicsServer3DManager>` **PhysicsServer3DManager**
  2634. The :ref:`PhysicsServer3DManager<class_PhysicsServer3DManager>` singleton.
  2635. .. rst-class:: classref-item-separator
  2636. ----
  2637. .. _class_@GlobalScope_property_ProjectSettings:
  2638. .. rst-class:: classref-property
  2639. :ref:`ProjectSettings<class_ProjectSettings>` **ProjectSettings**
  2640. The :ref:`ProjectSettings<class_ProjectSettings>` singleton.
  2641. .. rst-class:: classref-item-separator
  2642. ----
  2643. .. _class_@GlobalScope_property_RenderingServer:
  2644. .. rst-class:: classref-property
  2645. :ref:`RenderingServer<class_RenderingServer>` **RenderingServer**
  2646. The :ref:`RenderingServer<class_RenderingServer>` singleton.
  2647. .. rst-class:: classref-item-separator
  2648. ----
  2649. .. _class_@GlobalScope_property_ResourceLoader:
  2650. .. rst-class:: classref-property
  2651. :ref:`ResourceLoader<class_ResourceLoader>` **ResourceLoader**
  2652. The :ref:`ResourceLoader<class_ResourceLoader>` singleton.
  2653. .. rst-class:: classref-item-separator
  2654. ----
  2655. .. _class_@GlobalScope_property_ResourceSaver:
  2656. .. rst-class:: classref-property
  2657. :ref:`ResourceSaver<class_ResourceSaver>` **ResourceSaver**
  2658. The :ref:`ResourceSaver<class_ResourceSaver>` singleton.
  2659. .. rst-class:: classref-item-separator
  2660. ----
  2661. .. _class_@GlobalScope_property_ResourceUID:
  2662. .. rst-class:: classref-property
  2663. :ref:`ResourceUID<class_ResourceUID>` **ResourceUID**
  2664. The :ref:`ResourceUID<class_ResourceUID>` singleton.
  2665. .. rst-class:: classref-item-separator
  2666. ----
  2667. .. _class_@GlobalScope_property_TextServerManager:
  2668. .. rst-class:: classref-property
  2669. :ref:`TextServerManager<class_TextServerManager>` **TextServerManager**
  2670. The :ref:`TextServerManager<class_TextServerManager>` singleton.
  2671. .. rst-class:: classref-item-separator
  2672. ----
  2673. .. _class_@GlobalScope_property_ThemeDB:
  2674. .. rst-class:: classref-property
  2675. :ref:`ThemeDB<class_ThemeDB>` **ThemeDB**
  2676. The :ref:`ThemeDB<class_ThemeDB>` singleton.
  2677. .. rst-class:: classref-item-separator
  2678. ----
  2679. .. _class_@GlobalScope_property_Time:
  2680. .. rst-class:: classref-property
  2681. :ref:`Time<class_Time>` **Time**
  2682. The :ref:`Time<class_Time>` singleton.
  2683. .. rst-class:: classref-item-separator
  2684. ----
  2685. .. _class_@GlobalScope_property_TranslationServer:
  2686. .. rst-class:: classref-property
  2687. :ref:`TranslationServer<class_TranslationServer>` **TranslationServer**
  2688. The :ref:`TranslationServer<class_TranslationServer>` singleton.
  2689. .. rst-class:: classref-item-separator
  2690. ----
  2691. .. _class_@GlobalScope_property_WorkerThreadPool:
  2692. .. rst-class:: classref-property
  2693. :ref:`WorkerThreadPool<class_WorkerThreadPool>` **WorkerThreadPool**
  2694. The :ref:`WorkerThreadPool<class_WorkerThreadPool>` singleton.
  2695. .. rst-class:: classref-item-separator
  2696. ----
  2697. .. _class_@GlobalScope_property_XRServer:
  2698. .. rst-class:: classref-property
  2699. :ref:`XRServer<class_XRServer>` **XRServer**
  2700. The :ref:`XRServer<class_XRServer>` singleton.
  2701. .. rst-class:: classref-section-separator
  2702. ----
  2703. .. rst-class:: classref-descriptions-group
  2704. Method Descriptions
  2705. -------------------
  2706. .. _class_@GlobalScope_method_abs:
  2707. .. rst-class:: classref-method
  2708. :ref:`Variant<class_Variant>` **abs** **(** :ref:`Variant<class_Variant>` x **)**
  2709. 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>`.
  2710. ::
  2711. var a = abs(-1)
  2712. # a is 1
  2713. var b = abs(-1.2)
  2714. # b is 1.2
  2715. var c = abs(Vector2(-3.5, -4))
  2716. # c is (3.5, 4)
  2717. var d = abs(Vector2i(-5, -6))
  2718. # d is (5, 6)
  2719. var e = abs(Vector3(-7, 8.5, -3.8))
  2720. # e is (7, 8.5, 3.8)
  2721. var f = abs(Vector3i(-7, -8, -9))
  2722. # f is (7, 8, 9)
  2723. \ **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>`.
  2724. .. rst-class:: classref-item-separator
  2725. ----
  2726. .. _class_@GlobalScope_method_absf:
  2727. .. rst-class:: classref-method
  2728. :ref:`float<class_float>` **absf** **(** :ref:`float<class_float>` x **)**
  2729. Returns the absolute value of float parameter ``x`` (i.e. positive value).
  2730. ::
  2731. # a is 1.2
  2732. var a = absf(-1.2)
  2733. .. rst-class:: classref-item-separator
  2734. ----
  2735. .. _class_@GlobalScope_method_absi:
  2736. .. rst-class:: classref-method
  2737. :ref:`int<class_int>` **absi** **(** :ref:`int<class_int>` x **)**
  2738. Returns the absolute value of int parameter ``x`` (i.e. positive value).
  2739. ::
  2740. # a is 1
  2741. var a = absi(-1)
  2742. .. rst-class:: classref-item-separator
  2743. ----
  2744. .. _class_@GlobalScope_method_acos:
  2745. .. rst-class:: classref-method
  2746. :ref:`float<class_float>` **acos** **(** :ref:`float<class_float>` x **)**
  2747. 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>`.
  2748. ::
  2749. # c is 0.523599 or 30 degrees if converted with rad_to_deg(c)
  2750. var c = acos(0.866025)
  2751. .. rst-class:: classref-item-separator
  2752. ----
  2753. .. _class_@GlobalScope_method_asin:
  2754. .. rst-class:: classref-method
  2755. :ref:`float<class_float>` **asin** **(** :ref:`float<class_float>` x **)**
  2756. 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>`.
  2757. ::
  2758. # s is 0.523599 or 30 degrees if converted with rad_to_deg(s)
  2759. var s = asin(0.5)
  2760. .. rst-class:: classref-item-separator
  2761. ----
  2762. .. _class_@GlobalScope_method_atan:
  2763. .. rst-class:: classref-method
  2764. :ref:`float<class_float>` **atan** **(** :ref:`float<class_float>` x **)**
  2765. Returns the arc tangent of ``x`` in radians. Use it to get the angle from an angle's tangent in trigonometry.
  2766. 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``.
  2767. ::
  2768. var a = atan(0.5) # a is 0.463648
  2769. If ``x`` is between ``-PI / 2`` and ``PI / 2`` (inclusive), ``atan(tan(x))`` is equal to ``x``.
  2770. .. rst-class:: classref-item-separator
  2771. ----
  2772. .. _class_@GlobalScope_method_atan2:
  2773. .. rst-class:: classref-method
  2774. :ref:`float<class_float>` **atan2** **(** :ref:`float<class_float>` y, :ref:`float<class_float>` x **)**
  2775. 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.
  2776. Important note: The Y coordinate comes first, by convention.
  2777. ::
  2778. var a = atan2(0, -1) # a is 3.141593
  2779. .. rst-class:: classref-item-separator
  2780. ----
  2781. .. _class_@GlobalScope_method_bezier_derivative:
  2782. .. rst-class:: classref-method
  2783. :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 **)**
  2784. 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.
  2785. .. rst-class:: classref-item-separator
  2786. ----
  2787. .. _class_@GlobalScope_method_bezier_interpolate:
  2788. .. rst-class:: classref-method
  2789. :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 **)**
  2790. 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.
  2791. .. rst-class:: classref-item-separator
  2792. ----
  2793. .. _class_@GlobalScope_method_bytes_to_var:
  2794. .. rst-class:: classref-method
  2795. :ref:`Variant<class_Variant>` **bytes_to_var** **(** :ref:`PackedByteArray<class_PackedByteArray>` bytes **)**
  2796. Decodes a byte array back to a :ref:`Variant<class_Variant>` value, without decoding objects.
  2797. \ **Note:** If you need object deserialization, see :ref:`bytes_to_var_with_objects<class_@GlobalScope_method_bytes_to_var_with_objects>`.
  2798. .. rst-class:: classref-item-separator
  2799. ----
  2800. .. _class_@GlobalScope_method_bytes_to_var_with_objects:
  2801. .. rst-class:: classref-method
  2802. :ref:`Variant<class_Variant>` **bytes_to_var_with_objects** **(** :ref:`PackedByteArray<class_PackedByteArray>` bytes **)**
  2803. Decodes a byte array back to a :ref:`Variant<class_Variant>` value. Decoding objects is allowed.
  2804. \ **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).
  2805. .. rst-class:: classref-item-separator
  2806. ----
  2807. .. _class_@GlobalScope_method_ceil:
  2808. .. rst-class:: classref-method
  2809. :ref:`Variant<class_Variant>` **ceil** **(** :ref:`Variant<class_Variant>` x **)**
  2810. 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>`.
  2811. ::
  2812. var i = ceil(1.45) # i is 2.0
  2813. i = ceil(1.001) # i is 2.0
  2814. See also :ref:`floor<class_@GlobalScope_method_floor>`, :ref:`round<class_@GlobalScope_method_round>`, and :ref:`snapped<class_@GlobalScope_method_snapped>`.
  2815. \ **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>`.
  2816. .. rst-class:: classref-item-separator
  2817. ----
  2818. .. _class_@GlobalScope_method_ceilf:
  2819. .. rst-class:: classref-method
  2820. :ref:`float<class_float>` **ceilf** **(** :ref:`float<class_float>` x **)**
  2821. Rounds ``x`` upward (towards positive infinity), returning the smallest whole number that is not less than ``x``.
  2822. A type-safe version of :ref:`ceil<class_@GlobalScope_method_ceil>`, returning a :ref:`float<class_float>`.
  2823. .. rst-class:: classref-item-separator
  2824. ----
  2825. .. _class_@GlobalScope_method_ceili:
  2826. .. rst-class:: classref-method
  2827. :ref:`int<class_int>` **ceili** **(** :ref:`float<class_float>` x **)**
  2828. Rounds ``x`` upward (towards positive infinity), returning the smallest whole number that is not less than ``x``.
  2829. A type-safe version of :ref:`ceil<class_@GlobalScope_method_ceil>`, returning an :ref:`int<class_int>`.
  2830. .. rst-class:: classref-item-separator
  2831. ----
  2832. .. _class_@GlobalScope_method_clamp:
  2833. .. rst-class:: classref-method
  2834. :ref:`Variant<class_Variant>` **clamp** **(** :ref:`Variant<class_Variant>` value, :ref:`Variant<class_Variant>` min, :ref:`Variant<class_Variant>` max **)**
  2835. 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.
  2836. ::
  2837. var a = clamp(-10, -1, 5)
  2838. # a is -1
  2839. var b = clamp(8.1, 0.9, 5.5)
  2840. # b is 5.5
  2841. var c = clamp(Vector2(-3.5, -4), Vector2(-3.2, -2), Vector2(2, 6.5))
  2842. # c is (-3.2, -2)
  2843. var d = clamp(Vector2i(7, 8), Vector2i(-3, -2), Vector2i(2, 6))
  2844. # d is (2, 6)
  2845. var e = clamp(Vector3(-7, 8.5, -3.8), Vector3(-3, -2, 5.4), Vector3(-2, 6, -4.1))
  2846. # e is (-3, -2, 5.4)
  2847. var f = clamp(Vector3i(-7, -8, -9), Vector3i(-1, 2, 3), Vector3i(-4, -5, -6))
  2848. # f is (-4, -5, -6)
  2849. \ **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>`.
  2850. .. rst-class:: classref-item-separator
  2851. ----
  2852. .. _class_@GlobalScope_method_clampf:
  2853. .. rst-class:: classref-method
  2854. :ref:`float<class_float>` **clampf** **(** :ref:`float<class_float>` value, :ref:`float<class_float>` min, :ref:`float<class_float>` max **)**
  2855. Clamps the ``value``, returning a :ref:`float<class_float>` not less than ``min`` and not more than ``max``.
  2856. ::
  2857. var speed = 42.1
  2858. var a = clampf(speed, 1.0, 20.5) # a is 20.5
  2859. speed = -10.0
  2860. var b = clampf(speed, -1.0, 1.0) # b is -1.0
  2861. .. rst-class:: classref-item-separator
  2862. ----
  2863. .. _class_@GlobalScope_method_clampi:
  2864. .. rst-class:: classref-method
  2865. :ref:`int<class_int>` **clampi** **(** :ref:`int<class_int>` value, :ref:`int<class_int>` min, :ref:`int<class_int>` max **)**
  2866. Clamps the ``value``, returning an :ref:`int<class_int>` not less than ``min`` and not more than ``max``.
  2867. ::
  2868. var speed = 42
  2869. var a = clampi(speed, 1, 20) # a is 20
  2870. speed = -10
  2871. var b = clampi(speed, -1, 1) # b is -1
  2872. .. rst-class:: classref-item-separator
  2873. ----
  2874. .. _class_@GlobalScope_method_cos:
  2875. .. rst-class:: classref-method
  2876. :ref:`float<class_float>` **cos** **(** :ref:`float<class_float>` angle_rad **)**
  2877. Returns the cosine of angle ``angle_rad`` in radians.
  2878. ::
  2879. cos(PI * 2) # Returns 1.0
  2880. cos(PI) # Returns -1.0
  2881. cos(deg_to_rad(90)) # Returns 0.0
  2882. .. rst-class:: classref-item-separator
  2883. ----
  2884. .. _class_@GlobalScope_method_cosh:
  2885. .. rst-class:: classref-method
  2886. :ref:`float<class_float>` **cosh** **(** :ref:`float<class_float>` x **)**
  2887. Returns the hyperbolic cosine of ``x`` in radians.
  2888. ::
  2889. print(cosh(1)) # Prints 1.543081
  2890. .. rst-class:: classref-item-separator
  2891. ----
  2892. .. _class_@GlobalScope_method_cubic_interpolate:
  2893. .. rst-class:: classref-method
  2894. :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 **)**
  2895. Cubic interpolates between two values by the factor defined in ``weight`` with ``pre`` and ``post`` values.
  2896. .. rst-class:: classref-item-separator
  2897. ----
  2898. .. _class_@GlobalScope_method_cubic_interpolate_angle:
  2899. .. rst-class:: classref-method
  2900. :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 **)**
  2901. 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>`.
  2902. .. rst-class:: classref-item-separator
  2903. ----
  2904. .. _class_@GlobalScope_method_cubic_interpolate_angle_in_time:
  2905. .. rst-class:: classref-method
  2906. :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 **)**
  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. It can perform smoother interpolation than ``cubic_interpolate()`` by the time values.
  2909. .. rst-class:: classref-item-separator
  2910. ----
  2911. .. _class_@GlobalScope_method_cubic_interpolate_in_time:
  2912. .. rst-class:: classref-method
  2913. :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 **)**
  2914. Cubic interpolates between two values by the factor defined in ``weight`` with ``pre`` and ``post`` values.
  2915. It can perform smoother interpolation than :ref:`cubic_interpolate<class_@GlobalScope_method_cubic_interpolate>` by the time values.
  2916. .. rst-class:: classref-item-separator
  2917. ----
  2918. .. _class_@GlobalScope_method_db_to_linear:
  2919. .. rst-class:: classref-method
  2920. :ref:`float<class_float>` **db_to_linear** **(** :ref:`float<class_float>` db **)**
  2921. Converts from decibels to linear energy (audio).
  2922. .. rst-class:: classref-item-separator
  2923. ----
  2924. .. _class_@GlobalScope_method_deg_to_rad:
  2925. .. rst-class:: classref-method
  2926. :ref:`float<class_float>` **deg_to_rad** **(** :ref:`float<class_float>` deg **)**
  2927. Converts an angle expressed in degrees to radians.
  2928. ::
  2929. var r = deg_to_rad(180) # r is 3.141593
  2930. .. rst-class:: classref-item-separator
  2931. ----
  2932. .. _class_@GlobalScope_method_ease:
  2933. .. rst-class:: classref-method
  2934. :ref:`float<class_float>` **ease** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` curve **)**
  2935. 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:
  2936. ::
  2937. - Lower than -1.0 (exclusive): Ease in-out
  2938. - 1.0: Linear
  2939. - Between -1.0 and 0.0 (exclusive): Ease out-in
  2940. - 0.0: Constant
  2941. - Between 0.0 to 1.0 (exclusive): Ease out
  2942. - 1.0: Linear
  2943. - Greater than 1.0 (exclusive): Ease in
  2944. \ `ease() curve values cheatsheet <https://raw.githubusercontent.com/godotengine/godot-docs/4.1/img/ease_cheatsheet.png>`__\
  2945. 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>`.
  2946. .. rst-class:: classref-item-separator
  2947. ----
  2948. .. _class_@GlobalScope_method_error_string:
  2949. .. rst-class:: classref-method
  2950. :ref:`String<class_String>` **error_string** **(** :ref:`int<class_int>` error **)**
  2951. Returns a human-readable name for the given :ref:`Error<enum_@GlobalScope_Error>` code.
  2952. ::
  2953. print(OK) # Prints 0
  2954. print(error_string(OK)) # Prints OK
  2955. print(error_string(ERR_BUSY)) # Prints Busy
  2956. print(error_string(ERR_OUT_OF_MEMORY)) # Prints Out of memory
  2957. .. rst-class:: classref-item-separator
  2958. ----
  2959. .. _class_@GlobalScope_method_exp:
  2960. .. rst-class:: classref-method
  2961. :ref:`float<class_float>` **exp** **(** :ref:`float<class_float>` x **)**
  2962. The natural exponential function. It raises the mathematical constant **e** to the power of ``x`` and returns it.
  2963. \ **e** has an approximate value of 2.71828, and can be obtained with ``exp(1)``.
  2964. For exponents to other bases use the method :ref:`pow<class_@GlobalScope_method_pow>`.
  2965. ::
  2966. var a = exp(2) # Approximately 7.39
  2967. .. rst-class:: classref-item-separator
  2968. ----
  2969. .. _class_@GlobalScope_method_floor:
  2970. .. rst-class:: classref-method
  2971. :ref:`Variant<class_Variant>` **floor** **(** :ref:`Variant<class_Variant>` x **)**
  2972. 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>`.
  2973. ::
  2974. var a = floor(2.99) # a is 2.0
  2975. a = floor(-2.99) # a is -3.0
  2976. See also :ref:`ceil<class_@GlobalScope_method_ceil>`, :ref:`round<class_@GlobalScope_method_round>`, and :ref:`snapped<class_@GlobalScope_method_snapped>`.
  2977. \ **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>`.
  2978. .. rst-class:: classref-item-separator
  2979. ----
  2980. .. _class_@GlobalScope_method_floorf:
  2981. .. rst-class:: classref-method
  2982. :ref:`float<class_float>` **floorf** **(** :ref:`float<class_float>` x **)**
  2983. Rounds ``x`` downward (towards negative infinity), returning the largest whole number that is not more than ``x``.
  2984. A type-safe version of :ref:`floor<class_@GlobalScope_method_floor>`, returning a :ref:`float<class_float>`.
  2985. .. rst-class:: classref-item-separator
  2986. ----
  2987. .. _class_@GlobalScope_method_floori:
  2988. .. rst-class:: classref-method
  2989. :ref:`int<class_int>` **floori** **(** :ref:`float<class_float>` x **)**
  2990. Rounds ``x`` downward (towards negative infinity), returning the largest whole number that is not more than ``x``.
  2991. A type-safe version of :ref:`floor<class_@GlobalScope_method_floor>`, returning an :ref:`int<class_int>`.
  2992. \ **Note:** This function is *not* the same as ``int(x)``, which rounds towards 0.
  2993. .. rst-class:: classref-item-separator
  2994. ----
  2995. .. _class_@GlobalScope_method_fmod:
  2996. .. rst-class:: classref-method
  2997. :ref:`float<class_float>` **fmod** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)**
  2998. Returns the floating-point remainder of ``x`` divided by ``y``, keeping the sign of ``x``.
  2999. ::
  3000. var remainder = fmod(7, 5.5) # remainder is 1.5
  3001. For the integer remainder operation, use the ``%`` operator.
  3002. .. rst-class:: classref-item-separator
  3003. ----
  3004. .. _class_@GlobalScope_method_fposmod:
  3005. .. rst-class:: classref-method
  3006. :ref:`float<class_float>` **fposmod** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)**
  3007. Returns the floating-point modulus of ``x`` divided by ``y``, wrapping equally in positive and negative.
  3008. ::
  3009. print(" (x) (fmod(x, 1.5)) (fposmod(x, 1.5))")
  3010. for i in 7:
  3011. var x = i * 0.5 - 1.5
  3012. print("%4.1f %4.1f | %4.1f" % [x, fmod(x, 1.5), fposmod(x, 1.5)])
  3013. Produces:
  3014. ::
  3015. (x) (fmod(x, 1.5)) (fposmod(x, 1.5))
  3016. -1.5 -0.0 | 0.0
  3017. -1.0 -1.0 | 0.5
  3018. -0.5 -0.5 | 1.0
  3019. 0.0 0.0 | 0.0
  3020. 0.5 0.5 | 0.5
  3021. 1.0 1.0 | 1.0
  3022. 1.5 0.0 | 0.0
  3023. .. rst-class:: classref-item-separator
  3024. ----
  3025. .. _class_@GlobalScope_method_hash:
  3026. .. rst-class:: classref-method
  3027. :ref:`int<class_int>` **hash** **(** :ref:`Variant<class_Variant>` variable **)**
  3028. Returns the integer hash of the passed ``variable``.
  3029. .. tabs::
  3030. .. code-tab:: gdscript
  3031. print(hash("a")) # Prints 177670
  3032. .. code-tab:: csharp
  3033. GD.Print(GD.Hash("a")); // Prints 177670
  3034. .. rst-class:: classref-item-separator
  3035. ----
  3036. .. _class_@GlobalScope_method_instance_from_id:
  3037. .. rst-class:: classref-method
  3038. :ref:`Object<class_Object>` **instance_from_id** **(** :ref:`int<class_int>` instance_id **)**
  3039. 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>`.
  3040. .. tabs::
  3041. .. code-tab:: gdscript
  3042. var foo = "bar"
  3043. func _ready():
  3044. var id = get_instance_id()
  3045. var inst = instance_from_id(id)
  3046. print(inst.foo) # Prints bar
  3047. .. code-tab:: csharp
  3048. public partial class MyNode : Node
  3049. {
  3050. public string Foo { get; set; } = "bar";
  3051. public override void _Ready()
  3052. {
  3053. ulong id = GetInstanceId();
  3054. var inst = (MyNode)InstanceFromId(Id);
  3055. GD.Print(inst.Foo); // Prints bar
  3056. }
  3057. }
  3058. .. rst-class:: classref-item-separator
  3059. ----
  3060. .. _class_@GlobalScope_method_inverse_lerp:
  3061. .. rst-class:: classref-method
  3062. :ref:`float<class_float>` **inverse_lerp** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` weight **)**
  3063. 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.
  3064. ::
  3065. # The interpolation ratio in the `lerp()` call below is 0.75.
  3066. var middle = lerp(20, 30, 0.75)
  3067. # middle is now 27.5.
  3068. # Now, we pretend to have forgotten the original ratio and want to get it back.
  3069. var ratio = inverse_lerp(20, 30, 27.5)
  3070. # ratio is now 0.75.
  3071. 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.
  3072. .. rst-class:: classref-item-separator
  3073. ----
  3074. .. _class_@GlobalScope_method_is_equal_approx:
  3075. .. rst-class:: classref-method
  3076. :ref:`bool<class_bool>` **is_equal_approx** **(** :ref:`float<class_float>` a, :ref:`float<class_float>` b **)**
  3077. Returns ``true`` if ``a`` and ``b`` are approximately equal to each other.
  3078. 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.
  3079. Infinity values of the same sign are considered equal.
  3080. .. rst-class:: classref-item-separator
  3081. ----
  3082. .. _class_@GlobalScope_method_is_finite:
  3083. .. rst-class:: classref-method
  3084. :ref:`bool<class_bool>` **is_finite** **(** :ref:`float<class_float>` x **)**
  3085. Returns whether ``x`` is a finite value, i.e. it is not :ref:`@GDScript.NAN<class_@GDScript_constant_NAN>`, positive infinity, or negative infinity.
  3086. .. rst-class:: classref-item-separator
  3087. ----
  3088. .. _class_@GlobalScope_method_is_inf:
  3089. .. rst-class:: classref-method
  3090. :ref:`bool<class_bool>` **is_inf** **(** :ref:`float<class_float>` x **)**
  3091. Returns ``true`` if ``x`` is either positive infinity or negative infinity.
  3092. .. rst-class:: classref-item-separator
  3093. ----
  3094. .. _class_@GlobalScope_method_is_instance_id_valid:
  3095. .. rst-class:: classref-method
  3096. :ref:`bool<class_bool>` **is_instance_id_valid** **(** :ref:`int<class_int>` id **)**
  3097. 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.
  3098. .. rst-class:: classref-item-separator
  3099. ----
  3100. .. _class_@GlobalScope_method_is_instance_valid:
  3101. .. rst-class:: classref-method
  3102. :ref:`bool<class_bool>` **is_instance_valid** **(** :ref:`Variant<class_Variant>` instance **)**
  3103. Returns ``true`` if ``instance`` is a valid Object (e.g. has not been deleted from memory).
  3104. .. rst-class:: classref-item-separator
  3105. ----
  3106. .. _class_@GlobalScope_method_is_nan:
  3107. .. rst-class:: classref-method
  3108. :ref:`bool<class_bool>` **is_nan** **(** :ref:`float<class_float>` x **)**
  3109. Returns ``true`` if ``x`` is a NaN ("Not a Number" or invalid) value.
  3110. .. rst-class:: classref-item-separator
  3111. ----
  3112. .. _class_@GlobalScope_method_is_same:
  3113. .. rst-class:: classref-method
  3114. :ref:`bool<class_bool>` **is_same** **(** :ref:`Variant<class_Variant>` a, :ref:`Variant<class_Variant>` b **)**
  3115. 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.
  3116. ::
  3117. # Vector2 is a value type
  3118. var vec2_a = Vector2(0, 0)
  3119. var vec2_b = Vector2(0, 0)
  3120. var vec2_c = Vector2(1, 1)
  3121. is_same(vec2_a, vec2_a) # true
  3122. is_same(vec2_a, vec2_b) # true
  3123. is_same(vec2_a, vec2_c) # false
  3124. # Array is a reference type
  3125. var arr_a = []
  3126. var arr_b = []
  3127. is_same(arr_a, arr_a) # true
  3128. is_same(arr_a, arr_b) # false
  3129. 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>`.
  3130. 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>`.
  3131. .. rst-class:: classref-item-separator
  3132. ----
  3133. .. _class_@GlobalScope_method_is_zero_approx:
  3134. .. rst-class:: classref-method
  3135. :ref:`bool<class_bool>` **is_zero_approx** **(** :ref:`float<class_float>` x **)**
  3136. Returns ``true`` if ``x`` is zero or almost zero. The comparison is done using a tolerance calculation with a small internal epsilon.
  3137. This function is faster than using :ref:`is_equal_approx<class_@GlobalScope_method_is_equal_approx>` with one value as zero.
  3138. .. rst-class:: classref-item-separator
  3139. ----
  3140. .. _class_@GlobalScope_method_lerp:
  3141. .. rst-class:: classref-method
  3142. :ref:`Variant<class_Variant>` **lerp** **(** :ref:`Variant<class_Variant>` from, :ref:`Variant<class_Variant>` to, :ref:`Variant<class_Variant>` weight **)**
  3143. 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.
  3144. 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>`.
  3145. ::
  3146. lerp(0, 4, 0.75) # Returns 3.0
  3147. 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.
  3148. \ **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>`.
  3149. .. rst-class:: classref-item-separator
  3150. ----
  3151. .. _class_@GlobalScope_method_lerp_angle:
  3152. .. rst-class:: classref-method
  3153. :ref:`float<class_float>` **lerp_angle** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` weight **)**
  3154. Linearly interpolates between two angles (in radians) by a ``weight`` value between 0.0 and 1.0.
  3155. 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>`.
  3156. ::
  3157. extends Sprite
  3158. var elapsed = 0.0
  3159. func _process(delta):
  3160. var min_angle = deg_to_rad(0.0)
  3161. var max_angle = deg_to_rad(90.0)
  3162. rotation = lerp_angle(min_angle, max_angle, elapsed)
  3163. elapsed += delta
  3164. \ **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.
  3165. .. rst-class:: classref-item-separator
  3166. ----
  3167. .. _class_@GlobalScope_method_lerpf:
  3168. .. rst-class:: classref-method
  3169. :ref:`float<class_float>` **lerpf** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` weight **)**
  3170. 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.
  3171. ::
  3172. lerpf(0, 4, 0.75) # Returns 3.0
  3173. 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>`.
  3174. .. rst-class:: classref-item-separator
  3175. ----
  3176. .. _class_@GlobalScope_method_linear_to_db:
  3177. .. rst-class:: classref-method
  3178. :ref:`float<class_float>` **linear_to_db** **(** :ref:`float<class_float>` lin **)**
  3179. Converts from linear energy to decibels (audio). This can be used to implement volume sliders that behave as expected (since volume isn't linear).
  3180. \ **Example:**\
  3181. ::
  3182. # "Slider" refers to a node that inherits Range such as HSlider or VSlider.
  3183. # Its range must be configured to go from 0 to 1.
  3184. # Change the bus name if you'd like to change the volume of a specific bus only.
  3185. AudioServer.set_bus_volume_db(AudioServer.get_bus_index("Master"), linear_to_db($Slider.value))
  3186. .. rst-class:: classref-item-separator
  3187. ----
  3188. .. _class_@GlobalScope_method_log:
  3189. .. rst-class:: classref-method
  3190. :ref:`float<class_float>` **log** **(** :ref:`float<class_float>` x **)**
  3191. 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.
  3192. \ **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)``.
  3193. ::
  3194. log(10) # Returns 2.302585
  3195. \ **Note:** The logarithm of ``0`` returns ``-inf``, while negative values return ``-nan``.
  3196. .. rst-class:: classref-item-separator
  3197. ----
  3198. .. _class_@GlobalScope_method_max:
  3199. .. rst-class:: classref-method
  3200. :ref:`Variant<class_Variant>` **max** **(** ... **)** |vararg|
  3201. Returns the maximum of the given numeric values. This function can take any number of arguments.
  3202. ::
  3203. max(1, 7, 3, -6, 5) # Returns 7
  3204. .. rst-class:: classref-item-separator
  3205. ----
  3206. .. _class_@GlobalScope_method_maxf:
  3207. .. rst-class:: classref-method
  3208. :ref:`float<class_float>` **maxf** **(** :ref:`float<class_float>` a, :ref:`float<class_float>` b **)**
  3209. Returns the maximum of two :ref:`float<class_float>` values.
  3210. ::
  3211. maxf(3.6, 24) # Returns 24.0
  3212. maxf(-3.99, -4) # Returns -3.99
  3213. .. rst-class:: classref-item-separator
  3214. ----
  3215. .. _class_@GlobalScope_method_maxi:
  3216. .. rst-class:: classref-method
  3217. :ref:`int<class_int>` **maxi** **(** :ref:`int<class_int>` a, :ref:`int<class_int>` b **)**
  3218. Returns the maximum of two :ref:`int<class_int>` values.
  3219. ::
  3220. maxi(1, 2) # Returns 2
  3221. maxi(-3, -4) # Returns -3
  3222. .. rst-class:: classref-item-separator
  3223. ----
  3224. .. _class_@GlobalScope_method_min:
  3225. .. rst-class:: classref-method
  3226. :ref:`Variant<class_Variant>` **min** **(** ... **)** |vararg|
  3227. Returns the minimum of the given numeric values. This function can take any number of arguments.
  3228. ::
  3229. min(1, 7, 3, -6, 5) # Returns -6
  3230. .. rst-class:: classref-item-separator
  3231. ----
  3232. .. _class_@GlobalScope_method_minf:
  3233. .. rst-class:: classref-method
  3234. :ref:`float<class_float>` **minf** **(** :ref:`float<class_float>` a, :ref:`float<class_float>` b **)**
  3235. Returns the minimum of two :ref:`float<class_float>` values.
  3236. ::
  3237. minf(3.6, 24) # Returns 3.6
  3238. minf(-3.99, -4) # Returns -4.0
  3239. .. rst-class:: classref-item-separator
  3240. ----
  3241. .. _class_@GlobalScope_method_mini:
  3242. .. rst-class:: classref-method
  3243. :ref:`int<class_int>` **mini** **(** :ref:`int<class_int>` a, :ref:`int<class_int>` b **)**
  3244. Returns the minimum of two :ref:`int<class_int>` values.
  3245. ::
  3246. mini(1, 2) # Returns 1
  3247. mini(-3, -4) # Returns -4
  3248. .. rst-class:: classref-item-separator
  3249. ----
  3250. .. _class_@GlobalScope_method_move_toward:
  3251. .. rst-class:: classref-method
  3252. :ref:`float<class_float>` **move_toward** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` delta **)**
  3253. Moves ``from`` toward ``to`` by the ``delta`` amount. Will not go past ``to``.
  3254. Use a negative ``delta`` value to move away.
  3255. ::
  3256. move_toward(5, 10, 4) # Returns 9
  3257. move_toward(10, 5, 4) # Returns 6
  3258. move_toward(5, 10, 9) # Returns 10
  3259. move_toward(10, 5, -1.5) # Returns 11.5
  3260. .. rst-class:: classref-item-separator
  3261. ----
  3262. .. _class_@GlobalScope_method_nearest_po2:
  3263. .. rst-class:: classref-method
  3264. :ref:`int<class_int>` **nearest_po2** **(** :ref:`int<class_int>` value **)**
  3265. Returns the nearest equal or larger power of 2 for the integer ``value``.
  3266. In other words, returns the smallest value ``a`` where ``a = pow(2, n)`` such that ``value <= a`` for some non-negative integer ``n``.
  3267. ::
  3268. nearest_po2(3) # Returns 4
  3269. nearest_po2(4) # Returns 4
  3270. nearest_po2(5) # Returns 8
  3271. nearest_po2(0) # Returns 0 (this may not be expected)
  3272. nearest_po2(-1) # Returns 0 (this may not be expected)
  3273. \ **Warning:** Due to the way it is implemented, this function returns ``0`` rather than ``1`` for negative values of ``value`` (in reality, 1 is the smallest integer power of 2).
  3274. .. rst-class:: classref-item-separator
  3275. ----
  3276. .. _class_@GlobalScope_method_pingpong:
  3277. .. rst-class:: classref-method
  3278. :ref:`float<class_float>` **pingpong** **(** :ref:`float<class_float>` value, :ref:`float<class_float>` length **)**
  3279. 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.
  3280. ::
  3281. pingpong(-3.0, 3.0) # Returns 3.0
  3282. pingpong(-2.0, 3.0) # Returns 2.0
  3283. pingpong(-1.0, 3.0) # Returns 1.0
  3284. pingpong(0.0, 3.0) # Returns 0.0
  3285. pingpong(1.0, 3.0) # Returns 1.0
  3286. pingpong(2.0, 3.0) # Returns 2.0
  3287. pingpong(3.0, 3.0) # Returns 3.0
  3288. pingpong(4.0, 3.0) # Returns 2.0
  3289. pingpong(5.0, 3.0) # Returns 1.0
  3290. pingpong(6.0, 3.0) # Returns 0.0
  3291. .. rst-class:: classref-item-separator
  3292. ----
  3293. .. _class_@GlobalScope_method_posmod:
  3294. .. rst-class:: classref-method
  3295. :ref:`int<class_int>` **posmod** **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y **)**
  3296. Returns the integer modulus of ``x`` divided by ``y`` that wraps equally in positive and negative.
  3297. ::
  3298. print("#(i) (i % 3) (posmod(i, 3))")
  3299. for i in range(-3, 4):
  3300. print("%2d %2d | %2d" % [i, i % 3, posmod(i, 3)])
  3301. Produces:
  3302. ::
  3303. (i) (i % 3) (posmod(i, 3))
  3304. -3 0 | 0
  3305. -2 -2 | 1
  3306. -1 -1 | 2
  3307. 0 0 | 0
  3308. 1 1 | 1
  3309. 2 2 | 2
  3310. 3 0 | 0
  3311. .. rst-class:: classref-item-separator
  3312. ----
  3313. .. _class_@GlobalScope_method_pow:
  3314. .. rst-class:: classref-method
  3315. :ref:`float<class_float>` **pow** **(** :ref:`float<class_float>` base, :ref:`float<class_float>` exp **)**
  3316. Returns the result of ``base`` raised to the power of ``exp``.
  3317. In GDScript, this is the equivalent of the ``**`` operator.
  3318. ::
  3319. pow(2, 5) # Returns 32.0
  3320. pow(4, 1.5) # Returns 8.0
  3321. .. rst-class:: classref-item-separator
  3322. ----
  3323. .. _class_@GlobalScope_method_print:
  3324. .. rst-class:: classref-method
  3325. void **print** **(** ... **)** |vararg|
  3326. Converts one or more arguments of any type to string in the best way possible and prints them to the console.
  3327. .. tabs::
  3328. .. code-tab:: gdscript
  3329. var a = [1, 2, 3]
  3330. print("a", "b", a) # Prints ab[1, 2, 3]
  3331. .. code-tab:: csharp
  3332. var a = new Godot.Collections.Array { 1, 2, 3 };
  3333. GD.Print("a", "b", a); // Prints ab[1, 2, 3]
  3334. \ **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.
  3335. .. rst-class:: classref-item-separator
  3336. ----
  3337. .. _class_@GlobalScope_method_print_rich:
  3338. .. rst-class:: classref-method
  3339. void **print_rich** **(** ... **)** |vararg|
  3340. Converts one or more arguments of any type to string in the best way possible and prints them to the console.
  3341. The following BBCode tags are supported: ``b``, ``i``, ``u``, ``s``, ``indent``, ``code``, ``url``, ``center``, ``right``, ``color``, ``bgcolor``, ``fgcolor``.
  3342. 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.
  3343. URL tags only support URLs wrapped by a URL tag, not URLs with a different title.
  3344. 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.
  3345. .. tabs::
  3346. .. code-tab:: gdscript
  3347. print_rich("[color=green][b]Hello world![/b][/color]") # Prints out "Hello world!" in green with a bold font
  3348. .. code-tab:: csharp
  3349. GD.PrintRich("[color=green][b]Hello world![/b][/color]"); // Prints out "Hello world!" in green with a bold font
  3350. \ **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.
  3351. \ **Note:** On Windows, only Windows 10 and later correctly displays ANSI escape codes in standard output.
  3352. .. rst-class:: classref-item-separator
  3353. ----
  3354. .. _class_@GlobalScope_method_print_verbose:
  3355. .. rst-class:: classref-method
  3356. void **print_verbose** **(** ... **)** |vararg|
  3357. 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.
  3358. .. rst-class:: classref-item-separator
  3359. ----
  3360. .. _class_@GlobalScope_method_printerr:
  3361. .. rst-class:: classref-method
  3362. void **printerr** **(** ... **)** |vararg|
  3363. Prints one or more arguments to strings in the best way possible to standard error line.
  3364. .. tabs::
  3365. .. code-tab:: gdscript
  3366. printerr("prints to stderr")
  3367. .. code-tab:: csharp
  3368. GD.PrintErr("prints to stderr");
  3369. .. rst-class:: classref-item-separator
  3370. ----
  3371. .. _class_@GlobalScope_method_printraw:
  3372. .. rst-class:: classref-method
  3373. void **printraw** **(** ... **)** |vararg|
  3374. 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.
  3375. .. tabs::
  3376. .. code-tab:: gdscript
  3377. printraw("A")
  3378. printraw("B")
  3379. printraw("C")
  3380. # Prints ABC to terminal
  3381. .. code-tab:: csharp
  3382. GD.PrintRaw("A");
  3383. GD.PrintRaw("B");
  3384. GD.PrintRaw("C");
  3385. // Prints ABC to terminal
  3386. .. rst-class:: classref-item-separator
  3387. ----
  3388. .. _class_@GlobalScope_method_prints:
  3389. .. rst-class:: classref-method
  3390. void **prints** **(** ... **)** |vararg|
  3391. Prints one or more arguments to the console with a space between each argument.
  3392. .. tabs::
  3393. .. code-tab:: gdscript
  3394. prints("A", "B", "C") # Prints A B C
  3395. .. code-tab:: csharp
  3396. GD.PrintS("A", "B", "C"); // Prints A B C
  3397. .. rst-class:: classref-item-separator
  3398. ----
  3399. .. _class_@GlobalScope_method_printt:
  3400. .. rst-class:: classref-method
  3401. void **printt** **(** ... **)** |vararg|
  3402. Prints one or more arguments to the console with a tab between each argument.
  3403. .. tabs::
  3404. .. code-tab:: gdscript
  3405. printt("A", "B", "C") # Prints A B C
  3406. .. code-tab:: csharp
  3407. GD.PrintT("A", "B", "C"); // Prints A B C
  3408. .. rst-class:: classref-item-separator
  3409. ----
  3410. .. _class_@GlobalScope_method_push_error:
  3411. .. rst-class:: classref-method
  3412. void **push_error** **(** ... **)** |vararg|
  3413. Pushes an error message to Godot's built-in debugger and to the OS terminal.
  3414. .. tabs::
  3415. .. code-tab:: gdscript
  3416. push_error("test error") # Prints "test error" to debugger and terminal as error call
  3417. .. code-tab:: csharp
  3418. GD.PushError("test error"); // Prints "test error" to debugger and terminal as error call
  3419. \ **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.
  3420. .. rst-class:: classref-item-separator
  3421. ----
  3422. .. _class_@GlobalScope_method_push_warning:
  3423. .. rst-class:: classref-method
  3424. void **push_warning** **(** ... **)** |vararg|
  3425. Pushes a warning message to Godot's built-in debugger and to the OS terminal.
  3426. .. tabs::
  3427. .. code-tab:: gdscript
  3428. push_warning("test warning") # Prints "test warning" to debugger and terminal as warning call
  3429. .. code-tab:: csharp
  3430. GD.PushWarning("test warning"); // Prints "test warning" to debugger and terminal as warning call
  3431. .. rst-class:: classref-item-separator
  3432. ----
  3433. .. _class_@GlobalScope_method_rad_to_deg:
  3434. .. rst-class:: classref-method
  3435. :ref:`float<class_float>` **rad_to_deg** **(** :ref:`float<class_float>` rad **)**
  3436. Converts an angle expressed in radians to degrees.
  3437. ::
  3438. rad_to_deg(0.523599) # Returns 30
  3439. rad_to_deg(PI) # Returns 180
  3440. rad_to_deg(PI * 2) # Returns 360
  3441. .. rst-class:: classref-item-separator
  3442. ----
  3443. .. _class_@GlobalScope_method_rand_from_seed:
  3444. .. rst-class:: classref-method
  3445. :ref:`PackedInt64Array<class_PackedInt64Array>` **rand_from_seed** **(** :ref:`int<class_int>` seed **)**
  3446. 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.
  3447. \ **Note:** "Seed" here refers to the internal state of the pseudo random number generator, currently implemented as a 64 bit integer.
  3448. ::
  3449. var a = rand_from_seed(4)
  3450. print(a[0]) # Prints 2879024997
  3451. print(a[1]) # Prints 4
  3452. .. rst-class:: classref-item-separator
  3453. ----
  3454. .. _class_@GlobalScope_method_randf:
  3455. .. rst-class:: classref-method
  3456. :ref:`float<class_float>` **randf** **(** **)**
  3457. Returns a random floating point value between ``0.0`` and ``1.0`` (inclusive).
  3458. .. tabs::
  3459. .. code-tab:: gdscript
  3460. randf() # Returns e.g. 0.375671
  3461. .. code-tab:: csharp
  3462. GD.Randf(); // Returns e.g. 0.375671
  3463. .. rst-class:: classref-item-separator
  3464. ----
  3465. .. _class_@GlobalScope_method_randf_range:
  3466. .. rst-class:: classref-method
  3467. :ref:`float<class_float>` **randf_range** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to **)**
  3468. Returns a random floating point value between ``from`` and ``to`` (inclusive).
  3469. .. tabs::
  3470. .. code-tab:: gdscript
  3471. randf_range(0, 20.5) # Returns e.g. 7.45315
  3472. randf_range(-10, 10) # Returns e.g. -3.844535
  3473. .. code-tab:: csharp
  3474. GD.RandRange(0.0, 20.5); // Returns e.g. 7.45315
  3475. GD.RandRange(-10.0, 10.0); // Returns e.g. -3.844535
  3476. .. rst-class:: classref-item-separator
  3477. ----
  3478. .. _class_@GlobalScope_method_randfn:
  3479. .. rst-class:: classref-method
  3480. :ref:`float<class_float>` **randfn** **(** :ref:`float<class_float>` mean, :ref:`float<class_float>` deviation **)**
  3481. 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.
  3482. .. rst-class:: classref-item-separator
  3483. ----
  3484. .. _class_@GlobalScope_method_randi:
  3485. .. rst-class:: classref-method
  3486. :ref:`int<class_int>` **randi** **(** **)**
  3487. 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).
  3488. .. tabs::
  3489. .. code-tab:: gdscript
  3490. randi() # Returns random integer between 0 and 2^32 - 1
  3491. randi() % 20 # Returns random integer between 0 and 19
  3492. randi() % 100 # Returns random integer between 0 and 99
  3493. randi() % 100 + 1 # Returns random integer between 1 and 100
  3494. .. code-tab:: csharp
  3495. GD.Randi(); // Returns random integer between 0 and 2^32 - 1
  3496. GD.Randi() % 20; // Returns random integer between 0 and 19
  3497. GD.Randi() % 100; // Returns random integer between 0 and 99
  3498. GD.Randi() % 100 + 1; // Returns random integer between 1 and 100
  3499. .. rst-class:: classref-item-separator
  3500. ----
  3501. .. _class_@GlobalScope_method_randi_range:
  3502. .. rst-class:: classref-method
  3503. :ref:`int<class_int>` **randi_range** **(** :ref:`int<class_int>` from, :ref:`int<class_int>` to **)**
  3504. Returns a random signed 32-bit integer between ``from`` and ``to`` (inclusive). If ``to`` is lesser than ``from``, they are swapped.
  3505. .. tabs::
  3506. .. code-tab:: gdscript
  3507. randi_range(0, 1) # Returns either 0 or 1
  3508. randi_range(-10, 1000) # Returns random integer between -10 and 1000
  3509. .. code-tab:: csharp
  3510. GD.RandRange(0, 1); // Returns either 0 or 1
  3511. GD.RandRange(-10, 1000); // Returns random integer between -10 and 1000
  3512. .. rst-class:: classref-item-separator
  3513. ----
  3514. .. _class_@GlobalScope_method_randomize:
  3515. .. rst-class:: classref-method
  3516. void **randomize** **(** **)**
  3517. Randomizes the seed (or the internal state) of the random number generator. The current implementation uses a number based on the device's time.
  3518. \ **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.
  3519. .. rst-class:: classref-item-separator
  3520. ----
  3521. .. _class_@GlobalScope_method_remap:
  3522. .. rst-class:: classref-method
  3523. :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 **)**
  3524. 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.
  3525. ::
  3526. remap(75, 0, 100, -1, 1) # Returns 0.5
  3527. For complex use cases where multiple ranges are needed, consider using :ref:`Curve<class_Curve>` or :ref:`Gradient<class_Gradient>` instead.
  3528. .. rst-class:: classref-item-separator
  3529. ----
  3530. .. _class_@GlobalScope_method_rid_allocate_id:
  3531. .. rst-class:: classref-method
  3532. :ref:`int<class_int>` **rid_allocate_id** **(** **)**
  3533. 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.
  3534. .. rst-class:: classref-item-separator
  3535. ----
  3536. .. _class_@GlobalScope_method_rid_from_int64:
  3537. .. rst-class:: classref-method
  3538. :ref:`RID<class_RID>` **rid_from_int64** **(** :ref:`int<class_int>` base **)**
  3539. Creates a RID from a ``base``. This is used mainly from native extensions to build servers.
  3540. .. rst-class:: classref-item-separator
  3541. ----
  3542. .. _class_@GlobalScope_method_round:
  3543. .. rst-class:: classref-method
  3544. :ref:`Variant<class_Variant>` **round** **(** :ref:`Variant<class_Variant>` x **)**
  3545. 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>`.
  3546. ::
  3547. round(2.4) # Returns 2
  3548. round(2.5) # Returns 3
  3549. round(2.6) # Returns 3
  3550. See also :ref:`floor<class_@GlobalScope_method_floor>`, :ref:`ceil<class_@GlobalScope_method_ceil>`, and :ref:`snapped<class_@GlobalScope_method_snapped>`.
  3551. \ **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>`.
  3552. .. rst-class:: classref-item-separator
  3553. ----
  3554. .. _class_@GlobalScope_method_roundf:
  3555. .. rst-class:: classref-method
  3556. :ref:`float<class_float>` **roundf** **(** :ref:`float<class_float>` x **)**
  3557. Rounds ``x`` to the nearest whole number, with halfway cases rounded away from 0.
  3558. A type-safe version of :ref:`round<class_@GlobalScope_method_round>`, returning a :ref:`float<class_float>`.
  3559. .. rst-class:: classref-item-separator
  3560. ----
  3561. .. _class_@GlobalScope_method_roundi:
  3562. .. rst-class:: classref-method
  3563. :ref:`int<class_int>` **roundi** **(** :ref:`float<class_float>` x **)**
  3564. Rounds ``x`` to the nearest whole number, with halfway cases rounded away from 0.
  3565. A type-safe version of :ref:`round<class_@GlobalScope_method_round>`, returning an :ref:`int<class_int>`.
  3566. .. rst-class:: classref-item-separator
  3567. ----
  3568. .. _class_@GlobalScope_method_seed:
  3569. .. rst-class:: classref-method
  3570. void **seed** **(** :ref:`int<class_int>` base **)**
  3571. Sets the seed for the random number generator to ``base``. Setting the seed manually can ensure consistent, repeatable results for most random functions.
  3572. .. tabs::
  3573. .. code-tab:: gdscript
  3574. var my_seed = "Godot Rocks".hash()
  3575. seed(my_seed)
  3576. var a = randf() + randi()
  3577. seed(my_seed)
  3578. var b = randf() + randi()
  3579. # a and b are now identical
  3580. .. code-tab:: csharp
  3581. ulong mySeed = (ulong)GD.Hash("Godot Rocks");
  3582. GD.Seed(mySeed);
  3583. var a = GD.Randf() + GD.Randi();
  3584. GD.Seed(mySeed);
  3585. var b = GD.Randf() + GD.Randi();
  3586. // a and b are now identical
  3587. .. rst-class:: classref-item-separator
  3588. ----
  3589. .. _class_@GlobalScope_method_sign:
  3590. .. rst-class:: classref-method
  3591. :ref:`Variant<class_Variant>` **sign** **(** :ref:`Variant<class_Variant>` x **)**
  3592. 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>`.
  3593. ::
  3594. sign(-6.0) # Returns -1
  3595. sign(0.0) # Returns 0
  3596. sign(6.0) # Returns 1
  3597. sign(Vector3(-6.0, 0.0, 6.0)) # Returns (-1, 0, 1)
  3598. \ **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>`.
  3599. .. rst-class:: classref-item-separator
  3600. ----
  3601. .. _class_@GlobalScope_method_signf:
  3602. .. rst-class:: classref-method
  3603. :ref:`float<class_float>` **signf** **(** :ref:`float<class_float>` x **)**
  3604. Returns ``-1.0`` if ``x`` is negative, ``1.0`` if ``x`` is positive, and ``0.0`` if ``x`` is zero.
  3605. ::
  3606. signf(-6.5) # Returns -1.0
  3607. signf(0.0) # Returns 0.0
  3608. signf(6.5) # Returns 1.0
  3609. .. rst-class:: classref-item-separator
  3610. ----
  3611. .. _class_@GlobalScope_method_signi:
  3612. .. rst-class:: classref-method
  3613. :ref:`int<class_int>` **signi** **(** :ref:`int<class_int>` x **)**
  3614. Returns ``-1`` if ``x`` is negative, ``1`` if ``x`` is positive, and ``0`` if if ``x`` is zero.
  3615. ::
  3616. signi(-6) # Returns -1
  3617. signi(0) # Returns 0
  3618. signi(6) # Returns 1
  3619. .. rst-class:: classref-item-separator
  3620. ----
  3621. .. _class_@GlobalScope_method_sin:
  3622. .. rst-class:: classref-method
  3623. :ref:`float<class_float>` **sin** **(** :ref:`float<class_float>` angle_rad **)**
  3624. Returns the sine of angle ``angle_rad`` in radians.
  3625. ::
  3626. sin(0.523599) # Returns 0.5
  3627. sin(deg_to_rad(90)) # Returns 1.0
  3628. .. rst-class:: classref-item-separator
  3629. ----
  3630. .. _class_@GlobalScope_method_sinh:
  3631. .. rst-class:: classref-method
  3632. :ref:`float<class_float>` **sinh** **(** :ref:`float<class_float>` x **)**
  3633. Returns the hyperbolic sine of ``x``.
  3634. ::
  3635. var a = log(2.0) # Returns 0.693147
  3636. sinh(a) # Returns 0.75
  3637. .. rst-class:: classref-item-separator
  3638. ----
  3639. .. _class_@GlobalScope_method_smoothstep:
  3640. .. rst-class:: classref-method
  3641. :ref:`float<class_float>` **smoothstep** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` x **)**
  3642. 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``.
  3643. 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``.
  3644. 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)``.
  3645. ::
  3646. smoothstep(0, 2, -5.0) # Returns 0.0
  3647. smoothstep(0, 2, 0.5) # Returns 0.15625
  3648. smoothstep(0, 2, 1.0) # Returns 0.5
  3649. smoothstep(0, 2, 2.0) # Returns 1.0
  3650. 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>`.
  3651. \ `Comparison between smoothstep() and ease(x, -1.6521) return values <https://raw.githubusercontent.com/godotengine/godot-docs/4.1/img/smoothstep_ease_comparison.png>`__
  3652. .. rst-class:: classref-item-separator
  3653. ----
  3654. .. _class_@GlobalScope_method_snapped:
  3655. .. rst-class:: classref-method
  3656. :ref:`Variant<class_Variant>` **snapped** **(** :ref:`Variant<class_Variant>` x, :ref:`Variant<class_Variant>` step **)**
  3657. 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.
  3658. 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>`.
  3659. ::
  3660. snapped(100, 32) # Returns 96
  3661. snapped(3.14159, 0.01) # Returns 3.14
  3662. snapped(Vector2(34, 70), Vector2(8, 8)) # Returns (32, 72)
  3663. See also :ref:`ceil<class_@GlobalScope_method_ceil>`, :ref:`floor<class_@GlobalScope_method_floor>`, and :ref:`round<class_@GlobalScope_method_round>`.
  3664. \ **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>`.
  3665. .. rst-class:: classref-item-separator
  3666. ----
  3667. .. _class_@GlobalScope_method_snappedf:
  3668. .. rst-class:: classref-method
  3669. :ref:`float<class_float>` **snappedf** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` step **)**
  3670. 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.
  3671. A type-safe version of :ref:`snapped<class_@GlobalScope_method_snapped>`, returning a :ref:`float<class_float>`.
  3672. ::
  3673. snappedf(32.0, 2.5) # Returns 32.5
  3674. snappedf(3.14159, 0.01) # Returns 3.14
  3675. .. rst-class:: classref-item-separator
  3676. ----
  3677. .. _class_@GlobalScope_method_snappedi:
  3678. .. rst-class:: classref-method
  3679. :ref:`int<class_int>` **snappedi** **(** :ref:`float<class_float>` x, :ref:`int<class_int>` step **)**
  3680. Returns the multiple of ``step`` that is the closest to ``x``.
  3681. A type-safe version of :ref:`snapped<class_@GlobalScope_method_snapped>`, returning an :ref:`int<class_int>`.
  3682. ::
  3683. snappedi(53, 16) # Returns 48
  3684. snappedi(4096, 100) # Returns 4100
  3685. .. rst-class:: classref-item-separator
  3686. ----
  3687. .. _class_@GlobalScope_method_sqrt:
  3688. .. rst-class:: classref-method
  3689. :ref:`float<class_float>` **sqrt** **(** :ref:`float<class_float>` x **)**
  3690. Returns the square root of ``x``, where ``x`` is a non-negative number.
  3691. ::
  3692. sqrt(9) # Returns 3
  3693. sqrt(10.24) # Returns 3.2
  3694. sqrt(-1) # Returns NaN
  3695. \ **Note:** Negative values of ``x`` return NaN ("Not a Number"). in C#, if you need negative inputs, use ``System.Numerics.Complex``.
  3696. .. rst-class:: classref-item-separator
  3697. ----
  3698. .. _class_@GlobalScope_method_step_decimals:
  3699. .. rst-class:: classref-method
  3700. :ref:`int<class_int>` **step_decimals** **(** :ref:`float<class_float>` x **)**
  3701. 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.
  3702. ::
  3703. var n = step_decimals(5) # n is 0
  3704. n = step_decimals(1.0005) # n is 4
  3705. n = step_decimals(0.000000005) # n is 9
  3706. .. rst-class:: classref-item-separator
  3707. ----
  3708. .. _class_@GlobalScope_method_str:
  3709. .. rst-class:: classref-method
  3710. :ref:`String<class_String>` **str** **(** ... **)** |vararg|
  3711. Converts one or more arguments of any :ref:`Variant<class_Variant>` type to a :ref:`String<class_String>` in the best way possible.
  3712. ::
  3713. var a = [10, 20, 30]
  3714. var b = str(a)
  3715. print(len(a)) # Prints 3 (the number of elements in the array).
  3716. print(len(b)) # Prints 12 (the length of the string "[10, 20, 30]").
  3717. .. rst-class:: classref-item-separator
  3718. ----
  3719. .. _class_@GlobalScope_method_str_to_var:
  3720. .. rst-class:: classref-method
  3721. :ref:`Variant<class_Variant>` **str_to_var** **(** :ref:`String<class_String>` string **)**
  3722. 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>`.
  3723. .. tabs::
  3724. .. code-tab:: gdscript
  3725. var data = '{ "a": 1, "b": 2 }' # data is a String
  3726. var dict = str_to_var(data) # dict is a Dictionary
  3727. print(dict["a"]) # Prints 1
  3728. .. code-tab:: csharp
  3729. string data = "{ \"a\": 1, \"b\": 2 }"; // data is a string
  3730. var dict = GD.StrToVar(data).AsGodotDictionary(); // dict is a Dictionary
  3731. GD.Print(dict["a"]); // Prints 1
  3732. .. rst-class:: classref-item-separator
  3733. ----
  3734. .. _class_@GlobalScope_method_tan:
  3735. .. rst-class:: classref-method
  3736. :ref:`float<class_float>` **tan** **(** :ref:`float<class_float>` angle_rad **)**
  3737. Returns the tangent of angle ``angle_rad`` in radians.
  3738. ::
  3739. tan(deg_to_rad(45)) # Returns 1
  3740. .. rst-class:: classref-item-separator
  3741. ----
  3742. .. _class_@GlobalScope_method_tanh:
  3743. .. rst-class:: classref-method
  3744. :ref:`float<class_float>` **tanh** **(** :ref:`float<class_float>` x **)**
  3745. Returns the hyperbolic tangent of ``x``.
  3746. ::
  3747. var a = log(2.0) # Returns 0.693147
  3748. tanh(a) # Returns 0.6
  3749. .. rst-class:: classref-item-separator
  3750. ----
  3751. .. _class_@GlobalScope_method_typeof:
  3752. .. rst-class:: classref-method
  3753. :ref:`int<class_int>` **typeof** **(** :ref:`Variant<class_Variant>` variable **)**
  3754. Returns the internal type of the given ``variable``, using the :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` values.
  3755. ::
  3756. var json = JSON.new()
  3757. json.parse('["a", "b", "c"]')
  3758. var result = json.get_data()
  3759. if typeof(result) == TYPE_ARRAY:
  3760. print(result[0]) # Prints a
  3761. else:
  3762. print("Unexpected result")
  3763. .. rst-class:: classref-item-separator
  3764. ----
  3765. .. _class_@GlobalScope_method_var_to_bytes:
  3766. .. rst-class:: classref-method
  3767. :ref:`PackedByteArray<class_PackedByteArray>` **var_to_bytes** **(** :ref:`Variant<class_Variant>` variable **)**
  3768. 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>`.
  3769. \ **Note:** If you need object serialization, see :ref:`var_to_bytes_with_objects<class_@GlobalScope_method_var_to_bytes_with_objects>`.
  3770. .. rst-class:: classref-item-separator
  3771. ----
  3772. .. _class_@GlobalScope_method_var_to_bytes_with_objects:
  3773. .. rst-class:: classref-method
  3774. :ref:`PackedByteArray<class_PackedByteArray>` **var_to_bytes_with_objects** **(** :ref:`Variant<class_Variant>` variable **)**
  3775. 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>`.
  3776. .. rst-class:: classref-item-separator
  3777. ----
  3778. .. _class_@GlobalScope_method_var_to_str:
  3779. .. rst-class:: classref-method
  3780. :ref:`String<class_String>` **var_to_str** **(** :ref:`Variant<class_Variant>` variable **)**
  3781. 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>`.
  3782. .. tabs::
  3783. .. code-tab:: gdscript
  3784. var a = { "a": 1, "b": 2 }
  3785. print(var_to_str(a))
  3786. .. code-tab:: csharp
  3787. var a = new Godot.Collections.Dictionary { ["a"] = 1, ["b"] = 2 };
  3788. GD.Print(GD.VarToStr(a));
  3789. Prints:
  3790. ::
  3791. {
  3792. "a": 1,
  3793. "b": 2
  3794. }
  3795. \ **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.
  3796. .. rst-class:: classref-item-separator
  3797. ----
  3798. .. _class_@GlobalScope_method_weakref:
  3799. .. rst-class:: classref-method
  3800. :ref:`Variant<class_Variant>` **weakref** **(** :ref:`Variant<class_Variant>` obj **)**
  3801. Returns a weak reference to an object, or ``null`` if ``obj`` is invalid.
  3802. 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.
  3803. .. rst-class:: classref-item-separator
  3804. ----
  3805. .. _class_@GlobalScope_method_wrap:
  3806. .. rst-class:: classref-method
  3807. :ref:`Variant<class_Variant>` **wrap** **(** :ref:`Variant<class_Variant>` value, :ref:`Variant<class_Variant>` min, :ref:`Variant<class_Variant>` max **)**
  3808. Wraps the :ref:`Variant<class_Variant>` ``value`` between ``min`` and ``max``. Can be used for creating loop-alike behavior or infinite surfaces.
  3809. 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>`.
  3810. ::
  3811. var a = wrap(4, 5, 10)
  3812. # a is 9 (int)
  3813. var a = wrap(7, 5, 10)
  3814. # a is 7 (int)
  3815. var a = wrap(10.5, 5, 10)
  3816. # a is 5.5 (float)
  3817. .. rst-class:: classref-item-separator
  3818. ----
  3819. .. _class_@GlobalScope_method_wrapf:
  3820. .. rst-class:: classref-method
  3821. :ref:`float<class_float>` **wrapf** **(** :ref:`float<class_float>` value, :ref:`float<class_float>` min, :ref:`float<class_float>` max **)**
  3822. Wraps the float ``value`` between ``min`` and ``max``. Can be used for creating loop-alike behavior or infinite surfaces.
  3823. ::
  3824. # Infinite loop between 5.0 and 9.9
  3825. value = wrapf(value + 0.1, 5.0, 10.0)
  3826. ::
  3827. # Infinite rotation (in radians)
  3828. angle = wrapf(angle + 0.1, 0.0, TAU)
  3829. ::
  3830. # Infinite rotation (in radians)
  3831. angle = wrapf(angle + 0.1, -PI, PI)
  3832. \ **Note:** If ``min`` is ``0``, this is equivalent to :ref:`fposmod<class_@GlobalScope_method_fposmod>`, so prefer using that instead.
  3833. \ ``wrapf`` is more flexible than using the :ref:`fposmod<class_@GlobalScope_method_fposmod>` approach by giving the user control over the minimum value.
  3834. .. rst-class:: classref-item-separator
  3835. ----
  3836. .. _class_@GlobalScope_method_wrapi:
  3837. .. rst-class:: classref-method
  3838. :ref:`int<class_int>` **wrapi** **(** :ref:`int<class_int>` value, :ref:`int<class_int>` min, :ref:`int<class_int>` max **)**
  3839. Wraps the integer ``value`` between ``min`` and ``max``. Can be used for creating loop-alike behavior or infinite surfaces.
  3840. ::
  3841. # Infinite loop between 5 and 9
  3842. frame = wrapi(frame + 1, 5, 10)
  3843. ::
  3844. # result is -2
  3845. var result = wrapi(-6, -5, -1)
  3846. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  3847. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  3848. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  3849. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  3850. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  3851. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  3852. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`