123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112 |
- /*
- * LaGUI: A graphical application framework.
- * Copyright (C) 2022-2023 Wu Yiming
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
- #include "../la_5.h"
- extern LA MAIN;
- extern struct _tnsMain *T;
- extern const char* LA_UDF_EXTENSION_STRINGS[];
- int laget_InstanceModified(void* instance);
- void laget_TimeString(laTimeInfo *ti, char *result, char** resultdirect);
- void laui_DefaultPropDetails(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context){
- laColumn *c;
- laUiItem *b;
- c = laFirstColumn(uil);
- laSafeString* s=0;
- if(Extra&&Extra->EndInstance){ //button
- laGeneralUiExtraData* ex=Extra->EndInstance;
- laUiItem* ui=ex->ui;
- if(This&&This->LastPs&&This->EndInstance){
- laProp* p=This->LastPs->p; laPropContainer* pc=p->Container; void* inst=This->LastPs->UseInstance;
- char FullPath[256]={0}; la_GetPropPackFullPath(This, FullPath);
- strSafePrint(&s,"%s", FullPath); if(ui->ExtraInstructions){ strSafePrint(&s,"(%s)", ui->ExtraInstructions->Ptr); }
- laShowLabel(uil,c,p->Description,0,0)->Flags|=LA_TEXT_LINE_WRAP;
- laShowLabel(uil,c,s->Ptr,0,0)->Flags|=LA_TEXT_MONO|LA_UI_FLAGS_DISABLED;
- }else{
- laShowLabel(uil,c,ui->AT->Description,0,0)->Flags|=LA_TEXT_LINE_WRAP;
- strSafePrint(&s,"%s", ui->AT->Identifier); if(ui->ExtraInstructions){ strSafePrint(&s,"(%s)", ui->ExtraInstructions->Ptr); }
- laShowLabel(uil,c,s->Ptr,0,0)->Flags|=LA_TEXT_MONO|LA_UI_FLAGS_DISABLED;
- }
- }else{
- if(!This || !This->LastPs){ laShowLabel(uil,c,"Can't access property details.",0,0); return; }
- char FullPath[256]={0}; la_GetPropPackFullPath(This, FullPath);
- laProp* p=This->LastPs->p; laPropContainer* pc=p->Container; void* inst=This->LastPs->UseInstance;
- laShowLabel(uil,c,p->Description,0,0)->Flags|=LA_TEXT_LINE_WRAP;
- if(p->PropertyType==(LA_PROP_ENUM)||(LA_PROP_ARRAY|LA_PROP_ENUM)){
- laEnumItem* ei=laGetEnumArrayIndexed(This,This->LastIndex);
- if(ei){ strSafeSet(&s,0);strSafePrint(&s,"Current: %s", ei->Description);laShowLabel(uil,c,s->Ptr,0,0)->Flags|=LA_UI_FLAGS_HIGHLIGHT|LA_TEXT_LINE_WRAP; }
- }
- laShowLabel(uil,c,FullPath,0,0)->Flags|=LA_TEXT_MONO|LA_UI_FLAGS_DISABLED;
- if(inst && !pc->OtherAlloc){
- laShowSeparator(uil,c); strSafeSet(&s,0); strSafePrint(&s,"[ %s ]", pc->Name?pc->Name:pc->Identifier, inst);
- int Level=0; laMemNodeHyper* m=memGetHead(inst,&Level);
- laListHandle* users=memGetUserList(inst);
- if(users){ strSafePrint(&s," %d Users", lstCountElements(users)); }
- laShowLabel(uil,c,s->Ptr,0,0)->Flags|=LA_TEXT_MONO;
- if(Level==2){
- strSafeSet(&s,0);strSafePrint(&s, m->NUID.String);
- if(laget_InstanceModified(inst)){ strSafePrint(&s, " 🌑 Modified"); }else{ strSafePrint(&s, " Clean"); }
- laShowLabel(uil,c,s->Ptr,0,0)->Flags|=LA_TEXT_MONO;
- laget_TimeString(&m->TimeCreated, FullPath, 0);
- strSafeSet(&s,0); strSafePrint(&s, "Created at %s", FullPath);
- laShowLabel(uil,c,s->Ptr,0,0)->Flags|=LA_TEXT_MONO;
- }
- if(m){
- if(Level==2){
- laShowSeparator(uil,c);
- if(m->FromFile){
- //strSafeSet(&s,0); strSafePrint(&s,"File:\n%s", m->FromFile->BaseName);
- //laShowLabel(uil,c,s->Ptr,0,0);
- char safepath[256]; strEscapePath(safepath, m->FromFile->BaseName->Ptr);
- strSafeSet(&s,0); strSafePrint(&s,"la.managed_udfs@basename=%s.__self", safepath);
- laShowItemFull(uil,c,0,s->Ptr,0,0,laui_ManagedUDFItem,0)->Flags|=LA_UI_FLAGS_NO_GAP|LA_UI_FLAGS_NO_DECAL;
- }else{
- laShowLabel(uil,c,"<Not saved yet>",0,0)->Flags|=LA_UI_FLAGS_DISABLED;
- }
- }
- }
-
- }
- }
- strSafeDestroy(&s);
- }
- void laui_DefaultNodeOperationsPropUiDefine(laUiList *uil, laPropPack *This, laPropPack *OperatorProps, laColumn *UNUSED, int context){
- laColumn *c = laFirstColumn(uil); laColumn* cl,*cr; laSplitColumn(uil,c,0.5); cl=laLeftColumn(c,0);cr=laRightColumn(c,0);
- laShowItemFull(uil, c, This, "base.name",LA_WIDGET_STRING_PLAIN,0,0,0);
- laShowItemFull(uil, cl, This, "base.move",0,"direction=left;text=Move Left;icon=🡰;",0,0);
- laShowItemFull(uil, cr, This, "base.move",0,"text=Move Right;icon=🡲;",0,0);
- laShowItemFull(uil, c, This, "base.delete",0,0,0,0);
- }
- void laui_DefaultPropUiDefine(laUiList *uil, laPropPack *This, laPropPack *OperatorProps, laColumn *UNUSED, int context){
- laColumn *c;
- laProp *p, *gp;
- if (OperatorProps && OperatorProps->LastPs){
- c = laFirstColumn(uil); gp = OperatorProps->LastPs->p;
- for (p = gp->SubProp->Props.pFirst; p; p = p->Item.pNext){
- if(p->PropertyType!=LA_PROP_OPERATOR) continue;
- laShowItem(uil, c, OperatorProps, p->Identifier);
- }
- }
- if (!This || !This->LastPs) return;
- c = laFirstColumn(uil); gp = This->LastPs->p;
- laPropContainer* pc=la_EnsureSubTarget(gp,This->EndInstance);
- laShowLabel(uil,c,gp->PropertyType==LA_PROP_SUB?pc->Name:gp->Name,0,0)->Flags|=LA_UI_FLAGS_DISABLED;
- for (p = pc->Props.pFirst; p; p = p->Item.pNext){
- //la_ShowGeneralPropItem(uil, c, This, gp, p, 0, 0, 0);
- laShowItem(uil, c, This, p->Identifier);
- }
- }
- void laui_PropOperatorUiDefine(laUiList *uil, laPropPack *This, laPropPack *Unused, laColumn *UNUSED, int context){
- laColumn *c; laProp *p, *gp;
- if (This && This->LastPs){
- c = laFirstColumn(uil); gp = This->LastPs->p;
- laPropContainer* pc=la_EnsureSubTarget(gp,This->EndInstance);
- laShowLabel(uil,c,gp->PropertyType==LA_PROP_SUB?pc->Name:gp->Name,0,0)->Flags|=LA_UI_FLAGS_DISABLED;
- for (p = pc->Props.pFirst; p; p = p->Item.pNext){
- if(p->PropertyType!=LA_PROP_OPERATOR) continue;
- laShowItem(uil, c, This, p->Identifier);
- }
- }
- }
- void laui_StringPropUiDefine(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context){
- laColumn *c; laProp *p, *gp;
- if (!This || !This->LastPs) return;
- c = laFirstColumn(uil);
- gp = This->LastPs->p;
- if(Extra){
- laShowItemFull(uil, c, Extra, "copy_selection",0,"mode=CUT;text=Cut;icon=✀",0,0);
- laUiItem* b=laBeginRow(uil,c,0,0);
- laShowItemFull(uil, c, Extra, "copy_selection",0,"text=Copy",0,0)->Expand=1;
- laShowItemFull(uil, c, This, "copy",0,"text=All",0,0);
- laEndRow(uil,b);
- }else{
- laShowItem(uil, c, This, "copy");
- }
- laShowItem(uil, c, This, "paste");
- laShowSeparator(uil,c);
- laShowItem(uil, c, This, "restore");
- if(gp->Tag&LA_PROP_IS_FILE){ laShowItem(uil, c, This, "get_file_path"); }
- if(gp->Tag&LA_PROP_IS_FOLDER){ laShowItem(uil, c, This, "get_folder_path"); }
- }
- void laui_IdentifierOnly(laUiList *uil, laPropPack *This, laPropPack *OP_UNUSED, laColumn *Extra, int context){
- laColumn *col = Extra, *c, *cl, *cr, *crl, *crr, *cll, *clr, *clrl, *clrr, *clrrl, *clrrr;
- laUiItem *ui;
- c = laFirstColumn(uil);
- laShowItemFull(uil, c, This, "identifier", LA_WIDGET_STRING_PLAIN,0, 0, 0);
- }
- void laRebuildPathRecursive(laProp *p, char *buf){
- if (p->Container){
- laRebuildPathRecursive(p->Container, buf);
- sprintf(buf, ".%s", p->Identifier);
- }else
- sprintf(buf, "%s", p->Identifier);
- }
- void laui_IntPropInfo(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *ExtraColumns, int context){
- laColumn *col, *cl, *cr;
- laUiItem *b1,*b2;
- laUiList *tuil;
- col = laFirstColumn(uil);
- laSplitColumn(uil, col, 0.2);
- cl = laLeftColumn(col, 1);
- cr = laRightColumn(col, 0);
- laShowItemFull(uil, cr, Base, "base.identifier", LA_WIDGET_STRING_PLAIN,0, 0, 0);
- b1= laOnConditionToggle(uil, cl, 0,0,0,0,0);{
- for(laProp* p=MAIN.ContainerInt->Props.pFirst;p;p=p->Item.pNext){
- laShowItem(uil,cr,Base,p->Identifier);
- }
- }laEndCondition(uil,b1);
- }
- void laui_FloatPropInfo(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *ExtraColumns, int context){
- laColumn *col, *cl, *cr;
- laUiItem *b1,*b2;
- laUiList *tuil;
- col = laFirstColumn(uil);
- laSplitColumn(uil, col, 0.2);
- cl = laLeftColumn(col, 1);
- cr = laRightColumn(col, 0);
- laShowItemFull(uil, cr, Base, "base.identifier", LA_WIDGET_STRING_PLAIN,0, 0, 0);
- b1= laOnConditionToggle(uil, cl, 0,0,0,0,0);{
- for(laProp* p=MAIN.ContainerFloat->Props.pFirst;p;p=p->Item.pNext){
- laShowItem(uil,cr,Base,p->Identifier);
- }
- }laEndCondition(uil,b1);
- }
- void laui_SubPropInfoDefault(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
- laColumn *c, *cl, *cr, *cll, *clr, *crl, *crr, *crrl, *crrr;
- laUiItem *bracket, *b1, *b2;
- laPropContainer *pc;
- laProp *p;
- char buf[LA_RAW_CSTR_MAX_LEN]={0};
- c = laFirstColumn(uil);
- laSplitColumn(uil, c, 0.2); cl = laLeftColumn(c, 1); cr = laRightColumn(c, 0);
- laSplitColumn(uil, cr, 0.5); crrl = laLeftColumn(cr, 1*6); crrr = laRightColumn(cr, 0);
- laPropContainer* subc=Base->LastPs->p->SubProp;
- if (!((laSubProp*)Base->LastPs->p)->GetType){
- if (!subc) subc = la_ContainerLookup(((laSubProp *)Base->LastPs->p)->TargetID);
- if (!subc) return; Base->LastPs->p->SubProp=subc;
- }else{
- subc=((laSubProp*)Base->LastPs->p)->GetType(Base->EndInstance);
- }
- if (!Base->LastPs->p->UDFIsRefer && !Base->LastPs->p->UDFNoCreate && !Base->LastPs->p->UDFIsSingle){
- laShowItem(uil, cr, Base, "identifier")->Flags|=LA_UI_FLAGS_PLAIN;
- bracket = laOnConditionToggle(uil, cl, 0, 0, 0, 0, 0);
- }
- for (p = subc->Props.pFirst; p; p = p->Item.pNext){
- if (!(p->PropertyType & LA_PROP_SUB)){
- buf[0] = 0;
- sprintf(buf, "la.prop_containers#%s.properties#%s.name", p->Container->Identifier, p->Identifier);
- laShowItemFull(uil, crrl, 0, buf, LA_WIDGET_STRING_PLAIN,0, 0, 0);
- laShowItem(uil, crrr, Base, p->Identifier);
- //buf[0] = 0; sprintf(buf, "la.prop_containers#%s.properties#%s.name", p->Container->Identifier, p->Identifier); laShowItemFull(uil, crl, 0, buf, 0, laui_SubPropInfoDefault, 0);
- //buf[0] = 0; sprintf(buf, "la.prop_containers#%s.properties#%s.description", p->Container->Identifier, p->Identifier); laShowItemFull(uil, crr, 0, buf, 0, laui_SubPropInfoDefault, 0);
- laShowSeparator(uil, c);
- }else{
- //buf[0] = 0; sprintf(buf, "la.prop_containers#%s.properties#%s.name", p->Container->Identifier, p->Identifier); laShowItemFull(uil, crrl, 0, buf, LA_WIDGET_STRING_PLAIN, 0, 0);
- //buf[0] = 0; sprintf(buf, "la.prop_containers#%s.properties#%s.name", p->Container->Identifier, p->Identifier); laShowItemFull(uil, crl, 0, buf, 0, laui_SubPropInfoDefault, 0);
- //buf[0] = 0; sprintf(buf, "la.prop_containers#%s.properties#%s.description", p->Container->Identifier, p->Identifier); laShowItemFull(uil, crr, 0, buf, 0, laui_SubPropInfoDefault, 0);
- if (p->UDFIsRefer) laShowLabel(uil, crrr, "🠞", 0, 0);
- elif (p->UDFNoCreate) laShowLabel(uil, crrr, "n", 0, 0);
- else laShowLabel(uil, crrr, "🗇", 0, 0);
- buf[0] = 0;
- sprintf(buf, "la.prop_containers#%s.icon_id", ((laSubProp *)p)->TargetID);
- laShowIcon(uil, cl, 0, buf, 0);
- b1 = laOnConditionToggle(uil, crrl, 0, 0, 0, 0, 0);{ b1->Flags|=LA_TEXT_ALIGN_LEFT;
- sprintf(buf, "text=...%s;", p->Name);
- strSafeSet(&b1->ExtraInstructions, buf);
- laUiDefineFunc f=laui_SubPropInfoDefault;
- //if(!context) f=((laSubProp*)p)->GetType?0:(p->UiDefine?p->UiDefine:(p->SubProp&&p->SubProp->UiDefine?p->SubProp->UiDefine:laui_SubPropInfoDefault));
- laShowItemFull(uil, cr, Base, p->Identifier, 0,0, f, context);
- }
- laEndCondition(uil, b1);
- laShowSeparator(uil, c);
- }
- }
- if (!Base->LastPs->p->UDFIsRefer && !Base->LastPs->p->UDFNoCreate && !Base->LastPs->p->UDFIsSingle){
- laEndCondition(uil, bracket);
- }
- //laShowItemFull(uil, crl, Base, "identifier", 0, 0, 0);
- //p = Base->LastPs->p->SubProp->Props.pFirst;
- }
- void laui_SubPropSelection(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
- laColumn *c, *cl, *cr, *cll, *clr, *crl, *crr, *crrl, *crrr;
- laUiItem *bracket, *b1, *b2;
- laPropContainer *pc;
- laProp *p;
- laPropPack *pp;
- char buf[LA_RAW_CSTR_MAX_LEN]={0};
- c = laFirstColumn(uil);
- laSplitColumn(uil, c, 0.2);
- cl = laLeftColumn(c, 1);
- cr = laRightColumn(c, 0);
- laSplitColumn(uil, cr, 0.8);
- crl = laLeftColumn(cr, 0);
- crr = laRightColumn(cr, 100);
- laSplitColumn(uil, crl, 0.5);
- crrl = laLeftColumn(crl, 150);
- crrr = laRightColumn(crl, 0);
- if (!Base->LastPs->p->SubProp) Base->LastPs->p->SubProp = la_ContainerLookup(((laSubProp *)Base->LastPs->p)->TargetID);
- if (!Base->LastPs->p->UDFIsRefer){
- laShowItemFull(uil, cr, Base, "identifier", LA_WIDGET_STRING_PLAIN,0, 0, 0);
- bracket = laOnConditionToggle(uil, cl, 0, 0, 0, 0, 0);
- }
- for (p = Base->LastPs->p->SubProp->Props.pFirst; p; p = p->Item.pNext){
- if (p->PropertyType == LA_PROP_SUB){
- //buf[0] = 0; sprintf(buf, "la.prop_containers#%s.properties#%s.name", p->Container->Identifier, p->Identifier);
- //laShowItemFull(uil, crrl, 0, buf, LA_WIDGET_STRING_PLAIN, 0, 0);
- buf[0] = 0;
- sprintf(buf, "identifier=%s;", p->Identifier);
- laShowItemFull(uil, crrr, Base, "put_data_block", 0, buf, 0, 0);
- //laShowLabel(uil, crr, "PUT", 0, 0);
- b1 = laOnConditionToggle(uil, crrl, 0, 0, 0, 0, 0);{
- buf[0] = 0; sprintf(buf, "text=...%s;", p->Name); strSafeSet(&b1->ExtraInstructions, buf);
- laShowItemFull(uil, cr, Base, p->Identifier, 0,0, laui_SubPropSelection, 0)->Flags|=LA_TEXT_ALIGN_LEFT;
- }
- laEndCondition(uil, b1);
- laShowSeparator(uil, c);
- }
- }
- if (!Base->LastPs->p->UDFIsRefer){
- laEndCondition(uil, bracket);
- }
- //laShowItemFull(uil, crl, Base, "identifier", 0, 0, 0);
- //p = Base->LastPs->p->SubProp->Props.pFirst;
- }
- void laui_LinkerSelectionProp(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
- laColumn *c, *cl, *cr, *cll, *clr, *crl, *crr, *crrl, *crrr;
- laUiItem *bracket, *b1, *b2;
- laPropContainer *pc;
- laProp *p;
- laPropPack *pp;
- char buf[LA_RAW_CSTR_MAX_LEN]={0};
- c = laFirstColumn(uil);
- laSplitColumn(uil, c, 0.4);
- cl = laLeftColumn(c, 1);
- cr = laRightColumn(c, 0);
- b1=laBeginRow(uil,cr,0,0);
- laShowItemFull(uil, cr, Base, "identifier", LA_WIDGET_STRING_PLAIN,0, 0, 0);
- laShowIcon(uil, cr, Base, "pp.last_ps.property.sub_icon_id", 0);
- laEndRow(uil,b1);
- bracket = laOnConditionToggle(uil, cl, 0, 0, 0, 0, 0);{
- laShowItemFull(uil, cr, Base, "instances", 0,0, laui_LinkerSelectionInstance, 0);
- }
- bracket->State=LA_BT_ACTIVE;
- laEndCondition(uil, bracket);
- }
- void laui_LinkerSelectionInstance(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
- laColumn *c, *cl, *cr, *cll, *clr, *crl, *crr, *crrl, *crrr;
- laUiItem *bracket, *b1, *b2;
- laPropContainer *pc;
- laProp *p;
- laPropPack *pp;
- char buf[LA_RAW_CSTR_MAX_LEN]={0};
- c = laFirstColumn(uil);
- laSplitColumn(uil, c, 0.4);
- cl = laLeftColumn(c, 1);
- cr = laRightColumn(c, 0);
- laShowItemFull(uil, cr, Base, "identifier", LA_WIDGET_STRING_PLAIN,0, 0, 0);
- b1 = laOnConditionToggle(uil, cl, 0, 0, 0, 0, 0);{
- laShowItemFull(uil, cr, Base, "children", 0,0, laui_LinkerSelectionProp, 0);
- }
- laEndCondition(uil, b1);
- }
- void laui_DefaultPanelTitleBar(laUiList *uil, laPropPack *Base, laPropPack *Extra, laUiDefineFunc header){
- laColumn *c, *cl, *cr, *cll, *clr, *crl, *crr, *cb1, *cb2, *cb3;
- laUiItem *bracket, *b1, *b2;
- c = laFirstColumn(uil);
- laSplitColumn(uil, c, 0.3);
- cl = laLeftColumn(c, 1);
- cr = laRightColumn(c, 0);
- b1=laBeginRow(uil,cr,0,0);
- laUiItem* tu=laShowItemFull(uil, cr, Base, "title", LA_WIDGET_STRING_PLAIN,0, 0, 0);tu->Expand=1;tu->Flags|=LA_UI_FLAGS_NO_TOOLTIP;
- laShowItem(uil, cr, Base, "hide")->Flags|=LA_UI_FLAGS_ICON;
- laShowItem(uil, cr, Base, "dock")->Flags|=LA_UI_FLAGS_ICON;
- laShowItem(uil, cr, Base, "close")->Flags|=LA_UI_FLAGS_ICON;
- laEndRow(uil,b1);
- bracket = laOnConditionToggle(uil, cl, 0, 0, 0, 0, 0);{
- if(!Extra->LastPs->p->SubProp->Props.pFirst){
- laShowLabel(uil, cr, "Panel doesn't have configurable property.", 0, 0);
- }else{
- if(header){
- laShowLabel(uil, cr, "Panel properties:", 0, 0);
- header(uil, Base, Extra, cr, 0);
- }else{
- for(laProp* p = Extra->LastPs->p->SubProp->Props.pFirst;p;p=p->Item.pNext){
- if(p->PropertyType&LA_PROP_SUB){
- laShowItemFull(uil, cr, Extra, p->Identifier, LA_WIDGET_COLLECTION_SELECTOR,0,laui_IdentifierOnly,0);
- }else{ laShowItem(uil, cr, Extra, p->Identifier); }
- }
- }
- }
- //laShowItem(uil, cr, 0,"la.example_int");
- laShowSeparator(uil, c);
- //laShowLabel(uil, c, "Position:", 0, 0);
- //laShowItemFull(uil, c, Base, "position", LA_WIDGET_INT, 0, 0);
- //laShowLabel(uil, c, "Size:", 0, 0);
- //laShowItemFull(uil, c, Base, "size", LA_WIDGET_INT, 0, 0);
- //laShowLabel(uil, c, "Snapping:", 0, 0);
- //laShowItem(uil, c, Base, "snap_enable")->Flags=LA_UI_FLAGS_CYCLE|LA_UI_FLAGS_TRANSPOSE;
- //laShowItemFull(uil, c, Base, "snap", LA_WIDGET_INT, 0, 0);
- }
- laEndCondition(uil, bracket);
- }
- void laui_DefaultOperatorPanelTitleBar(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
- laColumn *c, *cl, *cr, *cll, *clr, *crl, *crr;
- laUiItem *bracket, *b1, *b2;
- c = laFirstColumn(uil);
- b1 = laBeginRow(uil,c,0,0);
- laUiItem* tu=laShowItemFull(uil, c, Base, "title", LA_WIDGET_STRING_PLAIN,0, 0, 0);tu->Expand=1;tu->Flags|=LA_UI_FLAGS_NO_TOOLTIP;
- laShowItem(uil, c, 0, "LA_cancel");//->Flags|=LA_UI_FLAGS_ICON;
- laEndRow(uil, b1);
- }
- void laui_ColumnItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context){
- laColumn *c0, *c, *cl, *cr, *cll, *clr, *crl, *crr, *clll, *cllr, *cll2, *clr2;
- laUiItem *bracket, *b1, *b2;
- c0 = laFirstColumn(uil);
- laSplitColumn(uil, c0, 0.8);
- cll = laLeftColumn(c0, 80);
- c = laRightColumn(c0, 0);
- laSplitColumn(uil, c, 0.7);
- cl = laLeftColumn(c, 0);
- cr = laRightColumn(c, 200);
- laSplitColumn(uil, cr, 0.5);
- crl = laLeftColumn(cr, 0);
- crr = laRightColumn(cr, 70);
- laSplitColumn(uil, cll, 0.5);
- clll = laLeftColumn(cll, 1);
- cllr = laRightColumn(cll, 0);
- laSplitColumn(uil, cl, 0.5);
- cll2 = laLeftColumn(cl, 0);
- clr2 = laRightColumn(cl, 70);
- //laShowItem(uil, c, Base, "self");
- bracket = laOnConditionThat(uil, crr, laPropExpression(0, "live_editor.current_ui")); // laOnConditionThat(uil, 0, "live_editor", la_LiveEditAllowShow);
- laShowItemFull(uil, cll, Base, "select_column", 0, "text=Select;", 0, 0);
- laEndCondition(uil, bracket);
- bracket = laOnConditionThat(uil, c, laPropExpression(Base, "sub_left"));{ //laOnConditionThat(uil, Base, 0, laui_SnapButtonShow); {
- laShowItem(uil, cll2, Base, "split_at");
- laShowItemFull(uil, clr2, Base, "merge_column", 0, "text=Merge;", 0, 0);
- b1 = laOnConditionThat(uil, c, laPropExpression(Base, "snap_state"));{
- laShowItem(uil, crl, Base, "snap_width");
- }
- laElse(uil, b1);{
- laShowLabel(uil, crl, "Align:", 0, 0)->Flags|=LA_TEXT_ALIGN_RIGHT;
- }
- laEndCondition(uil, b1);
- laShowItem(uil, crr, Base, "snap_state");
- laShowSeparator(uil, c0);
- b1 = laOnConditionToggle(uil, clll, 0, 0, 0, 0, 0);{
- laShowItemFull(uil, c, Base, "sub_left", LA_WIDGET_COLLECTION_SINGLE,0, laui_ColumnItem, 0);
- }
- laElse(uil, b1);{
- laShowLabel(uil, cllr, "Left", 0, 0);
- }
- laEndCondition(uil, b1);
- laShowSeparator(uil, c0);
- b1 = laOnConditionToggle(uil, clll, 0, 0, 0, 0, 0);{
- laShowItemFull(uil, c, Base, "sub_right", LA_WIDGET_COLLECTION_SINGLE,0, laui_ColumnItem, 0);
- }
- laElse(uil, b1);{
- laShowLabel(uil, cllr, "Right", 0, 0);
- }
- laEndCondition(uil, b1);
- }
- laElse(uil, bracket);{
- laShowItem(uil, c, Base, "split_column");
- }
- laEndCondition(uil, bracket);
- }
- void laui_DefaultMenuButtonsFileEntries(laUiList *uil, laPropPack *pp, laPropPack *actinst, laColumn *extracol, int context){
- laColumn* c=laFirstColumn(uil);
-
- laShowLabel(uil, c, "Function Test", 0, 0)->Flags|=LA_TEXT_MONO|LA_UI_FLAGS_DISABLED;
- laShowItem(uil, c, 0, "LA_pure_yes_no");
- laShowItem(uil, c, 0, "LA_file_dialog");
- laShowItem(uil, c, 0, "LA_udf_read");
- laShowItemFull(uil, c, 0, "LA_udf_read",0,"mode=append;text=Append",0,0);
- laShowItem(uil, c, 0, "LA_managed_save");
- laShowItem(uil, c, 0, "LA_manage_udf");
- laShowLabel(uil, c, "Other Entries", 0, 0)->Flags|=LA_TEXT_MONO|LA_UI_FLAGS_DISABLED;
- laShowItem(uil, c, 0, "LA_terminate_program");
- }
- void laui_DefaultMenuButtonsEditEntries(laUiList *uil, laPropPack *pp, laPropPack *actinst, laColumn *extracol, int context){
- laColumn* c=laFirstColumn(uil);
- laShowLabel(uil, c, "History", 0, 0)->Flags|=LA_TEXT_MONO|LA_UI_FLAGS_DISABLED;
- laShowItem(uil, c, 0, "LA_undo")->Flags|=LA_UI_FLAGS_NO_CONFIRM;
- laShowItem(uil, c, 0, "LA_redo")->Flags|=LA_UI_FLAGS_NO_CONFIRM;
- laShowSeparator(uil,c);
- laShowItemFull(uil, c, 0, "LA_panel_activator",0,"panel_id=LAUI_histories;text=Histories",0,0);
- }
- void laui_DefaultMenuButtonsOptionEntries(laUiList *uil, laPropPack *pp, laPropPack *actinst, laColumn *extracol, int context){
- laColumn* c=laFirstColumn(uil);
- laShowLabel(uil, c, "Settings", 0, 0)->Flags|=LA_TEXT_MONO|LA_UI_FLAGS_DISABLED;
- laShowItemFull(uil, c, 0, "LA_panel_activator", 0, "panel_id=LAUI_user_preferences;", 0, 0);
- laShowLabel(uil, c, "Information", 0, 0)->Flags|=LA_TEXT_MONO|LA_UI_FLAGS_DISABLED;
- laShowItemFull(uil, c, 0, "LA_panel_activator", 0, "panel_id=LAUI_about;text=About;", 0, 0);
- }
- void laui_DefaultMenuButtons(laUiList *uil, laPropPack *pp, laPropPack *actinst, laColumn *extracol, int context){
- laUiList *muil; laColumn *mc,*c = laFirstColumn(uil);
- muil = laMakeMenuPage(uil, c, "File");{
- mc = laFirstColumn(muil); laui_DefaultMenuButtonsFileEntries(muil,pp,actinst,extracol,0);
- }
- if(MAIN.InitArgs.HasHistories){
- muil = laMakeMenuPage(uil, c, "Edit");{
- mc = laFirstColumn(muil); laui_DefaultMenuButtonsEditEntries(muil,pp,actinst,extracol,0);
- }
- }
- muil = laMakeMenuPage(uil, c, "Options"); {
- mc = laFirstColumn(muil); laui_DefaultMenuButtonsOptionEntries(muil,pp,actinst,extracol,0);
- }
- }
- void laui_DefaultMenuExtras(laUiList *uil, laPropPack *pp, laPropPack *actinst, laColumn *extracol, int context){
- laColumn *c = laFirstColumn(uil);
- laShowLabel(uil, c, MAIN.MenuProgramName, 0, 0)->Expand=1;
- }
- void laui_DefaultMenuBarActual(laUiList *uil, laPropPack *pp, laPropPack *actinst, laColumn *extracol, int context){
- laUiList *muil;
- laColumn *c,*mc;
- laUiItem* bb;
- c = laFirstColumn(uil);
- laUiItem* row=laBeginRow(uil,c,0,0);
- bb=laOnConditionThat(uil,c,laPropExpression(0,"la.windows.operator_hints"));{
- laShowItem(uil,c,0,"la.windows.operator_hints");
- }laElse(uil,bb);{
- laShowItem(uil, c, 0, "LA_new_panel")->Flags=LA_UI_FLAGS_ICON;
- if(MAIN.MenuButtons){ MAIN.MenuButtons(uil,0,0,0,0); }
- laShowSeparator(uil,c);
- laUiItem* mui=laOnConditionThat(uil,c,laPropExpression(0,"la.windows.maximized_ui"));{
- laShowItemFull(uil,c,0,"LA_canvas_ui_maximize", 0, "icon=🡰;restore=true;text=Restore Layout", 0, 0);
- }laElse(uil,mui);{
- laUiItem* ui=laOnConditionThat(uil,c,laPropExpression(0,"la.windows.maximized_block"));{
- laShowItemFull(uil,c,0,"LA_block_maximize", 0, "icon=🡰;restore=true;text=Restore Layout", 0, 0);
- }laElse(uil,ui);{
- laShowItemFull(uil, c, 0, "LA_switch_layout", 0, "icon=🞐;show_list=true;", 0, 0)->Flags|=LA_UI_FLAGS_ICON;
- laShowItemFull(uil,c,0,"LA_switch_layout", 0, "icon=🡰;reverse=true;", 0, 0)->Flags|=LA_UI_FLAGS_ICON;
- laShowItemFull(uil,c,0,"LA_switch_layout", 0, "icon=🡲;", 0,0)->Flags|=LA_UI_FLAGS_ICON;
- laShowItem(uil, c, 0, "la.windows.layouts.identifier");
- laShowItem(uil,c,0,"LA_new_window")->Flags|=LA_UI_FLAGS_ICON;
- }laEndCondition(uil, ui);
- }laEndCondition(uil,mui);
- laUiItem* uc=laOnConditionThat(uil,c,laPropExpression(0,"la.user_preferences.enable_color_management"));{
- laShowSeparator(uil,c);
- laShowItem(uil,c,0,"la.windows.output_color_space");
- laShowItemFull(uil,c,0,"la.windows.output_show_overflow",0,"text=🟩;",0,0);
- laShowItemFull(uil,c,0,"la.windows.use_composing",0,"text=☀",0,0);
- laUiItem* cmp=laOnConditionThat(uil,c,laPropExpression(0,"la.windows.use_composing"));{
- muil = laMakeMenuPage(uil, c, "⯆");{ mc = laFirstColumn(muil);
- laUiItem*b,*ui;
- b=laBeginRow(muil,mc,0,0); laShowLabel(muil,mc,"γ",0,0);
- ui=laShowItemFull(muil, mc, 0, "la.windows.composing_gamma",0,"text=Gamma",0,0); ui->Expand=1;
- laShowItem(muil,mc,&ui->PP,"restore")->Flags|=LA_UI_FLAGS_NO_CONFIRM|LA_UI_FLAGS_ICON; laEndRow(muil,b);
- b=laBeginRow(muil,mc,0,0); laShowLabel(muil,mc,"◩",0,0);
- ui=laShowItemFull(muil, mc, 0, "la.windows.composing_blackpoint",0,"text=Blackpoint",0,0); ui->Expand=1;
- laShowItem(muil,mc,&ui->PP,"restore")->Flags|=LA_UI_FLAGS_NO_CONFIRM|LA_UI_FLAGS_ICON; laEndRow(muil,b);
- }
- }laEndCondition(uil, cmp);
- }laEndCondition(uil, uc);
- if(MAIN.MenuExtras){ laShowSeparator(uil,c); MAIN.MenuExtras(uil,0,0,0,0); }
- laUiItem* b1=laOnConditionThat(uil,c,laPropExpression(0,"la.windows.panels_hidden"));
- laShowSeparator(uil,c);
- muil = laMakeMenuPage(uil, c, "🡻 Minimized");{
- mc = laFirstColumn(muil);
- laShowItemFull(muil, mc, 0, "la.windows.panels_hidden", 0,0, laui_IdentifierOnly,0);
- }
- laEndCondition(uil, b1);
- b1=laOnConditionThat(uil,c,laPropExpression(0,"la.windows.is_fullscreen"));{
- laShowItemFull(uil,c,0,"LA_fullscreen",0,"restore=true;text=Restore;icon=🡷",0,0)->Flags|=LA_UI_FLAGS_EXIT_WHEN_TRIGGERED;
- }laElse(uil,b1);{
- laShowItemFull(uil,c,0,"LA_fullscreen",0,0,0,0)->Flags|=LA_UI_FLAGS_EXIT_WHEN_TRIGGERED;
- }laEndCondition(uil, b1);
- }laEndCondition(uil,bb);
- laEndRow(uil,row);
- }
- void laui_DefaultMenuBar(laWindow *w){
- laPanel *p;
- p =laCreateTopPanel(w, 0, 0, 0, 0, LA_RH, 0, 0, 0, 0, -1, -1, -1, 0);
- p->IsMenuPanel = 1;
- laui_DefaultMenuBarActual(&p->TitleBar, &p->PP, &p->PropLinkPP, 0, 0);
- }
- void laui_ThemeListItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context){
- laColumn *col, *cl, *cr;
- laUiItem *bracket;
- col = laFirstColumn(uil);
- bracket = laBeginRow(uil,col,0,0);
- laShowItemFull(uil, col, Base, "name", LA_WIDGET_STRING_PLAIN,0, 0, 0)->Expand=1;
- laShowItemFull(uil, col, Base, "author", LA_WIDGET_STRING_PLAIN,0, 0, 0);
- laEndRow(uil,bracket);
- }
- void laui_Theme(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context){
- laColumn *col, *cl, *cr, *cll, *clr;
- laUiItem *sui;
- laUiList *tuil;
- laUiItem *ui;
- //col = laFirstColumn(uil);
- //tuil = laMakeGroup(uil, col, "����ժҪ", 0, 0)->Page; {
- // col = laFirstColumn(tuil);
- // laSplitColumn(tuil, col, 0.7);
- // cl = laLeftColumn(col, 0);
- // cr = laRightColumn(col, 0);
- // laSplitColumn(tuil, cr, 0.6);
- // crl = laLeftColumn(cr, 0);
- // crr = laRightColumn(cr, 70);
- // laShowItemFull(tuil, cl, 0, "themes.name", 0, 0, 0);
- // laShowItemFull(tuil, crl, 0, "themes.author", 0, 0, 0);
- // laShowLabel(tuil, crr, 0, "EXEC", 0, 0, 0);
- //}
- col = laFirstColumn(uil); laSplitColumn(uil,col,0.5);
- cl=laLeftColumn(col,0); cr=laRightColumn(col,0);
- ui=laBeginRow(uil,col, 0,0);
- laShowItem(uil,col,Base, "delete");
- laShowItem(uil,col,Base, "name")->Expand=1;
- laEndRow(uil, ui);
- laShowLabel(uil, col, "Basics:",0,0);
- laShowLabel(uil, cl, "Base Color:",0,0)->Flags|=LA_TEXT_ALIGN_RIGHT; laShowItem(uil, cr, Base, "color");
- laShowLabel(uil, cl, "Accent Color:",0,0)->Flags|=LA_TEXT_ALIGN_RIGHT; laShowItem(uil, cr, Base, "accent_color");
- laShowItem(uil, cr, Base, "cursor_alpha");
- laShowItem(uil, cr, Base, "selection_alpha");
- laShowItem(uil, cr, Base, "inactive_mix");
- laShowItem(uil, cr, Base, "inactive_saturation");
- laShowLabel(uil, col, "Nodes:",0,0);
- laShowItem(uil, cr, Base, "wire_brightness");
- laShowItem(uil, cr, Base, "wire_saturation");
- laShowItem(uil, cr, Base, "wire_transparency");
- laShowLabel(uil, col, "Meshes:",0,0);
- laShowItem(uil, cl, Base, "edge_transparency");
- laShowItem(uil, cl, Base, "edge_brightness");
- laShowItem(uil, cr, Base, "vertex_transparency");
- laShowItem(uil, cr, Base, "vertex_brightness");
- laShowItem(uil, col, Base, "svertex_transparency");
- laShowItem(uil, col, Base, "sedge_transparency");
- laShowItem(uil, col, Base, "sface_transparency");
- laShowLabel(uil, col, "Widgets:",0,0);
- laShowItem(uil, col, Base, "boxed_themes")->Flags|=(LA_UI_FLAGS_NO_DECAL|LA_UI_FLAGS_NO_GAP);
- }
- void laui_BoxedThemeItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context){
- laColumn *col, *cl, *cr, *crl,*crr;
- laUiItem *bracket;
- laUiList *tuil;
- col = laFirstColumn(uil);
- laSplitColumn(uil, col, 0.8);
- cl = laLeftColumn(col, 1);
- cr = laRightColumn(col, 0);
- laSplitColumn(uil, cr, 0.5);
- crl = laLeftColumn(cr, 0);
- crr = laRightColumn(cr, 0);
- laShowItemFull(uil, cr, Base, "name", LA_WIDGET_STRING_PLAIN, 0 ,0,0);
- bracket = laOnConditionToggle(uil, cl, 0, 0, 0, 0, 0);{
- laShowItem(uil, cr, Base, "normal");
- laShowItem(uil, cr, Base, "active");
- laShowItem(uil, cr, Base, "border");
- laShowItem(uil, cr, Base, "text");
- laShowItem(uil, cr, Base, "text_active");
- laShowItem(uil, cr, Base, "alpha");
- laShowLabel(uil,crl,"Margins:",0,0);
- laShowItem(uil, crl, Base, "margins")->Flags=LA_UI_FLAGS_TRANSPOSE;
- laShowLabel(uil,crr,"Paddings:",0,0);
- laShowItem(uil, crr, Base, "paddings")->Flags=LA_UI_FLAGS_TRANSPOSE;
- }
- laEndCondition(uil, bracket);
- }
- void laui_PropertyContainerList(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context){
- laColumn *col, *cl, *cr, *crl, *crr, *cll, *clr, *crrl, *crrr;
- laUiItem *bracket;
- laUiList *tuil;
- col = laFirstColumn(uil);
- laSplitColumn(uil, col, 0.5);
- cl = laLeftColumn(col, 60);
- cr = laRightColumn(col, 0);
- laSplitColumn(uil, cr, 0.25);
- crl = laLeftColumn(cr, 0);
- crr = laRightColumn(cr, 0);
- laSplitColumn(uil, crr, 0.3);
- crrl = laLeftColumn(crr, 0);
- crrr = laRightColumn(crr, 0);
- laShowLabel(uil, cl, "Select", 0, 0);
- laShowLabel(uil, crl, "Identifier", 0, 0);
- laShowLabel(uil, crrl, "Name", 0, 0);
- laShowLabel(uil, crrr, "Description", 0, 0);
- laShowColumnAdjuster(uil, col);
- laShowItem(uil, col, Base, "properties");
- }
- void laui_WindowListItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context){
- laColumn *col, *cl, *cr, *cll, *clr;
- laUiItem *bracket;
- laUiList *tuil;
- cl = laFirstColumn(uil);
- laSplitColumn(uil, cl, 0.2);
- cll = laLeftColumn(cl, 1);
- clr = laRightColumn(cl, 0);
- laShowItem(uil, clr, Base, "title");
- bracket = laOnConditionToggle(uil, cll, 0, 0, 0, 0, 0);{
- laShowLabel(uil, clr, "Layouts", 0, 0);
- laShowItem(uil, clr, Base, "layouts");
- laShowLabel(uil, clr, "TopPanels", 0, 0);
- laShowItem(uil, clr, Base, "panels");
- }
- laEndCondition(uil, bracket);
- }
- void laui_LayoutListItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context){
- laColumn *col, *cl, *cr, *cll, *clr;
- laUiItem *bracket;
- laUiList *tuil;
- cl = laFirstColumn(uil);
- laSplitColumn(uil, cl, 0.2);
- cll = laLeftColumn(cl, 1);
- clr = laRightColumn(cl, 0);
- laShowItem(uil, clr, Base, "title");
- bracket = laOnConditionToggle(uil, cll, 0, 0, 0, 0, 0);{
- laShowItem(uil, clr, Base, "panels");
- }
- laEndCondition(uil, bracket);
- }
- void laui_PanelListItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context){
- laColumn *col, *cl, *cr, *cll, *clr;
- laUiItem *bracket;
- laUiList *tuil;
- cl = laFirstColumn(uil);
- laSplitColumn(uil, cl, 0.2);
- cll = laLeftColumn(cl, 1);
- clr = laRightColumn(cl, 0);
- laShowItem(uil, clr, Base, "title");
- bracket = laOnConditionToggle(uil, cll, 0, 0, 0, 0, 0);{
- laShowItemFull(uil, clr, Base, "size", LA_WIDGET_INT,0, 0, 0);
- }
- laEndCondition(uil, bracket);
- }
- void laui_UiTemplateListItemLiveEdit(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context){
- laColumn *col, *cl, *cr, *cll, *clr;
- laUiItem *bracket;
- laUiList *tuil;
- cl = laFirstColumn(uil);
- //bracket = laOnConditionThat(uil, cl, laNot(laPropExpression(Base, "for_panel"))); {
- bracket = laOnConditionThat(uil, cl, laAnd(laNot(laPropExpression(Base, "for_panel")), laOr(laNot(laPropExpression(Base, "target")), laEqual(laPropExpression(0, "live_editor.current_ui.prop_pack.last_ps.property.sub"), laPropExpression(Base, "target")))));{
- laShowItemFull(uil, cl, Base, "identifier", LA_WIDGET_STRING_PLAIN,0, 0, 0);
- }
- laElse(uil, bracket);{
- laShowItemFull(uil, cl, Base, "identifier", LA_WIDGET_STRING_PLAIN, "disabled=true;",0, 0);
- }
- laEndCondition(uil, bracket);
- }
- void laui_UiTemplateListItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context){
- laColumn *col, *cl, *cr, *cll, *clr, *clll, *cllr, *clrl, *clrr, *clrrl, *clrrr;
- laUiItem *bracket, *b1;
- laUiList *tuil;
- cl = laFirstColumn(uil);
- laSplitColumn(uil, cl, 0.2);
- cll = laLeftColumn(cl, LA_2RH);
- clr = laRightColumn(cl, 0);
- laSplitColumn(uil, cll, 0.5);
- clll = laLeftColumn(cll, 0);
- cllr = laRightColumn(cll, 0);
- laSplitColumn(uil, clr, 0.5);
- clrl = laLeftColumn(clr, 0);
- clrr = laRightColumn(clr, 200);
- laSplitColumn(uil, clrr, 0.2);
- clrrl = laLeftColumn(clrr, 1);
- clrrr = laRightColumn(clrr, 0);
- bracket = laOnConditionThat(uil, cll, laPropExpression(Base, "define_func"));{
- laShowLabel(uil, clll, "f", 0, 0);
- }
- laEndCondition(uil, bracket);
- bracket = laOnConditionThat(uil, cll, laPropExpression(Base, "descriptor"));{
- laShowLabel(uil, cllr, "🠞", 0, 0);
- }
- laEndCondition(uil, bracket);
- laShowItemFull(uil, clrl, Base, "identifier", LA_WIDGET_STRING_PLAIN,0, 0, 0);
- bracket = laOnConditionThat(uil, cll, laPropExpression(Base, "target_id"));{
- laShowIcon(uil, clrrl, Base, "target.icon_id", 0);
- laShowItemFull(uil, clrrr, Base, "target_id", LA_WIDGET_STRING_PLAIN,0, 0, 0);
- }
- laElse(uil, bracket);{
- b1 = laOnConditionThat(uil, cll, laPropExpression(Base, "for_panel"));{
- //laShowLabel(uil, clrrl, 0,, 0, 0);
- laShowLabel(uil, clrrr, "PANEL", 0, 0);
- }
- laElse(uil, b1);{
- laShowLabel(uil, clrrr, "-", 0, LA_WIDGET_STRING_PLAIN);
- }
- laEndCondition(uil, b1);
- }
- laEndCondition(uil, bracket);
- }
- void laui_PlainSceneListItem(laUiList *uil, laPropPack *This, laPropPack *OP_UNUSED, laColumn *Extra, int context){
- laColumn *col = Extra, *c, *cl, *cr, *crl, *crr, *cll, *clr, *clrl, *clrr, *clrrl, *clrrr;
- laUiItem *ui;
- //if (Extra)c = Extra;
- c = laFirstColumn(uil);
- laShowItemFull(uil, c, This, "name", LA_WIDGET_STRING_PLAIN, 0, 0, 0);
- }
- void laui_DataRestorePage(laUiList *uil, laPropPack *THIS_UNUSED, laPropPack *Operator, laColumn *UNUSED, int context){
- laColumn *col = laFirstColumn(uil), *c, *cl, *cr, *crl, *crr, *cll, *clr, *clrl, *clrr, *clrrl, *clrrr;
- laUiList *u;
- laUiItem *b;
- laShowItemFull(uil, col, 0, "la", 0, 0, laui_SubPropSelection, 0);
- laShowItemFull(uil, col, 0, "tns", 0, 0, laui_SubPropSelection, 0);
- }
- void laui_FileBrowserFileItem(laUiList *uil, laPropPack *This, laPropPack *OP_UNUSED, laColumn *Extra, int context){
- laColumn *c = Extra, *cl, *cr, *crl, *crr, *cll, *clr, *clrl, *clrr, *clrrl, *clrrr;
- laUiItem *ui;
- laSplitColumn(0, c, 0.1);
- cll = laLeftColumn(c, 1);
- clr = laRightColumn(c, 0);
- laSplitColumn(0, clr, 0.7);
- clrl = laLeftColumn(clr, 0);
- clrr = laRightColumn(clr, 0);
- laSplitColumn(0, clrr, 0.5);
- clrrl = laLeftColumn(clrr, 0);
- clrrr = laRightColumn(clrr, 0);
- laShowItemFull(uil, cll, This, "type", LA_WIDGET_ENUM_ICON_PLAIN, 0, 0, 0)->Flags|=LA_TEXT_ALIGN_RIGHT;
- //laShowItem(uil, cll, This, "is_folder");
- laShowItemFull(uil, clrl, This, "name", LA_WIDGET_STRING_PLAIN, 0, 0, 0);
- ui = laOnConditionThat(uil, clrr, laNot(laPropExpression(This, "is_folder")));{
- laShowItemFull(uil, clrrl, This, "time_modified.time_string", LA_WIDGET_STRING_PLAIN, 0, 0, 0);
- laShowItem(uil, clrrr, This, "size")->Flags|=LA_UI_FLAGS_NO_DECAL;
- }
- laEndCondition(uil, ui);
- //laShowSeparator(uil,cll)
- //laShowItemFull(uil, clrrl, This, "time_modified.time_string", LA_WIDGET_STRING_PLAIN, 0, 0);
- //laShowItem(uil, clrrr, This, "size");
- }
- void laui_FileBrowserDiskItem(laUiList *uil, laPropPack *This, laPropPack *OP_UNUSED, laColumn *Extra, int context){
- laColumn *col = Extra, *c, *cl, *cr, *crl, *crr;
- laUiItem *ui;
- c = Extra;
- laSplitColumn(0, c, 0.2);
- cl = laLeftColumn(c, LA_2RH);
- cr = laRightColumn(c, 0);
- laSplitColumn(0, cr, 0.5);
- crl = laLeftColumn(cr, 0);
- crr = laRightColumn(cr, 0);
- //laShowColumnAdjuster(uil, c);
- laShowItemFull(uil, cl, This, "id", LA_WIDGET_STRING_PLAIN, 0, 0, 0);
- laShowItem(uil, crl, This, "total_gb")->Flags |= LA_UI_FLAGS_NO_DECAL;
- laShowItem(uil, crr, This, "free_gb")->Flags |= LA_UI_FLAGS_NO_DECAL;
- }
- void laui_FileBrowserFileList(laUiList *uil, laPropPack *THIS_UNUSED, laPropPack *Operator, laColumn *UNUSED, int context){
- laColumn *col = laFirstColumn(uil), *c, *cl, *cr, *crl, *crr, *cll, *clr, *clrl, *clrr, *clrrl, *clrrr, *ulc;
- laUiList *u; laUiItem *b; laUiList *ul;
- laSplitColumn(uil, col, 0.25);
- cl = laLeftColumn(col, 10);
- cr = laRightColumn(col, 0);
- laShowItemFull(uil, cl, Operator, "folder_up", LA_WIDGET_BUTTON_NO_CONFIRM, 0 ,0,0);
- laShowItem(uil, cr, Operator, "path")->Expand=1;
- laUiItem* r=laBeginRow(uil,cr,0,0);
- laShowItem(uil, cr, Operator, "file_name")->Expand=1;
- laShowItem(uil, cr, Operator, "confirm")->Flags|=LA_UI_FLAGS_HIGHLIGHT|LA_UI_FLAGS_NO_CONFIRM;
- laEndRow(uil,r);
- laShowSeparator(uil,col);
- laUiItem* left=laMakeEmptyGroup(uil, cl, "left", 0); ul=left->Page; left->Flags|=LA_UI_FLAGS_NO_DECAL; ul->HeightCoeff=-1;
- ulc=laFirstColumn(ul);
- b=laOnConditionThat(ul,ulc,laPropExpression(Operator,"use_type"));{
- u = laMakeGroup(ul, ulc, "Use Format", 0)->Page; c = laFirstColumn(u);
- laShowItemFull(u,c,Operator,"available_extensions",0,0,laui_IdentifierOnly,0)->Flags|=LA_UI_FLAGS_NO_DECAL;
- }laEndCondition(ul,b);
- u = laMakeFoldableGroup(ul, ulc, "Bookmarks", 0, 0, 0)->Page; c = laFirstColumn(u);
- laShowItemFull(u,c,Operator,"bookmarks",0,0,laui_IdentifierOnly,0)->Flags|=LA_UI_FLAGS_NO_DECAL;
- u = laMakeGroup(ul, ulc, "Logic Drives", 0)->Page;
- c = laFirstColumn(u); laSplitColumn(u, c, 0.2); cll = laLeftColumn(c, LA_2RH); clr = laRightColumn(c, 0);
- laSplitColumn(u, clr, 0.5); clrl = laLeftColumn(clr, 0); clrr = laRightColumn(clr, 0);
- laShowColumnAdjuster(u, c);
- laShowItem(u, c, Operator, "disk_list");
- b = laMakeGroup(uil, cr, "File List", 0);b->State=LA_UI_ACTIVE; u=b->Page;
- u->HeightCoeff = -1;
- c = laFirstColumn(u); laSplitColumn(u, c, 0.1); cll = laLeftColumn(c, 1); clr = laRightColumn(c, 0);
- laSplitColumn(u, clr, 0.7); clrl = laLeftColumn(clr, 0); clrr = laRightColumn(clr, 0);
- laSplitColumn(u, clrr, 0.5); clrrl = laLeftColumn(clrr, 0); clrrr = laRightColumn(clrr, 0);
- laShowColumnAdjuster(u, c);
- laShowLabel(u, clrl, "File Name", 0, 0);
- laShowLabel(u, clrrl, "Last Modified On", 0, 0);
- laShowLabel(u, clrrr, "File Size", 0, 0);
- laShowItem(u, c, Operator, "file_list")->Flags|=LA_UI_FLAGS_NO_DECAL;
- }
- void laui_LinkerPanel(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
- laColumn *c, *cl, *cr, *cll, *clr, *crl, *crr, *crrl, *crrr, *gc;
- laUiList *gu;
- laUiItem *bracket, *b1, *b2;
- laPropContainer *pc;
- laProp *p;
- laPropPack *pp;
- char buf[LA_RAW_CSTR_MAX_LEN]={0};
- c = laFirstColumn(uil);
- laSplitColumn(uil, c, 0.2);
- cl = laLeftColumn(c, 100);
- cr = laRightColumn(c, 0);
- laSplitColumn(uil, cr, 0.2);
- crl = laLeftColumn(cr, 1);
- crr = laRightColumn(cr, 0);
- gu = laMakeGroup(uil, c, " UDF File Content", 0)->Page;{
- gc = laFirstColumn(gu);
- laShowItem(gu, gc, OperatorInst, "root_nodes");
- }
- }
- void laui_ManagedUDFItem(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
- laColumn *c=laFirstColumn(uil);
- laSplitColumn(uil,c,0.5);
- laColumn *cl=laLeftColumn(c, 1);
- laColumn *cr=laRightColumn(c,0);
- laUiItem* b2=laOnConditionThat(uil,cr,laPropExpression(Base,"udf"));{
- laUiItem* r=laBeginRow(uil,c,0,0);
- laUiItem* b=laOnConditionToggle(uil,c,0,0,0,0,0);strSafeSet(&b->ExtraInstructions,"text=🛈;");b->Flags|=LA_UI_FLAGS_PLAIN;{
- laShowItemFull(uil,c,Base,"udf.path",LA_WIDGET_STRING_PLAIN, 0 ,0,0);
- }laElse(uil,b);{
- laShowItemFull(uil,c,Base,"basename",LA_WIDGET_STRING_PLAIN, 0 ,0,0);
- }laEndCondition(uil,b);
- laEndRow(uil, r);
- }laElse(uil,b2);{
- laShowItemFull(uil,c,Base,"basename",LA_WIDGET_STRING_PLAIN, 0 ,0,0);
- }laEndCondition(uil,b2);
- }
- void laui_ManagedUDFOps(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
- laColumn *c=laFirstColumn(uil);
- laSplitColumn(uil,c,0.3);
- laColumn *cl=laLeftColumn(c, 1);
- laColumn *cr=laRightColumn(c,0);
- laUiItem* b1=laOnConditionThat(uil, cr, laPropExpression(Base, "udf"));{
- laShowItem(uil,cl,Base,"udf.modified");
- laUiItem* b=laBeginRow(uil,cr,0,0);
- laUiItem* b2=laOnConditionToggle(uil,cr,0,0,0,0,0);strSafeSet(&b2->ExtraInstructions,"text=🛈;");b2->Flags|=LA_UI_FLAGS_PLAIN;{
- laUiItem* ui=laShowItemFull(uil,cr,Base,"udf.path",LA_WIDGET_STRING_PLAIN, 0 ,0,0);ui->Expand=1;strSafeSet(&ui->ExtraInstructions,"text=Change");
- laShowItem(uil,cr,&ui->PP,"get_file_path");
- }laElse(uil,b2);{
- laShowItemFull(uil,cr,Base,"basename", LA_WIDGET_STRING_PLAIN, 0 ,0,0)->Expand=1;
- }laEndCondition(uil,b2);
- laEndRow(uil, b);
- }laElse(uil,b1);{
- laShowItemFull(uil,cr,0,"LA_managed_save_new_file",0,"feedback=NONE;",0,0);
- }laEndCondition(uil,b1);
- }
- void laui_ManagedPropInstance(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
- if(!Base ||! Base->EndInstance ||Base->LastPs->p->PropertyType!=LA_PROP_SUB) return;
- laColumn *c=laFirstColumn(uil);
- laSplitColumn(uil,c,0.3); laColumn *cl=laLeftColumn(c, 1); laColumn *cr=laRightColumn(c,0);
- laSplitColumn(uil,cr,0.6); laColumn *crl=laLeftColumn(cr, 0); laColumn *crr=laRightColumn(cr,20);
- laPropContainer* pc=la_EnsureSubTarget(Base->LastPs->p, Base->EndInstance);
- if(pc->UDFPropagate){
- char buf[128]; sprintf(buf,"Assign all \"%s\" into:",pc->Name);
- laShowLabel(uil,crl,buf,0,0)->Flags|=LA_TEXT_ALIGN_RIGHT|LA_UI_FLAGS_DISABLED;
- laShowItem(uil,crr,Base,"__single_udf_propagate");
- laShowLabel(uil,cl," ",0,0);
- }
-
- if(pc->OtherAlloc || Base->LastPs->p->UDFIsSingle){
- //laShowLabel(uil,cr,"(Item not allocated by memAcquire)",0,0)->Expand=1;
- }else{
- if(pc->Hyper==2){
- laShowItem(uil,cl,Base,"__modified"); laSplitColumn(uil,crl,0.4); laColumn *crll=laLeftColumn(crl, 0); laColumn *crlr=laRightColumn(crl,20);
- laUiItem* idui=laShowItem(uil,crll,Base,"identifier");idui->Flags|=LA_UI_FLAGS_PLAIN;idui->Expand=1;
- laShowItem(uil,crlr,Base,"__uid")->Flags|=LA_UI_FLAGS_NO_DECAL;
- if(pc->UDFPropagate){
- laColumn *crrl,*crrr,*udfc,*optionc; laSplitColumn(uil,crr,0.7); crrl=laLeftColumn(crr,0); crrr=laRightColumn(crr,1);
- laSplitColumn(uil,crrl,0.3); udfc=laLeftColumn(crrl,0); optionc=laRightColumn(crrl,8);
- laUiItem* uc=laOnConditionToggle(uil,crrr,0,0,0,0,0);{ strSafeSet(&uc->ExtraInstructions,"text=⮯;");
- laShowItem(uil,udfc,Base,"__file");
- laUiItem* sr=laBeginRow(uil,optionc,1,0);
- laShowItemFull(uil,optionc,Base,"__udf_propagate",0,"force=true;text=Force;",0,0)->Flags|=LA_TEXT_ALIGN_CENTER|LA_UI_FLAGS_NO_CONFIRM;
- laShowItemFull(uil,optionc,Base,"__udf_propagate",0,0,0,0)->Flags|=LA_TEXT_ALIGN_CENTER|LA_UI_FLAGS_NO_CONFIRM;
- laEndRow(uil,sr);
- }laElse(uil,uc);{
- laShowItem(uil,crrl,Base,"__file");
- }laEndCondition(uil,uc);
- }else{
- laShowItem(uil,crr,Base,"__file");
- }
- }else{
- //laShowItem(uil,crl,Base,"identifier")->Flags|=LA_UI_FLAGS_PLAIN;
- }
- }
- for(laProp*p=pc->Props.pFirst;p;p=p->Item.pNext){
- if(p->PropertyType!=LA_PROP_SUB || p->UDFIsRefer) continue;
- la_EnsureSubTarget(p,0);
- if(p->SubProp &&p->SubProp->Hyper!=2 &&(!p->UDFIsSingle)) continue;
- if(p->UDFNoCreate || p->UDFHideInSave) continue;
- if(p==pc->SaverDummy){
- laShowItem(uil,cl,Base,"__single_saver_dummy.__modified");
- laShowItem(uil,crl,Base,"identifier")->Flags|=LA_UI_FLAGS_PLAIN;
- laShowItem(uil,crr,Base,"__single_saver_dummy.__file");
- continue;
- }
- laUiItem* b=laOnConditionToggle(uil,c,0,0,0,0,0);{ strSafePrint(&b->ExtraInstructions,"text=📦 %s;",p->Identifier);
- b->Flags|=LA_UI_FLAGS_NO_DECAL|LA_TEXT_ALIGN_LEFT; b->State=LA_BT_ACTIVE;
- laShowItemFull(uil,cr,Base,p->Identifier,0, 0,laui_ManagedPropInstance,0)->Flags|=LA_UI_FLAGS_NO_DECAL|LA_UI_COLLECTION_NO_HIGHLIGHT;
- }laEndCondition(uil,b);
- }
- if(pc->UDFPropagate){
- laShowSeparator(uil,c);
- }
- }
- void laui_ManagedProp(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
- laColumn *c=laFirstColumn(uil),*cl,*cr,*cll,*clr;
- laPropPack PP={0}; if(!Base ||! Base->EndInstance) return;
- laManagedSaveProp* msp=Base->EndInstance;
- laSplitColumn(uil,c,0.6); cl=laLeftColumn(c,0); cr=laRightColumn(c,20);
- laSplitColumn(uil,cl,0.7); cll=laLeftColumn(cl,0); clr=laRightColumn(cl,0);
- laShowLabel(uil,cll,msp->Path->Ptr,0,0);
-
- laShowLabel(uil,clr,"UID",0,0)->Flags|=LA_UI_FLAGS_DISABLED|LA_TEXT_ALIGN_CENTER;
- laShowLabel(uil,cr,"File",0,0)->Flags|=LA_UI_FLAGS_DISABLED|LA_TEXT_ALIGN_CENTER;
- laShowItemFull(uil,c,0,msp->Path->Ptr,0, 0,laui_ManagedPropInstance,0)->Flags|=LA_UI_FLAGS_NO_DECAL|LA_UI_COLLECTION_NO_HIGHLIGHT;
- laShowSeparator(uil,c);
- }
- void laui_ManagedSavePanel(laUiList *uil, laPropPack *Base, laPropPack *Operator, laColumn *ExtraColumns, int context){
- laManagedSaveExtra*mse=Operator->EndInstance;
- laColumn *c=laFirstColumn(uil);
- if(mse->OnExit){
- laShowLabel(uil,c,"You still have unsaved/unassigned datablocks:",0,0)->Flags|=LA_TEXT_ALIGN_CENTER|LA_TEXT_LINE_WRAP;
- laShowSeparator(uil,c);
- }
- laUiItem* r=laBeginRow(uil,c,0,0);
- laShowLabel(uil,c,"Viewing",0,0);
- laShowItem(uil,c,Operator,"show_page")->Flags|=LA_UI_FLAGS_EXPAND;
- laEndRow(uil,r);
- laUiItem* g=laMakeEmptyGroup(uil,c,"List",0);{ g->State=LA_UI_ACTIVE;
- laUiList* gu=g->Page; gu->HeightCoeff=mse->OnExit?-4:-3; laColumn* gc=laFirstColumn(gu);
- laUiItem* b=laOnConditionThat(gu,gc,laEqual(laPropExpression(Operator, "show_page"),laIntExpression(0)));{
- laShowItemFull(gu,gc,0,"la.managed_props",0, 0,laui_ManagedProp,0)->Flags|=LA_UI_FLAGS_NO_DECAL|LA_UI_COLLECTION_NO_HIGHLIGHT;
- }laElse(gu,b);{
- laShowItemFull(gu,gc,0,"la.managed_udfs",0,0,0,0)->Flags|=LA_UI_FLAGS_NO_DECAL;
- }laEndCondition(gu,b);
- }
-
- if(mse->OnExit){
- laShowLabel(uil,c,"If you exit the program now, you will lose those changes.",0,0)->Flags|=LA_TEXT_ALIGN_CENTER|LA_TEXT_LINE_WRAP;
- }
- r=laBeginRow(uil,c,0,0);
- if(mse->OnExit){
- laShowItemFull(uil,c,0,"LA_cancel",0,"text=Discard And Quit;feedback=DISCARD_AND_QUIT",0,0);
- }
- laShowSeparator(uil,c)->Expand=1;
- laShowItemFull(uil,c,0,"LA_managed_save",0,"quiet=true;ignore_unassigned=true;text=Save All Modified;feedback=SAVE_MODIFIED",0,0);
- laEndRow(uil,r);
- }
- void laui_ResourceFolderItem(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
- laColumn *c;
- c = laFirstColumn(uil);
- laUiItem* b=laBeginRow(uil,c,0,0);
- laShowItem(uil, c, Base, "remove")->Flags|=LA_UI_FLAGS_ICON;
- laUiItem* ui=laShowItem(uil, c, Base, "path");
- ui->Expand=1;
- laShowItem(uil,c,&ui->PP,"get_folder_path")->Flags|=LA_UI_FLAGS_ICON;
- laEndRow(uil,b);
- }
- void laui_LogItem(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
- laShowItem(uil, ExtraColumns, Base, "content")->Flags|=LA_TEXT_LINE_WRAP|LA_TEXT_USE_NEWLINE|LA_TEXT_MONO|LA_UI_FLAGS_NO_TOOLTIP;
- }
- void laui_NodeRack(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context){
- laNodeRack* r=This->EndInstance;
- laColumn* c=laFirstColumn(uil),*cl, *cr;
- laShowLabel(uil,c,"\n",0,0);
- laUiItem* b=laBeginRow(uil,c,0,0);
- laShowItemFull(uil,c,This,"move",0,"icon=🡰;direction=left;",0,0)->Flags|=LA_UI_FLAGS_ICON;
- laUiItem* u=laShowItem(uil,c,This,"name"); u->Flags|=LA_UI_FLAGS_NO_DECAL|LA_TEXT_ALIGN_CENTER; u->Expand=1;
- laShowItemFull(uil,c,This,"move",0,"icon=🡲;direction=right;",0,0)->Flags|=LA_UI_FLAGS_ICON;
- laEndRow(uil,b);
- laShowLabel(uil,c,"\n",0,0);
- laShowItem(uil,c,This,"nodes")->Flags|=LA_UI_FLAGS_NO_DECAL;
- laShowLabel(uil,c,"\n",0,0);
- b=laBeginRow(uil,c,0,0);
- char args[64]=""; if(context) sprintf(args,"target=%d;",context);
- laShowItemFull(uil,c,This,"add_node",0,args,0,0)->Expand=1;
- laShowItem(uil,c,This,"delete")->Flags|=LA_UI_FLAGS_ICON;
- laShowItem(uil,c,This,"insert_rack");
- laEndRow(uil,b);
- laShowLabel(uil,c,"\n\n\n",0,0);
- }
- void laui_RackPage(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context){
- laColumn* c=laFirstColumn(uil); laRackPage* r=This->EndInstance;
- laUiItem* b=laOnConditionThat(uil,c,laPropExpression(This,"has_rack"));{
- laUiItem* g=laMakeGroup(uil,c,"Racks",0);{ g->Flags|=/*LA_UI_FLAGS_NO_GAP|LA_UI_FLAGS_NO_DECAL|*/LA_UI_FLAGS_NODE_CONTAINER;
- laUiList* gu=g->Page; laColumn* gc=laFirstColumn(gu); gu->AllowScale=1; gu->HeightCoeff=-1; g->State=LA_UI_ACTIVE;
- laUiItem* hui=laShowItemFull(gu,gc,This,"racks",0,0,laui_NodeRack,r?r->RackType:0); hui->Expand=15; hui->Flags|=LA_UI_FLAGS_NO_DECAL;
- }
- }laElse(uil,b);{
- laShowItemFull(uil,c,This,"add_rack",0,0,0,0);
- }laEndCondition(uil,b);
- }
- void laui_NodeCategory(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context){
- laColumn* c=laFirstColumn(uil); laNodeCategory* nc=This->EndInstance;
- if(nc->Ui){ nc->Ui(uil,This,Extra,0,context); return; }
- char buf[256];
- for(laListItemPointer* lip=nc->NodeTypes.pFirst;lip;lip=lip->pNext){
- laBaseNodeType* nt=lip->p; sprintf(buf,"feedback=%s;text=%s;icon=%lc;",nt->TypeName,nt->Name,nt->Icon?nt->Icon:' ');
- laShowItemFull(uil,c,0,"LA_confirm",0,buf,0,0);
- }
- }
- void laui_UserPreference(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
- laColumn* c = laFirstColumn(uil),*cl,*cr; laSplitColumn(uil,c,0.5);cl=laLeftColumn(c,0);cr=laRightColumn(c,0);
- laUiList *muil;
- laColumn *mc, *mcl, *mcr, *mcll, *mclr;
- laUiItem *b, *bracket;
- //_LA_PANEL_USER_PREFERENCE = p;
- //la_UDFAppendSharedTypePointer("_LA_PANEL_USER_PREFERENCE", _LA_PANEL_USER_PREFERENCE);
- //p->Show = 0;
- //p->FastUpdate = 1;
- b=laBeginRow(uil,cl,0,0);
- muil = laMakeMenuPage(uil, cr, "☰"); mc = laFirstColumn(muil);
- laShowItem(muil, mc, 0, "LA_restore_factory");
- laUiItem* ui=laShowLabel(uil,cl,"Save on exit:",0,0); ui->Expand=1; ui->Flags|=LA_TEXT_ALIGN_RIGHT;
- laShowItemFull(uil,cl,0,"la.user_preferences.save_preferences_on_exit",LA_WIDGET_ENUM_HIGHLIGHT,"text=🞆",0,0);
- laEndRow(uil,b);
- laShowItem(uil, cr, 0, "LA_save_user_preferences")->Expand = 1;
- bracket = laMakeTab(uil, c, 0);{
- for(laExtraPreferencePage* epp=MAIN.ExtraPreferencePages.pFirst;epp;epp=epp->Item.pNext){
- muil = laAddTabPage(bracket, epp->Name); epp->Func(muil,0,0,0,0);
- }
- muil = laAddTabPage(bracket, "Display");{
- //muil->HeightCoeff = -1;
- mc = laFirstColumn(muil);
- laSplitColumn(muil, mc, 0.5);
- mcl = laLeftColumn(mc, 0);
- mcr = laRightColumn(mc, 0);
- if(MAIN.PreferencePageDisplay){ MAIN.PreferencePageDisplay(muil,0,0,0,0); }
- laShowLabel(muil, mc, "Interface:", 0, 0);
- laShowLabel(muil, mcl, "Row Height:", 0, 0);
- laShowItem(muil, mcr, 0, "la.user_preferences.interface_size");
- laShowLabel(muil, mcl, "Font Size:", 0, 0);
- laShowItem(muil, mcr, 0, "la.user_preferences.font_size");
- laShowLabel(muil, mcl, "Margin Size:", 0, 0);
- laShowItem(muil, mcr, 0, "la.user_preferences.margin_size");
- laShowLabel(muil, mcl, "Panel Multisample:", 0, 0);
- laShowItem(muil, mcr, 0, "la.user_preferences.panel_multisample")->Flags|=LA_UI_FLAGS_EXPAND;
- laShowLabel(muil, mcl, "Top Framerate:", 0, 0);
- laShowItem(muil, mc, 0, "la.user_preferences.top_framerate");
- laShowSeparator(muil, mc);
- laShowLabel(muil, mc, "Color:", 0, 0);
- laShowItem(muil, mcl, 0, "la.user_preferences.color_picker_gamma");
- laShowItem(muil, mcr, 0, "la.user_preferences.enable_color_management");
- laShowLabel(muil, mc, "Viewport:", 0, 0);
- laShowItem(muil, mcl, 0, "la.user_preferences.viewport_halftone_factor");
- laShowItem(muil, mcr, 0, "la.user_preferences.viewport_halftone_size");
- laShowSeparator(muil, mc);
- laShowLabel(muil, mc, "Nodes:", 0, 0);
- laShowItem(muil, mcr, 0, "la.user_preferences.wire_color_slices");
- laShowItem(muil, mcr, 0, "la.user_preferences.wire_thickness");
- laShowItem(muil, mcr, 0, "la.user_preferences.wire_saggyness");
- laShowSeparator(muil, mc);
- laShowLabel(muil, mc, "Floating Panel:", 0, 0);
- laShowItem(muil, mcl, 0, "la.user_preferences.floating_alpha");
- laShowItem(muil, mcr, 0, "la.user_preferences.solid_shadow_length");
- laShowSeparator(muil, mc);
- laShowLabel(muil, mc, "Translation:", 0, 0);
- laShowLabel(muil, mcl, "Enable Translation:", 0, 0);
- laShowItemFull(muil, mcr, 0, "la.user_preferences.enable_translation",LA_WIDGET_ENUM_CYCLE,0,0,0);
- b = laOnConditionThat(muil, mcl, laPropExpression(0, "la.user_preferences.enable_translation"));{
- laShowLabel(muil, mcl, "Language:", 0, 0);
- laShowItemFull(muil, mcr, 0, "la.user_preferences.languages", LA_WIDGET_COLLECTION_SELECTOR, 0, 0, 0);
- laShowItem(muil, mcl, 0, "LA_translation_dump");
- }
- laEndCondition(muil, b);
- }
-
- muil = laAddTabPage(bracket, "Input");{
- //muil->HeightCoeff = -1;
- mc = laFirstColumn(muil);
- laSplitColumn(muil, mc, 0.5);
- mcl = laLeftColumn(mc, 0);
- mcr = laRightColumn(mc, 0);
- if(MAIN.PreferencePageInput){ MAIN.PreferencePageInput(muil,0,0,0,0); }
- laShowLabel(muil, mc, "User Interactions:", 0, 0);
- laShowItem(muil, mc, 0, "la.user_preferences.scroll_speed");
- laShowItem(muil, mcl, 0, "la.user_preferences.animation_speed");
- laShowItem(muil, mcr, 0, "la.user_preferences.panel_animation_speed");
- laShowItem(muil, mc, 0, "la.user_preferences.valuator_threshold");
- laShowItem(muil, mc, 0, "la.user_preferences.zoom_speed_2d");
- laShowItem(muil, mcl, 0, "la.user_preferences.tooltip_close_distance");
- laShowItem(muil, mcr, 0, "la.user_preferences.idle_time");
- laShowSeparator(muil,mc);
- laShowLabel(muil, mc, "Input device handling:", 0, 0);
- #ifdef _WIN32
- laShowLabel(muil, mc, "Not yet implemened on Windows.", 0, 0);
- #endif
- laShowLabel(muil, mcl, "Input Mapping:", 0, 0)->Flags|=LA_TEXT_ALIGN_RIGHT;
- laShowItemFull(muil, mcr, 0, "LA_panel_activator",0,"panel_id=LAUI_input_mapper;text=Configure",0,0);
- laShowLabel(muil, mcl, "Pads/Joysticks:", 0, 0)->Flags|=LA_TEXT_ALIGN_RIGHT;
- laShowItemFull(muil, mcr, 0, "LA_panel_activator",0,"panel_id=LAUI_controllers;text=Configure",0,0);
- laShowSeparator(muil,mc);
- laShowLabel(muil, mc, "Wacom Devices:", 0, 0);
- #ifdef _WIN32
- b=laBeginRow(muil,mcl,0,0); laShowSeparator(muil,mcl)->Expand=1;
- laShowLabel(muil, mcl, "Driver:", 0, 0)->Flags|=LA_TEXT_ALIGN_RIGHT;
- laShowItem(muil, mcl, 0, "LA_refresh_controllers")->Flags|=LA_UI_FLAGS_ICON;
- laEndRow(muil, b);
- laShowItem(muil, mcr, 0, "la.user_preferences.wacom_driver");
- #else
- laShowItem(muil, mcl, 0, "la.user_preferences.wacom_device_stylus");
- laShowItem(muil, mcl, 0, "la.user_preferences.wacom_device_eraser");
- laShowItemFull(muil, mcr, 0, "LA_refresh_controllers",0,"text=Refresh",0,0);
- #endif
- }
- if(MAIN.InitArgs.HasAudio){
- muil = laAddTabPage(bracket, "Audio");{
- mc = laFirstColumn(muil); laSplitColumn(muil, mc, 0.5);
- mcl = laLeftColumn(mc, 0); mcr = laRightColumn(mc, 0);
- laShowLabel(muil,mc,"Audio Device:",0,0);
- laShowItemFull(muil,mcl,0,"la.audio.current_audio_device",LA_WIDGET_COLLECTION_SELECTOR,0,laui_IdentifierOnly,0);
- laShowItem(muil,mcr,0,"LA_refresh_audio_devices");
- }
- }
- muil = laAddTabPage(bracket, "Resource");{
- //muil->HeightCoeff = -1;
- mc = laFirstColumn(muil);
- laSplitColumn(muil, mc, 0.5);
- mcl = laLeftColumn(mc, 0);
- mcr = laRightColumn(mc, 0);
- if(MAIN.PreferencePageResource){ MAIN.PreferencePageResource(muil,0,0,0,0); }
- laShowLabel(muil, mcl, "UDF Manager Default View:", 0, 0);
- laShowItem(muil, mcr, 0, "la.user_preferences.manager_default_view")->Flags|=LA_UI_FLAGS_EXPAND;
- laShowSeparator(muil,mc);
- b=laBeginRow(muil,mc,0,0);
- laShowLabel(muil, mc, "Resource Folders", 0, 0)->Expand=1;
- laShowItem(muil, mc, 0, "LA_add_resource_folder");
- laEndRow(muil,b);
- laShowItem(muil, mc, 0, "la.user_preferences.resource_folders");
- }
- muil = laAddTabPage(bracket, "Theme");{
- //muil->HeightCoeff = -1;
- mc = laFirstColumn(muil); laSplitColumn(muil,mc,0.4);
- mcl=laLeftColumn(mc,7);mcr=laRightColumn(mc,0);
- if(MAIN.PreferencePageTheme){ MAIN.PreferencePageTheme(muil,0,0,0,0); }
- laShowLabel(muil, mcl, "Active Theme", 0, 0);
- laShowItemFull(muil, mcr, 0, "la.themes", LA_WIDGET_COLLECTION_SELECTOR, 0,laui_ThemeListItem,0);
- laShowSeparator(muil,mc);
- laShowItemFull(muil, mc, 0, "la.themes", LA_WIDGET_COLLECTION_SINGLE, 0 ,0,0)->Flags|=LA_UI_FLAGS_NO_DECAL;
- }
- muil = laAddTabPage(bracket, "System");{
- mc = laFirstColumn(muil); laSplitColumn(muil, mc, 0.5);
- mcl = laLeftColumn(mc, 0); mcr = laRightColumn(mc, 0);
- laShowLabel(muil,mcl,"OpenGL Debugging:",0,0);
- if(MAIN.InitArgs.GLDebug){
- laShowLabel(muil,mc,"OpenGL debugging is force enabled with `--gl-debug`",0,0)->Flags|=LA_UI_FLAGS_DISABLED;
- }else{
- laShowItem(muil,mcr,0,"la.user_preferences.enable_gl_debug");
- laUiItem* b=laOnConditionThat(muil,mc,laPropExpression(0,"la.user_preferences.enable_gl_debug"));{
- laShowItem(muil,mcl,0,"la.user_preferences.gl_debug_sync");
- laShowItem(muil,mcr,0,"la.user_preferences.gl_debug_level")->Flags|=LA_UI_FLAGS_EXPAND;
- }laEndCondition(muil,b);
- }
- laShowSeparator(muil,mc);
- laShowLabel(muil,mcl,"Logs:",0,0);
- laShowItem(muil,mcr,0,"la.user_preferences.enable_log_stdout");
- }
- }
- }
- void laui_About(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
- laColumn *c, *cl, *cr, *tc, *gc, *gcl, *gcr, *tcl, *tcr;
- laUiItem *bracket, *t, *g;
- laPanel *p;
- laUiList *u, *gu;
- laPropContainer *pc;
- int h;
- laOperatorType *at;
- laUiList *first;
- char buf[2048]={0};
- c = laFirstColumn(uil);
- if(MAIN.AboutContent){
- MAIN.AboutContent(uil,Base,OperatorInst,ExtraColumns,0);
- }else{
- laShowLabel(uil, c, "LaGUI", 0, 0);
- laShowLabel(uil, c, "A graphical user interface application toolkit", 0, 0)->Flags|=LA_TEXT_LINE_WRAP;
- laShowLabel(uil, c, "(C)Yiming Wu", 0, 0);
- }
- t = laMakeTab(uil, c, 0);{
- first = u = laAddTabPage(t, "Version");
- tc = laFirstColumn(u);
- if(MAIN.AboutVersion){
- MAIN.AboutVersion(u,Base,OperatorInst,ExtraColumns,0);
- }
- g = laMakeGroup(u, tc, "LaGUI information", 0);
- gu = g->Page;{
- gc = laFirstColumn(gu);
- sprintf(buf, "LaGUI.%d.%d", LA_VERSION_MAIN, LA_VERSION_SUB);
- laShowLabel(gu, gc, buf, 0, 0)->Flags|=LA_TEXT_MONO;
- laShowLabel(gu, gc, LAGUI_GIT_BRANCH,0,0)->Flags|=LA_TEXT_MONO;
- #ifdef LAGUI_GIT_HASH
- laShowLabel(gu, gc, LAGUI_GIT_HASH,0,0)->Flags|=LA_TEXT_MONO;
- #endif
- sprintf(buf, "Built on:[UTC+8] %s %s", __DATE__, __TIME__);
- laShowLabel(gu, gc, buf, 0, 0)->Flags|=LA_TEXT_MONO;
- sprintf(buf, "UDF Identifier: %s",LA_UDF_IDENTIFIER);
- laShowLabel(gu, gc, buf, 0, 0)->Flags|=LA_TEXT_MONO;
- laShowLabel(gu, gc, "UDF Extensions:", 0, 0)->Flags|=LA_TEXT_MONO;
- laShowLabel(gu, gc, "🗸LA_UDF_BASICS", 0, 0)->Flags|=LA_TEXT_MONO;
- for(int i=0;i<64;i++){
- if(!LA_UDF_EXTENSION_STRINGS[i][0]) break; int gray=!((1<<i)&LA_UDF_EXTENSION_BITS);
- sprintf(buf,"%s%s",gray?" ":"🗸",LA_UDF_EXTENSION_STRINGS[i]);
- laUiItem* ext=laShowLabel(gu, gc, buf, 0, 0); ext->Flags|=LA_TEXT_MONO;
- if(gray){ ext->Flags|=LA_UI_FLAGS_DISABLED; }
- }
- }
-
- g = laMakeGroup(u, tc, "Device Graphics", 0);
- gu = g->Page;{
- gc = laFirstColumn(gu);
- sprintf(buf, "OpenGL Version: %s", T->GLVersionStr); laShowLabel(gu, gc, buf, 0, 0)->Flags|=LA_TEXT_MONO;
- sprintf(buf, "OpenGL Vendor: %s", T->GLVendorStr); laShowLabel(gu, gc, buf, 0, 0)->Flags|=LA_TEXT_MONO;
- sprintf(buf, "OpenGL Renderer: %s", T->GLRendererStr); laShowLabel(gu, gc, buf, 0, 0)->Flags|=LA_TEXT_MONO;
- sprintf(buf, "GLSL Version: %s", T->GLSLVersionStr); laShowLabel(gu, gc, buf, 0, 0)->Flags|=LA_TEXT_MONO;
- }
- u = laAddTabPage(t, "Authors");
- tc= laFirstColumn(u);
- if(MAIN.AboutAuthor){
- MAIN.AboutAuthor(u,Base,OperatorInst,ExtraColumns,0);
- }
- g = laMakeGroup(u, tc, "LaGUI", 0);
- gu = g->Page;{
- gc = laFirstColumn(gu);
- laShowLabel(gu,gc,"LaGUI application framework is made by Wu Yiming.",0,0)->Flags|=LA_TEXT_LINE_WRAP;
- laUiItem* b=laBeginRow(gu,gc,0,0);
- laShowItemFull(gu, gc, 0, "LA_open_internet_link", 0, "link=http://www.ChengduLittleA.com/lagui;text=Details", 0, 0);
- laShowItemFull(gu, gc, 0, "LA_open_internet_link", 0, "link=http://www.ChengduLittleA.com;text=Yiming's Blog", 0, 0);
- laEndRow(gu,b);
- }
- t->Page = first;
- }
- }
- void laui_UndoHistories(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
- laColumn* c=laFirstColumn(uil),*cl,*cr; laSplitColumn(uil,c,0.5);cl=laLeftColumn(c,0);cr=laRightColumn(c,0);
- laShowItem(uil,cl,0,"LA_undo"); laShowItem(uil,cr,0,"LA_redo")->Flags|=LA_TEXT_ALIGN_RIGHT;
- laUiItem* g=laMakeGroup(uil,c,"123",0);{ g->State=LA_UI_ACTIVE; g->Flags|=LA_UI_FLAGS_PREFER_BOTTOM;
- laUiList* gu=g->Page; laColumn* gc=laFirstColumn(gu); gu->HeightCoeff=-1;
- laShowItem(gu,gc,0,"la.differences")->Flags|=LA_UI_FLAGS_NO_DECAL;
- }
- }
- void laui_Terminal(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
- laColumn* c=laFirstColumn(uil),*cl,*cr; laSplitColumn(uil,c,0.4); cl=laLeftColumn(c,2); cr=laRightColumn(c,0);
- laUiItem* g=laMakeGroup(uil,c,"123",0);{ g->State=LA_UI_ACTIVE; g->Flags|=LA_UI_FLAGS_PREFER_BOTTOM;
- laUiList* gu=g->Page; laColumn* gc=laFirstColumn(gu); gu->HeightCoeff=-3;
- laShowItem(gu,gc,0,"la.logs")->Flags|=LA_UI_FLAGS_NO_DECAL;
- }
- laUiItem* b=laOnConditionThat(uil,c,laPropExpression(0,"la.terminal_incomplete"));{
- laShowLabel(uil,cl,"...",0,0)->Flags|=LA_TEXT_MONO|LA_TEXT_ALIGN_RIGHT;
- }laElse(uil,b);{
- laShowLabel(uil,cl,">>>",0,0)->Flags|=LA_TEXT_MONO|LA_TEXT_ALIGN_RIGHT;
- }laEndCondition(uil,b);
- laShowItem(uil,cr,0,"la.terminal_input")->Flags|=LA_UI_FLAGS_TERMINAL_INPUT|LA_TEXT_MONO;
- }
- void laui_IdleDataManager(laUiList *uil, laPropPack *Base, laPropPack *Extra, laColumn *ExtraColumns, int context){
- laColumn *c=laFirstColumn(uil);
- laUiItem* r=laBeginRow(uil,c,0,0);
- laShowLabel(uil,c,"Viewing",0,0);
- laShowItem(uil,c,Extra,"show_page")->Flags|=LA_UI_FLAGS_EXPAND;
- laEndRow(uil,r);
- laUiItem* g=laMakeEmptyGroup(uil,c,"List",0);{ g->State=LA_UI_ACTIVE;
- laUiList* gu=g->Page; gu->HeightCoeff=-3; laColumn* gc=laFirstColumn(gu);
- laUiItem* b=laOnConditionThat(gu,gc,laEqual(laPropExpression(Extra, "show_page"),laIntExpression(0)));{
- laShowItemFull(gu,gc,0,"la.managed_props",0, 0,laui_ManagedProp,0)->Flags|=LA_UI_FLAGS_NO_DECAL;
- }laElse(gu,b);{
- laShowItemFull(gu,gc,0,"la.managed_udfs",0,0,0,0)->Flags|=LA_UI_FLAGS_NO_DECAL;
- }laEndCondition(gu,b);
- }
-
- r=laBeginRow(uil,c,0,0);
- laShowSeparator(uil,c)->Expand=1;
- laShowItemFull(uil,c,0,"LA_managed_save",0,"quiet=true;ignore_unassigned=true;text=Save All Modified",0,0);
- laEndRow(uil,r);
- }
- void lauidetached_IdleDataManager(laPanel* p){
- la_MakeDetachedProp(p, "la.user_preferences.manager_default_view", "show_page");
- }
- void laui_TextureInspector(laUiList *uil, laPropPack *Base, laPropPack *Extra, laColumn *ExtraColumns, int context){
- laColumn *c=laFirstColumn(uil),*cl,*cr;
- laSplitColumn(0, c, 0.5);
- cl = laLeftColumn(c, 0);
- cr = laRightColumn(c, 0);
- laShowLabel(uil,cl,"Viewing Texture:",0,0)->Flags|=LA_TEXT_ALIGN_RIGHT;
- laShowItemFull(uil,cr,Extra,"textures",LA_WIDGET_COLLECTION_SELECTOR,0,0,0);
- laUiItem* u2=laShowCanvas(uil,c,Extra,"textures",0,-1);
- laDefault2DViewOverlayRight(u2);
- }
- void lauidetached_TextureInspector(laPanel* p){
- la_MakeDetachedProp(p, "tns.texture_list", "textures");
- }
- void laui_GameController(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context){
- laColumn* c=laFirstColumn(uil),*cl, *cr;
- laSplitColumn(uil,c,0.5); cl=laLeftColumn(c,0); cr=laRightColumn(c,0);
-
- laUiItem* b=laBeginRow(uil,cl,0,0);
- laUiItem* l=laShowLabel(uil,cl,"Controller:",0,0); l->Flags|=LA_TEXT_ALIGN_RIGHT; l->Expand=1;
- laShowItem(uil,cl,0,"LA_refresh_controllers")->Flags|=LA_UI_FLAGS_ICON;
- laEndRow(uil,b);
- laShowItemFull(uil,cr,Extra,"controllers",LA_WIDGET_COLLECTION_SELECTOR,0,laui_IdentifierOnly,0);
- b=laOnConditionThat(uil,c,laPropExpression(Extra,"controllers"));{
- laShowItemFull(uil,c,Extra,"controllers",LA_WIDGET_COLLECTION_SINGLE,0,0,0);
- }laElse(uil,b);{
- laShowLabel(uil,c,"Please select a controller.",0,0)->Flags|=LA_TEXT_ALIGN_CENTER;
- }
- }
- void lauidetached_GameController(laPanel* p){
- la_MakeDetachedProp(p, "la.controllers", "controllers");
- }
- void laui_InputMapper(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context){
- laColumn* c=laFirstColumn(uil);
- laUiItem* b=laBeginRow(uil,c,0,0);
- laShowItemFull(uil,c,0,"la.input_mapping.pages",LA_WIDGET_COLLECTION_SELECTOR,0,0,0)
- ->Flags|=LA_UI_COLLECTION_SIMPLE_SELECTOR;
- laUiItem* b3=laOnConditionThat(uil,c,laPropExpression(0,"la.input_mapping.current_page"));{
- laShowItem(uil,c,0,"la.input_mapping.current_page.name");
- laShowItem(uil,c,0,"LA_add_input_mapping_page")->Flags|=LA_UI_FLAGS_ICON;
- laShowItem(uil,c,Extra,"LA_input_mapping_rebuild")->Flags|=LA_UI_FLAGS_ICON;
- laShowSeparator(uil,c);
- laUiItem* cp=laShowInvisibleItem(uil,c,0,"la.input_mapping.current_page");
- laShowItem(uil,c,&cp->PP,"remove_input_mapping_page")->Flags|=LA_UI_FLAGS_ICON;;
- }laElse(uil,b3);{
- laShowItem(uil,c,0,"LA_add_input_mapping_page");
- }laEndCondition(uil,b3);
- laEndRow(uil,b);
- b3=laOnConditionThat(uil,c,laPropExpression(0,"la.input_mapping.current_page"));{
- laShowItemFull(uil,c,0,"la.input_mapping.current_page",LA_WIDGET_COLLECTION_SINGLE,0,laui_RackPage,0)->Flags|=LA_UI_FLAGS_NO_DECAL;
- }laEndCondition(uil,b3);
- }
- void lauidetached_Drivers(laPanel* p){
- la_MakeDetachedProp(p, "la.detached_view_switch", "detached");
- la_MakeDetachedProp(p, "tns.world.root_objects", "root_object");
- }
- void laui_DriverListItem(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context){
- laColumn* c=laFirstColumn(uil),*cl, *cr,*cll,*clr;
- laUiItem* b=laBeginRow(uil,c,0,0);
- laShowItem(uil,c,This,"use_script")->Flags|=LA_UI_FLAGS_ICON|LA_UI_FLAGS_NO_DECAL|LA_UI_FLAGS_CYCLE;
- laShowItem(uil,c,This,"identifier")->Flags|=LA_UI_FLAGS_PLAIN;
- laShowItem(uil,c,This,"trigger")->Flags|=LA_UI_FLAGS_PLAIN;
- laEndRow(uil,b);
- }
- void laui_Drivers(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context){
- laColumn* c=laFirstColumn(uil),*cl, *cr,*cll,*clr;
- laSplitColumn(uil,c,0.35); cl=laLeftColumn(c,7); cr=laRightColumn(c,0);
- laSplitColumn(uil,cl,0.4); cll=laLeftColumn(cl,1); clr=laRightColumn(cl,0);
- laShowItemFull(uil,cll,Extra,"detached",0,0,0,0)->Flags|=LA_UI_FLAGS_HIGHLIGHT|LA_UI_FLAGS_ICON;
- #define ADD_PAGE \
- laUiItem* b2=laOnConditionThat(uil,cl,laPropExpression(&rb->PP,""));{\
- laUiItem* b=laBeginRow(uil,cr,0,0);\
- laUiItem* b3=laOnConditionThat(uil,cl,laPropExpression(&rb->PP,"drivers.current_page"));{\
- laUiItem* cp=laShowItemFull(uil,cr,&rb->PP,"drivers.current_page",LA_WIDGET_COLLECTION_SELECTOR,0,laui_DriverListItem,0);\
- cp->Flags|=LA_UI_COLLECTION_SIMPLE_SELECTOR;\
- laShowItem(uil,cr,&cp->PP,"name");\
- laShowItem(uil,cr,&rb->PP,"add_driver_page")->Flags|=LA_UI_FLAGS_ICON|LA_UI_FLAGS_EXIT_WHEN_TRIGGERED;\
- laShowItem(uil,cr,&cp->PP,"remove_driver_page")->Flags|=LA_UI_FLAGS_ICON;\
- laShowSeparator(uil,cr);\
- laShowItem(uil,cr,&cp->PP,"trigger");\
- laShowItemFull(uil,cr,&cp->PP,"use_script",0,"icon=📃",0,0)\
- ->Flags|=LA_UI_FLAGS_HIGHLIGHT|LA_UI_FLAGS_CYCLE|LA_UI_FLAGS_ICON;\
- }laElse(uil,b3);{\
- laShowItem(uil,cr,&rb->PP,"add_driver_page")->Flags|=LA_UI_FLAGS_ICON|LA_UI_FLAGS_EXIT_WHEN_TRIGGERED;\
- }laEndCondition(uil,b3);\
- laEndRow(uil,b);\
- }laEndCondition(uil,b2);\
- b2=laOnConditionThat(uil,c,laPropExpression(&rb->PP,"drivers.current_page"));{\
- laUiItem* b3=laOnConditionThat(uil,c,laPropExpression(&rb->PP,"drivers.current_page.use_script"));{\
- laShowItemFull(uil,c,&rb->PP,"drivers.current_page.script",0,0,0,0)->Extra->HeightCoeff=-2;\
- }laElse(uil,b3);{\
- laShowItemFull(uil,c,&rb->PP,"drivers.current_page",LA_WIDGET_COLLECTION_SINGLE,0,laui_RackPage,0)->Flags|=LA_UI_FLAGS_NO_DECAL;\
- }laEndCondition(uil,b3);\
- }laElse(uil,b2);{\
- laShowLabel(uil,c,"Select or add a logic page.",0,0)->Flags|=LA_TEXT_ALIGN_CENTER;\
- }laEndCondition(uil,b2);
- laUiItem* b1=laOnConditionThat(uil,c,laPropExpression(Extra,"detached"));{
- laUiItem* rb=laShowItemFull(uil,clr,Extra,"root_object",LA_WIDGET_COLLECTION_SELECTOR,0,laui_IdentifierOnly,0);
- ADD_PAGE
- }laElse(uil,b1);{
- laUiItem* rb=laShowItemFull(uil,clr,0,"tns.world.active_root",LA_WIDGET_COLLECTION_SELECTOR,0,laui_IdentifierOnly,0);
- ADD_PAGE
- }laEndCondition(uil,b1);
- #undef ADD_PAGE
- }
- void lauidetached_Materials(laPanel* p){
- la_MakeDetachedProp(p, "la.detached_view_switch", "detached");
- la_MakeDetachedProp(p, "tns.world.materials", "material");
- }
- void laui_Materials(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context){
- laColumn* c=laFirstColumn(uil),*cl, *cr,*cll,*clr;
- laSplitColumn(uil,c,0.3); cl=laLeftColumn(c,1); cr=laRightColumn(c,0);
- laShowItemFull(uil,cl,Extra,"detached",0,0,0,0)->Flags|=LA_UI_FLAGS_HIGHLIGHT|LA_UI_FLAGS_ICON;
- #define ADD_PAGE(SEL) \
- laUiItem* b=laBeginRow(uil,cr,0,0);\
- laUiItem* b2=laOnConditionThat(uil,cr,laPropExpression(&rb->PP,""));{\
- laUiItem* cp=laShowInvisibleItem(uil,cr,&rb->PP,"shader_page");\
- if(SEL){\
- laShowItemFull(uil,cr,&rb->PP,"",LA_WIDGET_COLLECTION_SELECTOR,0,laui_IdentifierOnly,0)\
- ->Flags|=LA_UI_COLLECTION_SIMPLE_SELECTOR;\
- }\
- laShowItem(uil,cr,&rb->PP,"name");\
- laShowItem(uil,cr,0,"M_new_material")->Flags|=LA_UI_FLAGS_ICON;\
- laShowItem(uil,cr,&rb->PP,"remove")->Flags|=LA_UI_FLAGS_ICON;\
- laShowSeparator(uil,cr)->Expand=1;\
- laShowItemFull(uil,cr,&cp->PP,"use_script",0,"icon=📃;text=GLSL",0,0)\
- ->Flags|=LA_UI_FLAGS_HIGHLIGHT|LA_UI_FLAGS_CYCLE;\
- laShowItem(uil,cr,&rb->PP,"refresh");\
- laShowSeparator(uil,cr);\
- laShowItem(uil,cr,&rb->PP,"as_library")->Flags|=LA_UI_FLAGS_HIGHLIGHT|LA_UI_FLAGS_CYCLE;\
- }laElse(uil,b2);{\
- if(SEL){\
- laShowItemFull(uil,cr,&rb->PP,"",LA_WIDGET_COLLECTION_SELECTOR,"text=Select",laui_IdentifierOnly,0)\
- ->Flags|=LA_UI_COLLECTION_SIMPLE_SELECTOR|LA_UI_FLAGS_EXPAND;\
- laShowItem(uil,cr,0,"M_new_material")->Flags|=LA_UI_FLAGS_ICON;\
- }\
- }laEndCondition(uil,b2);\
- laEndRow(uil,b);\
- b2=laOnConditionThat(uil,c,laPropExpression(&rb->PP,"shader_page"));{\
- laUiItem* b3=laOnConditionThat(uil,c,laPropExpression(&rb->PP,"shader_page.use_script"));{\
- laShowItemFull(uil,c,&rb->PP,"shader_page.script",0,0,0,0)->Extra->HeightCoeff=-2;\
- }laElse(uil,b3);{\
- laShowItemFull(uil,c,&rb->PP,"shader_page",LA_WIDGET_COLLECTION_SINGLE,0,laui_RackPage,0)->Flags|=LA_UI_FLAGS_NO_DECAL;\
- }laEndCondition(uil,b3);\
- }laElse(uil,b2);{\
- laShowLabel(uil,c,"Select or add a shader page.",0,0)->Flags|=LA_TEXT_ALIGN_CENTER;\
- }laEndCondition(uil,b2);
- laUiItem* b1=laOnConditionThat(uil,c,laPropExpression(Extra,"detached"));{
- laUiItem* rb=laShowInvisibleItem(uil,cr,Extra,"material");
- ADD_PAGE(1)
- }laElse(uil,b1);{
- laShowInvisibleItem(uil,cr,0,"tns.world.active_root.active.as_mesh.materials"); // for switching updates.
- laUiItem* rb=laShowInvisibleItem(uil,cr,0,"tns.world.active_root.active.as_mesh.current_material.material");
- ADD_PAGE(0)
- }laEndCondition(uil,b1);
- #undef ADD_PAGE
- }
- void laui_AnimationActionSimple(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *ExtraColumns, int context){
- laColumn* c=laFirstColumn(uil);
- laUiItem* b=laBeginRow(uil,c,0,0);{
- laUiItem* b2=laOnConditionThat(uil,c,laEqual(laPropExpression(This,"__self"),laPropExpression(0,"la.animation.current_action")));{
- laShowLabel(uil,c,"🠶",0,0)->Flags|=LA_TEXT_MONO|LA_TEXT_ALIGN_RIGHT;
- }laElse(uil,b2);{
- laShowLabel(uil,c," ",0,0)->Flags|=LA_TEXT_MONO;
- }laEndCondition(uil,b2);
- laUiItem* ui=laShowItemFull(uil,c,This,"play_head",LA_WIDGET_VALUE_METER,0,0,0);
- ui->Flags|=LA_UI_FLAGS_NO_LABEL|LA_UI_FLAGS_UNDERNEATH; ui->Expand=1;
- laShowItem(uil,c,This,"name")->Flags|=LA_UI_FLAGS_NO_DECAL|LA_UI_FLAGS_NO_EVENT;
- laShowItemFull(uil,c,This,"solo",0,"icon=S;",0,0)->Flags=LA_UI_FLAGS_ICON|LA_UI_FLAGS_CYCLE|LA_UI_FLAGS_HIGHLIGHT;
- laShowItemFull(uil,c,This,"mute",0,"icon=M;",0,0)->Flags=LA_UI_FLAGS_ICON|LA_UI_FLAGS_CYCLE|LA_UI_FLAGS_HIGHLIGHT;
- }
- laEndRow(uil,b);
- }
- void laui_AnimationActionHolder(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *ExtraColumns, int context){
- laColumn* c=laFirstColumn(uil);
- laShowItemFull(uil,c,This,"identifier",LA_WIDGET_STRING_PLAIN,0,0,0);
- laShowItemFull(uil,c,This,"__actions__",0,0,laui_AnimationActionSimple,0)->Flags|=LA_UI_FLAGS_NO_DECAL;
- }
- void laui_AnimationActionListItem(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *ExtraColumns, int context){
- laColumn* c=laFirstColumn(uil); laUiItem* ui;
- laUiItem* b=laBeginRow(uil,c,0,0);{
- //laUiItem* b2=laOnConditionThat(uil,c,laNot(laEqual(laPropExpression(This,"__self"),laPropExpression(0,"la.animation.current_action"))));{
- // ui=laShowItemFull(uil,c,This,"play_head",LA_WIDGET_VALUE_METER,0,0,0);
- // ui->Flags|=LA_UI_FLAGS_NO_LABEL|LA_UI_FLAGS_UNDERNEATH; ui->Expand=1;
- //}laEndCondition(uil,b2);
- ui=laShowItem(uil,c,This,"name");
- ui->Flags|=LA_UI_FLAGS_NO_DECAL|LA_UI_FLAGS_NO_EVENT; ui->Expand=1;
- }
- laEndRow(uil,b);
- }
- void laui_AnimationActions(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context){
- laColumn* c=laFirstColumn(uil),*cl, *cr; laSplitColumn(uil,c,0.5); cl=laLeftColumn(c,0); cr=laRightColumn(c,5);
- laUiItem* b,*ui;
- ui=laShowItemFull(uil,cl,0,"la.animation.play_head",0,0,0,0);
- ui->Flags|=LA_UI_FLAGS_NO_LABEL|LA_TEXT_ALIGN_CENTER; ui->Expand=1;
- laUiItem* row=laBeginRow(uil,cr,0,0);
- laShowItemFull(uil,cr,0,"LA_animation_reset_time",0,0,0,0)->Flags|=LA_UI_FLAGS_ICON|LA_UI_FLAGS_EXIT_WHEN_TRIGGERED;
- b=laOnConditionThat(uil,cr,laPropExpression(0,"la.animation.play_status"));{
- ui=laShowItemFull(uil,cr,0,"LA_animation_set_play_status",0,"text=❚❚;",0,0);
- ui->Flags|=LA_UI_FLAGS_EXIT_WHEN_TRIGGERED|LA_TEXT_ALIGN_CENTER; ui->Expand=1;
- }laElse(uil,b);{
- ui=laShowItemFull(uil,cr,0,"LA_animation_set_play_status",0,"icon=◀;mode=reverse;",0,0);
- ui->Flags|=LA_UI_FLAGS_ICON|LA_UI_FLAGS_EXIT_WHEN_TRIGGERED; ui->Expand=1;
- ui=laShowItemFull(uil,cr,0,"LA_animation_set_play_status",0,"icon=▶;mode=forward;",0,0);
- ui->Flags|=LA_UI_FLAGS_ICON|LA_UI_FLAGS_EXIT_WHEN_TRIGGERED; ui->Expand=1;
- }laEndCondition(uil,b);
- laEndRow(uil,row);
- ui=laMakeEmptyGroup(uil,c,"Use Format",0); laUiList* gu=ui->Page; laColumn* gc=laFirstColumn(gu);
- gu->HeightCoeff=-2; //ui->Flags|=LA_UI_FLAGS_NO_DECAL;
- for(laActionHolderPath* ahp=MAIN.Animation->ActionHolderPaths.pFirst;ahp;ahp=ahp->Item.pNext){
- laShowLabel(gu,gc,ahp->PP.LastPs->p->Name,0,0)->Flags|=LA_UI_FLAGS_DISABLED|LA_TEXT_MONO;
- laShowItemFull(gu,gc,0,ahp->OriginalPath,LA_WIDGET_COLLECTION,"feedback=NONE",laui_AnimationActionHolder,0)->Flags|=LA_UI_FLAGS_NO_DECAL|LA_UI_FLAGS_NO_GAP;
- }
- row=laBeginRow(uil,cl,0,0);
- laShowItemFull(uil,cl,0,"LA_animation_new_action",0,"text=New",0,0);
- laEndRow(uil,row);
- }
- void laui_AnimationActionChannels(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context){
- laColumn* c=laFirstColumn(uil),*cl, *cr, *cll,*clr, *crl, *crr;
- laSplitColumn(uil,c,0.3); cl=laLeftColumn(c,6); cr=laRightColumn(c,0);
- laSplitColumn(uil,cl,0.75); cll=laLeftColumn(cl,0); clr=laRightColumn(cl,1);
- laSplitColumn(uil,cr,0.75); crl=laLeftColumn(cr,0); crr=laRightColumn(cr,10);
- laUiItem* b,*ui,*b2,*b3;
- laUiItem* row=laBeginRow(uil,cll,0,0);
- laShowItemFull(uil,cll,0,"LA_animation_reset_time",0,"current=true;text=1",0,0)->Flags|=LA_UI_FLAGS_EXIT_WHEN_TRIGGERED;
- b=laOnConditionThat(uil,cll,laPropExpression(0,"la.animation.play_status"));{
- ui=laShowItemFull(uil,cll,0,"LA_animation_set_play_status",0,"text=❚❚;",0,0);
- ui->Flags|=LA_UI_FLAGS_EXIT_WHEN_TRIGGERED|LA_TEXT_ALIGN_CENTER; ui->Expand=1;
- }laElse(uil,b);{
- ui=laShowItemFull(uil,cll,0,"LA_animation_set_play_status",0,"icon=◀;mode=reverse;",0,0);
- ui->Flags|=LA_UI_FLAGS_ICON|LA_UI_FLAGS_EXIT_WHEN_TRIGGERED; ui->Expand=1;
- ui=laShowItemFull(uil,cll,0,"LA_animation_set_play_status",0,"icon=▶;mode=forward;",0,0);
- ui->Flags|=LA_UI_FLAGS_ICON|LA_UI_FLAGS_EXIT_WHEN_TRIGGERED; ui->Expand=1;
- }laEndCondition(uil,b);
- laEndRow(uil,row);
- b2=laOnConditionThat(uil,c,laPropExpression(0,"la.animation.current_action"));{
- laUiItem* ca=laShowInvisibleItem(uil,c,0,"la.animation.current_action");
- row=laBeginRow(uil,crl,0,0);
- ui=laShowItemFull(uil,crl,&ca->PP,"play_head",LA_WIDGET_VALUE_METER,0,0,0);
- ui->Flags|=LA_UI_FLAGS_NO_LABEL|LA_UI_FLAGS_UNDERNEATH; ui->Expand=1;
- laShowItem(uil,crl,&ca->PP,"current_frame")->Flags|=LA_UI_FLAGS_NO_LABEL|LA_UI_FLAGS_NO_DECAL|LA_TEXT_ALIGN_CENTER;
- laShowSeparator(uil,crl);
- laShowItem(uil,crl,&ca->PP,"frame_count")->Flags|=LA_TEXT_ALIGN_CENTER;
- laShowItem(uil,crl,&ca->PP,"length");
- laEndRow(uil,row);
- b3=laBeginRow(uil,crr,0,0);
- laShowItem(uil,crr,&ca->PP,"name")->Expand=1;
- laShowItemFull(uil,crr,0,"LA_animation_select_action",0,0,0,0)->Flags|=LA_UI_FLAGS_ICON;
- laEndRow(uil,b3);
- b=laOnConditionToggle(uil,clr,0,0,0,0,0);{ strSafeSet(&b->ExtraInstructions,"text=☰");
- laShowItem(uil,cl,&ca->PP,"remove");
- row=laBeginRow(uil,cr,0,0);
- laShowItem(uil,cr,&ca->PP,"mix_mode")->Flags|=LA_UI_FLAGS_EXPAND;
- laShowItem(uil,cr,&ca->PP,"play_mode")->Flags|=LA_UI_FLAGS_EXPAND;
- laShowSeparator(uil,cr);
- laShowItem(uil,cr,&ca->PP,"solo")->Flags|=LA_UI_FLAGS_CYCLE|LA_UI_FLAGS_HIGHLIGHT;
- laShowItem(uil,cr,&ca->PP,"mute")->Flags|=LA_UI_FLAGS_CYCLE|LA_UI_FLAGS_HIGHLIGHT;
- laEndRow(uil,row);
- }laEndCondition(uil,b);
- }laElse(uil,b2);{
- laShowLabel(uil,crl,"Please select an action.",0,0);
- laShowItemFull(uil,crr,0,"LA_animation_select_action",0,0,0,0);
- }laEndCondition(uil,b2);
- laShowCanvas(uil,c,0,"la.animation.current_action","la_AnimationActionDrawCanvas",-1);
- }
- void tnsui_CameraObjectProperties(laUiList *uil, laPropPack *This, laPropPack *UNUSED_Extra, laColumn *UNUSED_Colums, int context){
- laColumn* c=laFirstColumn(uil);
- laShowLabel(uil,c,"Camera Object",0,0)->Flags|=LA_TEXT_ALIGN_CENTER|LA_UI_FLAGS_DISABLED;
- }
- void tnsui_LightObjectProperties(laUiList *uil, laPropPack *This, laPropPack *UNUSED_Extra, laColumn *UNUSED_Colums, int context){
- laColumn* c=laFirstColumn(uil);
- laShowLabel(uil,c,"Light Object",0,0)->Flags|=LA_TEXT_ALIGN_CENTER|LA_UI_FLAGS_DISABLED;
- }
- void tnsui_Material(laUiList *uil, laPropPack *This, laPropPack *UNUSED_Extra, laColumn *UNUSED_Colums, int context){
- laColumn* c=laFirstColumn(uil),*cl,*cr; laUiItem* b,*b1,*b2;
- laSplitColumn(uil,c,0.4); cl=laLeftColumn(c,8); cr=laRightColumn(c,0);
- if(!context){
- laShowLabel(uil,cl,"Name",0,0); laShowItem(uil,cr,This,"name");
- }
- b2=laOnConditionThat(uil,c,laPropExpression(This,"as_library"));{
- laShowLabel(uil,c,"Material is common library.",0,0);
- }laElse(uil,b2);{
- b=laBeginRow(uil,cl,0,0);
- laShowLabel(uil,cl,"Color",0,0)->Expand=1;
- b1=laOnConditionThat(uil,cl,laOr(laPropExpression(This,"shader_page.racks"),
- laPropExpression(This,"shader_page.use_script")));{
- laShowLabel(uil,cl,"🎨",0,0);
- }laEndCondition(uil,b1);
- laEndRow(uil,b);
- laShowItemFull(uil,cr,This,"color",LA_WIDGET_FLOAT_COLOR,0,0,0)->Flags|=LA_UI_FLAGS_COLORFUL;
- laShowItemFull(uil,cr,This,"colorful",LA_WIDGET_ENUM_HIGHLIGHT,0,0,0);
- }laEndCondition(uil,b2);
- laShowSeparator(uil,c);
- laShowItemFull(uil,c,This,"gradient_mode",0,0,0,0)->Flags|=LA_UI_FLAGS_EXPAND;
- b1=laOnConditionThat(uil,c,laPropExpression(This,"gradient_mode"));{
- laShowLabel(uil,cl,"End Color",0,0);
- laShowItemFull(uil,cr,This,"color2",LA_WIDGET_FLOAT_COLOR,0,0,0)->Flags|=LA_UI_FLAGS_COLORFUL;
- laShowLabel(uil,cl,"Center",0,0);
- laShowItemFull(uil,cr,This,"gradient_center",0,0,0,0);
- laShowLabel(uil,cl,"Size",0,0);
- laShowItemFull(uil,cr,This,"gradient_size",0,0,0,0);
- b2=laOnConditionThat(uil,c,laEqual(laPropExpression(This,"gradient_mode"),laIntExpression(TNS_GRADIENT_MODE_BOX)));{
- laShowItemFull(uil,cr,This,"gradient_box_r",0,0,0,0);
- laShowItemFull(uil,cr,This,"gradient_box_f",0,0,0,0);
- }laEndCondition(uil,b2);
- }laEndCondition(uil,b1);
-
- }
- void tnsui_MaterialListItem(laUiList *uil, laPropPack *This, laPropPack *UNUSED_Extra, laColumn *UNUSED_Colums, int context){
- laColumn* c=laFirstColumn(uil); laUiItem* b,*b1;
- b=laBeginRow(uil,c,0,0);
- laShowItemFull(uil,c,This,"color",LA_WIDGET_FLOAT_COLOR,0,0,0)->Flags|=LA_UI_FLAGS_NO_EVENT|LA_UI_FLAGS_ICON;
- laUiItem* ui=laShowItem(uil,c,This,"name"); ui->Flags|=LA_UI_FLAGS_PLAIN; ui->Expand=1;
- b1=laOnConditionThat(uil,c,laOr(laPropExpression(This,"shader_page.racks"),
- laPropExpression(This,"shader_page.use_script")));{
- laShowLabel(uil,c,"🎨",0,0);
- }laEndCondition(uil,b1);
- laEndRow(uil,b);
- }
- void tnsui_MaterialSlot(laUiList *uil, laPropPack *This, laPropPack *UNUSED_Extra, laColumn *UNUSED_Colums, int context){
- laColumn* c=laFirstColumn(uil); laUiItem* b,*b1,*b2,*b3;
- b1=laOnConditionThat(uil,c,laPropExpression(This,"material"));{
- b=laBeginRow(uil,c,0,0);
- b3=laOnConditionThat(uil,c,laPropExpression(This,"material.as_library"));{
- laShowLabel(uil,c,"LIB ",0,0)->Flags|=LA_UI_DISABLED;
- laShowItem(uil,c,This,"material.name")->Flags|=LA_UI_FLAGS_PLAIN|LA_UI_FLAGS_DISABLED;
- }laElse(uil,b3);{
- laShowItemFull(uil,c,This,"material.color",LA_WIDGET_FLOAT_COLOR,0,0,0)
- ->Flags|=LA_UI_FLAGS_NO_EVENT|LA_UI_FLAGS_ICON|LA_UI_FLAGS_COLORFUL;
- laUiItem* ui=laShowItem(uil,c,This,"material.name"); ui->Flags|=LA_UI_FLAGS_PLAIN; ui->Expand=1;
- b2=laOnConditionThat(uil,c,laOr(laPropExpression(This,"material.shader_page.racks"),
- laPropExpression(This,"material.shader_page.use_script")));{
- laShowLabel(uil,c,"🎨",0,0);
- }laEndCondition(uil,b2);
- }laEndCondition(uil,b3);
- laEndRow(uil,b);
- }laElse(uil,b1);{
- laShowItem(uil,c,This,"name")->Flags|=LA_UI_FLAGS_DISABLED;
- }laEndCondition(uil,b1);
- }
- void tnsui_MeshObjectProperties(laUiList *uil, laPropPack *This, laPropPack *UNUSED_Extra, laColumn *UNUSED_Colums, int context){
- laColumn* c=laFirstColumn(uil); laUiItem* g,*tg; laUiList* gu,*tu; laColumn* gc,*gcl,*gcr,*tc; laUiItem* b1,*b2,*b3,*b4,*b5;
- laShowLabel(uil,c,"Mesh Object",0,0)->Flags|=LA_TEXT_ALIGN_CENTER|LA_UI_FLAGS_DISABLED;
- g=laMakeGroup(uil,c,"Materials",0); gu=g->Page; gc=laFirstColumn(gu); laSplitColumn(gu,gc,0.7);
- gcl=laLeftColumn(gc,0); gcr=laRightColumn(gc,1);
- tg=laMakeEmptyGroup(gu,gcl,"Slots",0); tu=tg->Page; tc=laFirstColumn(tu); tu->HeightCoeff=4;
- laShowItemFull(tu,tc,This,"materials",0,0,tnsui_MaterialSlot,0)->Flags|=LA_UI_FLAGS_NO_DECAL;
- laShowItem(gu,gcr,This,"add_material_slot");
- b2=laOnConditionThat(gu,gc,laPropExpression(This,"current_material"));{
- laUiItem* mat=laShowInvisibleItem(gu,gc,This,"current_material");
- laShowItem(gu,gcr,&mat->PP,"remove");
- b3=laBeginRow(gu,gc,0,0); laUiItem* sel;
- laShowItem(gu,gc,This,"add_material")->Flags|=LA_UI_FLAGS_ICON;
- b4=laOnConditionThat(gu,gc,laPropExpression(&mat->PP,"material"));{
- sel=laShowItemFull(gu,gc,&mat->PP,"material",LA_WIDGET_COLLECTION_SELECTOR,0,tnsui_MaterialListItem,0);
- sel->Flags|=LA_UI_COLLECTION_SIMPLE_SELECTOR;
- laShowItem(gu,gc,&mat->PP,"material.name")->Expand=1;
- laShowItem(gu,gc,&sel->PP,"clear_selection")->Flags|=LA_UI_FLAGS_ICON;
- }laElse(gu,b4);{
- sel=laShowItemFull(gu,gc,&mat->PP,"material",LA_WIDGET_COLLECTION_SELECTOR,0,tnsui_MaterialListItem,0);
- sel->Flags|=LA_UI_COLLECTION_SIMPLE_SELECTOR; sel->Expand=1;
- }laEndCondition(gu,b4);
- laEndRow(gu,b3);
- b4=laOnConditionThat(gu,gc,laEqual(laPropExpression(This,"mode"),laIntExpression(TNS_MESH_EDIT_MODE)));{
- b5=laBeginRow(gu,gc,0,0);
- laShowLabel(gu,gc,"Edit:",0,0);
- laShowItemFull(gu,gc,This,"assign_material_slot",0,"text=Assign",0,0);
- laEndRow(gu,b5);
- }laEndCondition(gu,b4);
- laShowSeparator(gu,gc);
- b4=laOnConditionThat(gu,gc,laPropExpression(&mat->PP,"material"));{
- laShowItemFull(gu,gc,&mat->PP,"material",LA_WIDGET_COLLECTION_SINGLE,0,tnsui_Material,1)->Flags|=LA_UI_FLAGS_NO_DECAL;
- }laEndCondition(gu,b4);
- }laElse(gu,b2);{
- laShowLabel(gu,gc,"No active material slot.",0,0);
- }laEndCondition(gu,b2);
- }
- void tnsui_ShapeObjectProperties(laUiList *uil, laPropPack *This, laPropPack *UNUSED_Extra, laColumn *UNUSED_Colums, int context){
- laColumn* c=laFirstColumn(uil); laUiItem* g,*tg; laUiList* gu,*tu; laColumn* gc,*gcl,*gcr,*tc; laUiItem* b1,*b2,*b3,*b4,*b5;
- laShowLabel(uil,c,"Shape Object",0,0)->Flags|=LA_TEXT_ALIGN_CENTER|LA_UI_FLAGS_DISABLED;
- g=laMakeGroup(uil,c,"Materials",0); gu=g->Page; gc=laFirstColumn(gu); laSplitColumn(gu,gc,0.4);
- gcl=laLeftColumn(gc,10); gcr=laRightColumn(gc,0);
- laShowLabel(gu,gcl,"Backdrop",0,0);
- laShowItemFull(gu,gcr,This,"backdrop",0,"text=Backdrop",0,0)->Flags|=LA_UI_FLAGS_CYCLE|LA_UI_FLAGS_HIGHLIGHT;
- g=laMakeGroup(uil,c,"Materials",0); gu=g->Page; gc=laFirstColumn(gu); laSplitColumn(gu,gc,0.7);
- gcl=laLeftColumn(gc,0); gcr=laRightColumn(gc,1);
- tg=laMakeEmptyGroup(gu,gcl,"Slots",0); tu=tg->Page; tc=laFirstColumn(tu); tu->HeightCoeff=4;
- laShowItemFull(tu,tc,This,"materials",0,0,tnsui_MaterialSlot,0)->Flags|=LA_UI_FLAGS_NO_DECAL;
- laShowItem(gu,gcr,This,"add_material_slot");
- b2=laOnConditionThat(gu,gc,laPropExpression(This,"current_material"));{
- laUiItem* mat=laShowInvisibleItem(gu,gc,This,"current_material");
- laShowItem(gu,gcr,&mat->PP,"remove");
- b3=laBeginRow(gu,gc,0,0); laUiItem* sel;
- laShowItem(gu,gc,This,"add_material")->Flags|=LA_UI_FLAGS_ICON;
- b4=laOnConditionThat(gu,gc,laPropExpression(&mat->PP,"material"));{
- sel=laShowItemFull(gu,gc,&mat->PP,"material",LA_WIDGET_COLLECTION_SELECTOR,0,tnsui_MaterialListItem,0);
- sel->Flags|=LA_UI_COLLECTION_SIMPLE_SELECTOR;
- laShowItem(gu,gc,&mat->PP,"material.name")->Expand=1;
- laShowItem(gu,gc,&sel->PP,"clear_selection")->Flags|=LA_UI_FLAGS_ICON;
- }laElse(gu,b4);{
- sel=laShowItemFull(gu,gc,&mat->PP,"material",LA_WIDGET_COLLECTION_SELECTOR,0,tnsui_MaterialListItem,0);
- sel->Flags|=LA_UI_COLLECTION_SIMPLE_SELECTOR; sel->Expand=1;
- }laEndCondition(gu,b4);
- laEndRow(gu,b3);
- b4=laOnConditionThat(gu,gc,laEqual(laPropExpression(This,"mode"),laIntExpression(TNS_MESH_EDIT_MODE)));{
- b5=laBeginRow(gu,gc,0,0);
- laShowLabel(gu,gc,"Edit:",0,0);
- laShowItemFull(gu,gc,This,"assign_material_slot",0,"text=Assign",0,0);
- laEndRow(gu,b5);
- }laEndCondition(gu,b4);
- laShowSeparator(gu,gc);
- b4=laOnConditionThat(gu,gc,laPropExpression(&mat->PP,"material"));{
- laShowItemFull(gu,gc,&mat->PP,"material",LA_WIDGET_COLLECTION_SINGLE,0,tnsui_Material,1)->Flags|=LA_UI_FLAGS_NO_DECAL;
- }laEndCondition(gu,b4);
- }laElse(gu,b2);{
- laShowLabel(gu,gc,"No active material slot.",0,0);
- }laEndCondition(gu,b2);
- }
- void tnsui_InstancerObjectProperties(laUiList *uil, laPropPack *This, laPropPack *UNUSED_Extra, laColumn *UNUSED_Colums, int context){
- laColumn* c=laFirstColumn(uil), *cl,*cr;
- laSplitColumn(uil,c,0.5); cl=laLeftColumn(c,5); cr=laRightColumn(c,0);
- laShowLabel(uil,cl,"Instance",0,0); laShowItemFull(uil,cr,This,"instance",LA_WIDGET_COLLECTION_SELECTOR,0,laui_IdentifierOnly,0);
- laUiItem* b=laOnConditionThat(uil,c,laAnd(laPropExpression(This,"instance"),laPropExpression(This,"instance.__self.as_root_object.is_2d")));
- laShowSeparator(uil,c);
- laShowLabel(uil,cl,"Hook",0,0); laShowItemFull(uil,cr,This,"hook",0,0,0,0);
- laShowLabel(uil,cl,"Offsets",0,0); laShowItemFull(uil,cr,This,"hook_offset",0,0,0,0)->Flags|=LA_UI_FLAGS_TRANSPOSE;
- laEndCondition(uil,b);
- }
- void tnsui_RootObjectProperties(laUiList *uil, laPropPack *This, laPropPack *UNUSED_Extra, laColumn *UNUSED_Colums, int context){
- laColumn* c=laFirstColumn(uil), *cl,*cr;
- laSplitColumn(uil,c,0.5); cl=laLeftColumn(c,5); cr=laRightColumn(c,0);
- laShowLabel(uil,cl,"Mode",0,0); laShowItemFull(uil,cr,This,"is_2d",0,0,0,0)->Flags|=LA_UI_FLAGS_EXPAND;
- laShowLabel(uil,cl,"Active Camera",0,0); laShowItemFull(uil,cr,This,"active_camera",LA_WIDGET_COLLECTION_SELECTOR,0,laui_IdentifierOnly,0);
- }
- void tnsui_BaseObjectProperties(laUiList *uil, laPropPack *This, laPropPack *UNUSED_Extra, laColumn *UNUSED_Colums, int context){
- laColumn* c=laFirstColumn(uil); laUiItem* g,*tg; laUiList* gu,*tu; laColumn* gc,*gcl,*gcr,*tc; laUiItem* b1,*b2,*b3,*b4,*b5;
- laShowLabel(uil,c,"Generic",0,0)->Flags|=LA_TEXT_ALIGN_CENTER|LA_UI_FLAGS_DISABLED;
- g=laMakeGroup(uil,c,"Object",0); gu=g->Page; gc=laFirstColumn(gu);
- b1=laOnConditionToggle(gu,gc,0,0,0,0,0);{ strSafeSet(&b1->ExtraInstructions,"text=Transformations");
- //b1->State=LA_UI_ACTIVE;
- laSplitColumn(gu,gc,0.5); gcl=laLeftColumn(gc,0); gcr=laRightColumn(gc,0);
- laShowLabel(gu,gcl,"Location",0,0); laShowItem(gu,gcl,This,"location")->Flags|=LA_UI_FLAGS_TRANSPOSE;
- laShowLabel(gu,gcr,"Rotation",0,0); laShowItem(gu,gcr,This,"rotation")->Flags|=LA_UI_FLAGS_TRANSPOSE;
- laShowLabel(gu,gcr,"Scale",0,0); laShowItem(gu,gcr,This,"scale")->Flags|=LA_UI_FLAGS_TRANSPOSE;
- laUiItem* b=laOnConditionToggle(gu,gc,0,0,0,0,0);{ strSafeSet(&b->ExtraInstructions,"text=Delta");
- laShowLabel(gu,gcl,"Delta Loc",0,0); laShowItem(gu,gcl,This,"dlocation")->Flags|=LA_UI_FLAGS_TRANSPOSE;
- laShowLabel(gu,gcr,"Delta Rot",0,0); laShowItem(gu,gcr,This,"drotation")->Flags|=LA_UI_FLAGS_TRANSPOSE;
- laShowLabel(gu,gcr,"Delta Scale",0,0);laShowItem(gu,gcr,This,"dscale")->Flags|=LA_UI_FLAGS_TRANSPOSE;
- }laEndCondition(gu,b);
- laShowSeparator(gu,gc);
- }laEndCondition(gu,b1);
- }
- void tnsuidetached_ObjectProperties(laPanel* p){
- la_MakeDetachedProp(p, "la.detached_view_switch", "detached");
- la_MakeDetachedProp(p, "tns.world.root_objects", "root_object");
- la_MakeDetachedProp(p, "tns.world.property_page", "page");
- }
- void tnsui_ObjectProperties(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context){
- laColumn* c=laFirstColumn(uil);
- laUiItem* b=laBeginRow(uil,c,0,0);
- laShowItemFull(uil,c,Extra,"detached",0,0,0,0)->Flags|=LA_UI_FLAGS_HIGHLIGHT|LA_UI_FLAGS_ICON;
- #define ADD_PAGE1(base,path) \
- laUiItem* rb=laShowItemFull(uil,c,base,path,LA_WIDGET_COLLECTION_SELECTOR,0,laui_IdentifierOnly,0);\
- rb->Flags|=LA_UI_COLLECTION_SIMPLE_SELECTOR;\
- laUiItem* b2=laOnConditionThat(uil,c,laPropExpression(&rb->PP,""));{\
- laShowItem(uil,c,&rb->PP,"name")->Flags|=LA_UI_FLAGS_NO_DECAL;\
- laUiItem* b3=laOnConditionThat(uil,c,laPropExpression(&rb->PP,"active"));{\
- laShowLabel(uil,c,"⯈",0,0); laShowItem(uil,c,&rb->PP,"active.name")->Flags|=LA_UI_FLAGS_NO_DECAL;\
- }laEndCondition(uil,b3);\
- }laEndCondition(uil,b2);\
- laEndRow(uil,b);\
- b=laBeginRow(uil,c,0,0);\
- laShowItemFull(uil,c,Extra,"page",0,0,0,0)->Flags|=LA_UI_FLAGS_EXPAND;\
- laEndRow(uil,b);\
- b=laOnConditionThat(uil,c,laNot(laPropExpression(Extra,"page")));{\
- laShowItemFull(uil,c,base,path ".as_root_object",LA_WIDGET_COLLECTION_SINGLE,0,0,0)->Flags|=LA_UI_FLAGS_NO_DECAL;\
- }laElse(uil,b);
- #define ADD_PAGE2 \
- laUiItem* b3=laOnConditionThat(uil,c,laPropExpression(&actui->PP,""));{\
- tnsui_BaseObjectProperties(uil,&actui->PP,0,0,0);\
- }laElse(uil,b3);{\
- laShowLabel(uil,c,"No active object.",0,0)->Flags|=LA_TEXT_ALIGN_CENTER|LA_UI_FLAGS_DISABLED;;\
- }laEndCondition(uil,b3);\
- laEndCondition(uil,b);
- laUiItem* b0=laOnConditionThat(uil,c,laPropExpression(Extra,"detached"));{
- ADD_PAGE1(Extra,"root_object")
- laUiItem* actui=laShowItemFull(uil,c,&rb->PP,"active",LA_WIDGET_COLLECTION_SINGLE,0,0,0);
- actui->Flags|=LA_UI_FLAGS_NO_DECAL;
- ADD_PAGE2
- }laElse(uil,b0);{
- ADD_PAGE1(0,"tns.world.active_root")
- laUiItem* actui=laShowItemFull(uil,c,0,"tns.world.active_root.active",LA_WIDGET_COLLECTION_SINGLE,0,0,0);
- actui->Flags|=LA_UI_FLAGS_NO_DECAL;
- ADD_PAGE2
- }laEndCondition(uil,b0);
- #undef ADD_PAGE1
- #undef ADD_PAGE2
- }
- void tnsui_DetachedScenePanel(laPanel* p){
- la_MakeDetachedProp(p, "la.detached_view_switch", "detached");
- la_MakeDetachedProp(p, "tns.world.root_objects", "root_object");
- }
- void tnsui_ScenePanel(laUiList *uil, laPropPack *This, laPropPack *DetachedProps, laColumn *UNUSED, int context){
- laColumn* c=laFirstColumn(uil);
- laShow3DCanvasCombo(uil,c,DetachedProps,"root_object",-1,DetachedProps);
- }
- void tnsui_ObjectHierachy(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context);
- void tnsui_ChildObjectHierachy(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context){
- laColumn* c=laFirstColumn(uil); laShowItemFull(uil,c,This,"object",0,0,tnsui_ObjectHierachy,1)
- ->Flags|=LA_UI_FLAGS_NO_DECAL|LA_UI_FLAGS_NO_GAP|LA_UI_COLLECTION_NO_HIGHLIGHT;
- }
- void tnsui_ObjectHierachy(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context){
- laColumn* c=laFirstColumn(uil),*cl,*cr; laSplitColumn(uil,c,0.5); cl=laLeftColumn(c,1); cr=laRightColumn(c,0);
- laUiItem* r=laBeginRow(uil,cr,0,0);
- laShowItemFull(uil,cr,This,"name",0,0,0,0)->Flags|=LA_UI_FLAGS_NO_DECAL;
- laEndRow(uil,r);
- char* prop="base.children";
- laUiItem* b2=laOnConditionThat(uil,cl,laPropExpression(This,prop));{
- laUiItem* b=laOnConditionToggle(uil,cl,0,0,0,0,0);{ b->Flags|=LA_UI_FLAGS_NO_DECAL;
- b->State=LA_UI_ACTIVE;
- laShowItemFull(uil,cr,This,prop,0,0,tnsui_ChildObjectHierachy,0)
- ->Flags|=LA_UI_FLAGS_NO_DECAL|LA_UI_FLAGS_NO_GAP|LA_UI_COLLECTION_NO_HIGHLIGHT;
- }laEndCondition(uil,b);
- }laEndCondition(uil,b2);
- }
- void tnsui_WorldHierachy(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context){
- laColumn* c=laFirstColumn(uil),*gc; laUiList* gu;
- laUiItem* r=laBeginRow(uil,c,0,0);
- gu=laMakeMenuPage(uil,c,"Menu");{ gc=laFirstColumn(gu);
- laShowItem(gu,gc,0,"M_new_root");
- }
- laEndRow(uil,r);
- laUiItem* g=laMakeEmptyGroup(uil,c,"Hierachy",0);{ gu=g->Page; gc=laFirstColumn(gu);
- gu->HeightCoeff=-1; //g->Flags|=LA_UI_FLAGS_NO_DECAL;
- laShowItemFull(gu,gc,0,"tns.world.root_objects",0,0,tnsui_ObjectHierachy,0)->Flags|=LA_UI_FLAGS_NO_DECAL;
- }
- }
- void tnsui_RootObjectMenuUi(laUiList *uil, laPropPack *This, laPropPack *OperatorProps, laColumn *UNUSED, int context){
- laColumn* c=laFirstColumn(uil);
- laShowItemFull(uil, c, This, "name",LA_WIDGET_STRING_PLAIN,0,0,0);
- laShowItemFull(uil, c, This, "remove_root",0,0,0,0);
- laShowItemFull(uil, c, 0, "M_new_root",0,0,0,0);
- }
- void la_RegisterBuiltinTemplates(){
- int obj=MAIN.InitArgs.HasWorldObjects;
- int tex=MAIN.InitArgs.HasTextureInspector;
- int his=MAIN.InitArgs.HasHistories;
- int ter=MAIN.InitArgs.HasTerminal;
- int act=MAIN.InitArgs.HasAction&&obj;
- laRegisterUiTemplate("LAUI_input_mapper","Input Mapper",laui_InputMapper,0,0,"Controlling",0,0,0);
- laRegisterUiTemplate("LAUI_controllers", "Controllers", laui_GameController, lauidetached_GameController, 0,0,0,0,0);
- if(obj) laRegisterUiTemplate("LAUI_scene", "Scene", tnsui_ScenePanel, tnsui_DetachedScenePanel, 0, 0, 0,25,25);
- if(obj) laRegisterUiTemplate("LAUI_world_hierachy","World",tnsui_WorldHierachy,0,0,0,0,0,0);
- if(obj) laRegisterUiTemplate("LAUI_object_properties", "Properties", tnsui_ObjectProperties, tnsuidetached_ObjectProperties, 0, 0, 0,15,25);
- if(act) laRegisterUiTemplate("LAUI_animation_actions", "Actions", laui_AnimationActions, 0, 0, 0, 0,15,25);
- if(act) laRegisterUiTemplate("LAUI_animation_action_channels", "Action Channels", laui_AnimationActionChannels, 0, 0, 0, 0,20,15);
- if(obj) laRegisterUiTemplate("LAUI_drivers","Drivers",laui_Drivers,lauidetached_Drivers,0,0,0,0,0);
- if(obj) laRegisterUiTemplate("LAUI_materials","Materials",laui_Materials,lauidetached_Materials,0,0,0,0,0);
-
- laRegisterUiTemplate("LAUI_user_preferences", "User Preferences", laui_UserPreference, 0, 0, "System",0,25,25);
- if(tex) laRegisterUiTemplate("LAUI_texture_inspector", "Texture Inspector", laui_TextureInspector, lauidetached_TextureInspector, 0, 0, 0,0,0);
- laRegisterUiTemplate("LAUI_data_manager", "Data Manager", laui_IdleDataManager, lauidetached_IdleDataManager, 0, 0, 0,25,25);
- if(his) laRegisterUiTemplate("LAUI_histories", "Histories", laui_UndoHistories, 0, 0, 0, 0,10,25);
- laRegisterUiTemplate("LAUI_about", "About", laui_About, 0, 0, 0, 0,15,25);
- if(ter) laRegisterUiTemplate("LAUI_terminal", "Terminal", laui_Terminal, 0, 0, 0, 0,20,25);
-
- }
|