*/}}
Prechádzať zdrojové kódy

Theme, usability and etc changes

YimingWu 3 mesiacov pred
rodič
commit
acd96727f2

+ 2 - 0
la_audio.c

@@ -84,6 +84,8 @@ void IDN_InputInit(laSynthNodeInput* n, int NoCreate){
         if(!n->OutR) n->OutR=laCreateOutSocket(n,"R",LA_PROP_FLOAT|LA_PROP_ARRAY);
         return;
     }
+    n->OutL=laCreateOutSocket(n,"L",LA_PROP_FLOAT|LA_PROP_ARRAY);
+    n->OutR=laCreateOutSocket(n,"R",LA_PROP_FLOAT|LA_PROP_ARRAY);
     n->OutTime=laCreateOutSocket(n,"TIME",LA_PROP_FLOAT|LA_PROP_ARRAY);
     n->OutTrigger=laCreateOutSocket(n,"TRIGGER",LA_PROP_FLOAT|LA_PROP_ARRAY);
     strSafeSet(&n->Base.Name,"Input");

+ 15 - 2
la_data.c

@@ -103,6 +103,14 @@ laListHandle* laGetUserList(void* HyperUserMem, laProp* Which, int* IsLocal){
     *IsLocal=0;
     return memGetUserList(HyperUserMem);
 }
+int laCountUserSpecific(laListHandle* users, laProp* which, int* r_count){
+    int spec=0,count=0;
+    for(laItemUserLinker* iul=users->pFirst;iul;iul=iul->Pointer.pNext){
+        if(which == iul->Which){ spec++; } count++;
+    }
+    if(r_count){ *r_count=count; }
+    return spec;
+}
 
 laItemUserLinker *laUseDataBlock(void *HyperUserMem, laProp *Which, unsigned int FrameDistinguish, void *User, laUserRemoveFunc Remover, int ForceRecalc){
     laItemUserLinker *iul; laItemUserLinkerLocal *iull; int local;
@@ -3385,8 +3393,8 @@ int la_ExtractProp(laUDF *udf, laManagedUDF* mUDF, laPropPack *pp, void *ParentI
                             }
                         }
 
+                        if (pc->PostReadIm) pc->PostReadIm(Instance);
                         if (!IsExceptionNode && !replaced){
-                            if (pc->PostReadIm) pc->PostReadIm(Instance);
                             if (pp->LastPs->UseInstance){
                                 if (!p->UDFIsSingle){
                                     if (((laSubProp *)p)->ListHandleOffset){
@@ -3730,7 +3738,12 @@ int la_ScanForModifiedRecursive(laPropPack* pp, int ReturnIfAnyMod, int ReturnIf
             }
         }else{
             laMemNodeHyper* m = memGetHead(inst,0);
-            if(!m->FromFile || m->FromFile==MAIN.DummyManageUDF){ result|=1; if(rempty)*rempty|=1; if((ReturnIfAnyMod||ReturnIfAnyEmpty)&&result)return result; }
+            int DummyClean=((p!=p->Container->SaverDummy)||((p==p->Container->SaverDummy)&&(!m->Modified)));
+            if(!m->FromFile || m->FromFile==MAIN.DummyManageUDF){
+                if(!DummyClean){
+                    result|=1; if(rempty)*rempty|=1; if((ReturnIfAnyMod||ReturnIfAnyEmpty)&&result)return result;
+                }
+            }
             if((!p->UDFIsSingle)&&(!p->UDFNoCreate)&&RegisterToUDF&&m->FromFile&&m->FromFile->udf){ la_IncludeHyper2Instance(m->FromFile->udf, pc, inst); }
             if(m->Modified){
                 if(m->FromFile && m->FromFile->udf){ m->FromFile->udf->Modified=1; }

+ 42 - 17
la_interface.h

@@ -863,10 +863,13 @@ STRUCTURE(laBoxedTheme){
     real BorderY, Border[4];
 
     real TextY, Text[4];
-    real TextActiveY, TextActive[4], TextInactive[4];
+    real TextActiveY, TextActive[4], TextInactive[4], TextInvert[4];
     real Alpha;
 
-    int TextAlign;
+    int TextShadow;
+    int BoxStyle;
+    int ColorSelection;
+    int NoDecalInvert;
 
     laBoxedTheme **BackRef;
     laTheme* Parent;
@@ -891,27 +894,28 @@ extern unsigned char DATA_LUT_PROOF_CLAY[];
 extern unsigned char DATA_LUT_PROOF_D65P3[];
 
 #define LA_UI_NORMAL  0
-#define LA_UI_ACTIVE  (1<<0)
+#define LA_UI_ACTIVE   (1<<0)
 #define LA_UI_EDITING  (1<<1)
 #define LA_UI_DISABLED (1<<30)
 
 #define LA_BT_NORMAL LA_UI_NORMAL
 #define LA_BT_ACTIVE LA_UI_ACTIVE
-#define LA_BT_BORDER (1<<6)
-#define LA_BT_TEXT   (1<<7)
+#define LA_BT_NO_DECAL (1<<5)
+#define LA_BT_BORDER   (1<<6)
+#define LA_BT_TEXT     (1<<7)
 #define LA_BT_TEXT_NORMAL (LA_BT_TEXT|LA_UI_NORMAL)
 #define LA_BT_TEXT_ACTIVE (LA_BT_TEXT|LA_UI_ACTIVE)
 #define LA_BT_DISABLED LA_UI_DISABLED
-#define LA_BT_VERTEX (1<<8)
-#define LA_BT_EDGE   (1<<9)
-#define LA_BT_FACE   (1<<10)
+#define LA_BT_VERTEX   (1<<8)
+#define LA_BT_EDGE     (1<<9)
+#define LA_BT_FACE     (1<<10)
 #define LA_BT_SELECTED (1<<11)
-#define LA_BT_SVERTEX (LA_BT_VERTEX|LA_BT_SELECTED)
-#define LA_BT_SEDGE   (LA_BT_EDGE|LA_BT_SELECTED)
-#define LA_BT_SFACE   (LA_BT_FACE|LA_BT_SELECTED)
-#define LA_BT_WARNING (1<<12)
+#define LA_BT_SVERTEX  (LA_BT_VERTEX|LA_BT_SELECTED)
+#define LA_BT_SEDGE    (LA_BT_EDGE|LA_BT_SELECTED)
+#define LA_BT_SFACE    (LA_BT_FACE|LA_BT_SELECTED)
+#define LA_BT_WARNING  (1<<12)
 #define LA_UI_WARNING LA_BT_WARNING
-#define LA_BT_SHADOW (1<<13)
+#define LA_BT_SHADOW   (1<<13)
 
 #define LA_UI_TAG_IS_OFFSCREEN  (1<<0)
 #define LA_UI_TAG_CAVANS_SCALED (1<<1)
@@ -921,13 +925,14 @@ extern unsigned char DATA_LUT_PROOF_D65P3[];
 STRUCTURE(laTheme){
     laListItem Item;
     laSafeString *Name;
-    laSafeString *Author;
     laListHandle Colors;
     laListHandle BoxedThemes;
     int abc;
     //
     real ColorBkg[4];
     real Color[4];
+    real ColorB[4];
+    real ColorC[4];
     real AccentColor[4];
     real WarningColor[4];
     real SelectionColor[4];
@@ -936,6 +941,8 @@ STRUCTURE(laTheme){
     real InactiveSaturation;
     real CursorAlpha;
     real SelectionAlpha;
+    real ShadowAlpha;
+    real TextShadowAlpha;
 
     real WireSaturation;
     real WireTransparency;
@@ -947,6 +954,7 @@ STRUCTURE(laTheme){
     real SEdgeColor[4];
     real SFaceColor[4];
     real ShadowColor[4];
+    real TextShadowColor[4];
     real EdgeBrightness, EdgeTransparency;
     real VertexBrightness, VertexTransparency;
     real SelectedVertexTransparency;
@@ -2233,6 +2241,21 @@ int la_ColorPickerGetHeight(laUiItem *ui);
 int la_SymbolGetHeight(laUiItem *ui);
 int la_GroupGetHeight(laUiItem *ui);
 
+void la_DrawBorder(int L, int R, int U, int B);
+void la_DrawBox(int L, int R, int U, int B);
+void la_DrawOuterShadowLength(int L, int R, int U, int B, int sw);
+void la_DrawOuterShadow(int L, int R, int U, int B);
+void la_DrawInnerShadowLength(int L, int R, int U, int B, int sw);
+void la_DrawInnerShadow(int L, int R, int U, int B);
+void la_DrawBoxAutoArrayStyle(int L, int R, int U, int B, laBoxedTheme* bt, int State, real* ReplaceColor, int IsVertical, int IsFirst, int BoxStyle);
+void la_DrawBoxAutoArray(int L, int R, int U, int B, laBoxedTheme* bt, int State, real* ReplaceColor, int IsVertical, int IsFirst);
+void la_DrawBoxAuto(int L, int R, int U, int B, laBoxedTheme* bt, int State, real* ReplaceColor);
+void la_DrawBoxAutoFillArray(int L, int R, int U, int B, laBoxedTheme* bt, int State, real* ReplaceColor, int IsVertical, int IsFirst);
+void la_DrawBoxAutoFill(int L, int R, int U, int B, laBoxedTheme* bt, int State, real* ReplaceColor);
+void la_DrawBoxAutoBorderArray(int L, int R, int U, int B, laBoxedTheme* bt, int State, int IsVertical, int IsFirst);
+void la_DrawBoxAutoBorder(int L, int R, int U, int B, laBoxedTheme* bt, int State);
+int la_GetBoxOffset(laBoxedTheme* bt, int State);
+
 laPanel *la_FindFreePanelByTemplate(laWindow *w, const laUiTemplate *uit);
 laUiItem *la_FindUiWithMark(laUiList *uil, char *mark);
 laUiList *la_FindSubListWithInstance(laUiItem *ui, void *Instance);
@@ -2578,9 +2601,10 @@ laCanvasTemplate *laRegisterCanvasTemplate(char *Identifier, char *ForContainer,
 
 laTheme *laDuplicateTheme(laTheme* from);
 void la_DestroyTheme(laTheme* t);
-laTheme *laDesignTheme(const char *Name, const char *AuthorName);
-laBoxedTheme *laDesignBoxedTheme(laTheme *t, const char *Name, laBoxedTheme** BackRef,
-                                 real NormalY,real ActiveY,real BorderY,real TextY,real TextActiveY, real Alpha);
+laTheme *laDesignTheme(const char *Name);
+laBoxedTheme *laDesignBoxedTheme(laTheme *t, const char *Name, laBoxedTheme** BackRef, int ColorSelection,
+                                 real NormalY,real ActiveY,real BorderY,real TextY,real TextActiveY, real Alpha,
+                                 int BoxStyle, int TextShadow);
 laTheme *laGetTheme(const char *ThemeName);
 laBoxedTheme *laGetBoxedTheme(const char *ThemeName, const char *BoxName);
 real* laThemeColor(laBoxedTheme* bt, int which);
@@ -2801,5 +2825,6 @@ extern laProp _P_LA_USE_INSTANCE_ONLY;
 #define LA_RH2 ((int)(MAIN.ScaledUiRowHeight/2))
 #define LA_SCROLL_W ((int)(MAIN.ScaledUiRowHeight * 0.67))
 #define LA_SEAM_W ((int)(MAIN.ScaledUiRowHeight * 0.15))
+#define LA_SHADOW_W ((int)(MAIN.ScaledUiRowHeight / 10.0f))
 
 #define LA_M (MAIN.ScaledMargin)

+ 76 - 104
la_kernel.c

@@ -2196,19 +2196,21 @@ void laSetInputProcessCallback(laInputProcessF InputProcess){
 laTheme *laDuplicateTheme(laTheme* from){
     laTheme *t = memAcquireHyper(sizeof(laTheme));
     strSafePrint(&t->Name, "~%s", SSTR(from->Name));
-    strSafeSet(&t->Author, SSTR(from->Author));
     lstPushItem(&MAIN.Themes, t);
     MAIN.CurrentTheme = t;
     char buf[32]; sprintf(buf,"LATHEME_%.22s",SSTR(t->Name));
     laset_InstanceUID(t, buf);
 
     tnsVectorSet3v(t->Color,from->Color);
+    tnsVectorSet3v(t->ColorB,from->ColorB);
+    tnsVectorSet3v(t->ColorC,from->ColorC);
     tnsVectorSet3v(t->AccentColor,from->AccentColor);
     tnsVectorSet3v(t->WarningColor,from->WarningColor);
     t->InactiveMix=from->InactiveMix;
     t->InactiveSaturation=from->InactiveSaturation;
     t->CursorAlpha=from->CursorAlpha;
     t->SelectionAlpha=from->SelectionAlpha;
+    t->ShadowAlpha=from->ShadowAlpha; t->TextShadowAlpha=from->TextShadowAlpha;
     t->WireBrightness=from->WireBrightness;
     t->WireSaturation=from->WireSaturation;
     t->WireTransparency=from->WireTransparency;
@@ -2221,8 +2223,8 @@ laTheme *laDuplicateTheme(laTheme* from){
     t->SelectedVertexTransparency=from->SelectedVertexTransparency;
     
     for(laBoxedTheme* bt=from->BoxedThemes.pFirst;bt;bt=bt->Item.pNext){
-        laBoxedTheme* new_bt = laDesignBoxedTheme(t,SSTR(bt->Name),bt->BackRef,
-            bt->NormalY,bt->ActiveY,bt->BorderY,bt->TextY,bt->TextActiveY,bt->Alpha);
+        laBoxedTheme* new_bt = laDesignBoxedTheme(t,SSTR(bt->Name),bt->BackRef,bt->ColorSelection,
+            bt->NormalY,bt->ActiveY,bt->BorderY,bt->TextY,bt->TextActiveY,bt->Alpha,bt->BoxStyle,bt->TextShadow);
     }
 
     la_RefreshThemeColor(t);
@@ -2232,27 +2234,27 @@ void la_DestroyTheme(laTheme* t){
     MAIN.CurrentTheme = t->Item.pPrev?t->Item.pPrev:t->Item.pNext;
     lstRemoveItem(&MAIN.Themes, t);
     laBoxedTheme*bt; while(bt=lstPopItem(&t->BoxedThemes)){ strSafeDestroy(&bt->Name); *bt->BackRef=0; memFree(bt); }
-    strSafeDestroy(&t->Name); strSafeDestroy(&t->Author);
+    strSafeDestroy(&t->Name);
     memFree(t);
 }
-laTheme *laDesignTheme(const char *Name, const char *AuthorName){
+laTheme *laDesignTheme(const char *Name){
     laTheme *t = memAcquireHyper(sizeof(laTheme));
     strSafeSet(&t->Name, Name);
-    strSafeSet(&t->Author, AuthorName);
     lstPushItem(&MAIN.Themes, t);
     MAIN.CurrentTheme = t;
     char buf[32]; sprintf(buf,"LATHEME_%.22s",Name);
     laset_InstanceUID(t, buf);
     return t;
 }
-laBoxedTheme *laDesignBoxedTheme(laTheme *t, const char *Name, laBoxedTheme** BackRef,
-                                 real NormalY,real ActiveY,real BorderY,real TextY,real TextActiveY, real Alpha){
+laBoxedTheme *laDesignBoxedTheme(laTheme *t, const char *Name, laBoxedTheme** BackRef, int ColorSelection,
+                                 real NormalY,real ActiveY,real BorderY,real TextY,real TextActiveY, real Alpha,
+                                 int BoxStyle, int TextShadow){
     laBoxedTheme *bt = memAcquire(sizeof(laBoxedTheme));
     strSafeSet(&bt->Name, Name);
-    bt->NormalY=NormalY;
-    bt->ActiveY=ActiveY;
-    bt->BorderY=BorderY;
+    bt->ColorSelection = ColorSelection;
+    bt->NormalY=NormalY; bt->ActiveY=ActiveY; bt->BorderY=BorderY;
     bt->TextY=TextY; bt->TextActiveY=TextActiveY; bt->Alpha = Alpha;
+    bt->BoxStyle = BoxStyle; bt->TextShadow = TextShadow;
     bt->BackRef = BackRef;
     memAssignRef(bt, &bt->Parent, t);
     lstAppendItem(&t->BoxedThemes, bt);
@@ -2284,10 +2286,12 @@ real* laThemeColor(laBoxedTheme* bt, int which){
         case LA_UI_EDITING:
         case LA_BT_ACTIVE: return bt->Active;
         case LA_BT_BORDER: return bt->Border;
-        case LA_BT_TEXT:   return bt->Text; break;
-        case LA_BT_TEXT_ACTIVE: return bt->TextActive; break;
-        case LA_BT_DISABLED: return bt->Inactive; break;
-        case LA_BT_DISABLED|LA_BT_TEXT: return bt->TextInactive; break;
+        case LA_BT_TEXT|LA_BT_NO_DECAL: return bt->TextInvert;
+        case LA_BT_TEXT:   return bt->Text;
+        case LA_BT_TEXT|LA_UI_EDITING:
+        case LA_BT_TEXT_ACTIVE: return bt->TextActive;
+        case LA_BT_DISABLED: return bt->Inactive;
+        case LA_BT_DISABLED|LA_BT_TEXT: return bt->TextInactive;
     }
     return bt->Normal;
 }
@@ -2304,20 +2308,24 @@ real* laAccentColor(int which){
         case LA_BT_SEDGE: return MAIN.CurrentTheme->SEdgeColor;
         case LA_BT_SFACE: return MAIN.CurrentTheme->SFaceColor;
         case LA_BT_SHADOW: return MAIN.CurrentTheme->ShadowColor;
+        case LA_BT_SHADOW|LA_BT_TEXT: return MAIN.CurrentTheme->TextShadowColor;
     }
     return MAIN.CurrentTheme->SelectionColor;
 }
 void la_RefreshBoxedThemeColor(laBoxedTheme* bt){
     real hcy[3]; if(!bt->Parent){ return; }
-    tnsRGB2HCY(bt->Parent->Color,hcy);
+    laTheme* th = bt->Parent; real* color = bt->ColorSelection==2?th->ColorC:(bt->ColorSelection==1?th->ColorB:th->Color);
+    tnsRGB2HCY(color,hcy);
     hcy[2]=bt->NormalY; tnsHCY2RGB(hcy, bt->Normal); bt->Normal[3]=bt->Alpha;
     hcy[2]=bt->ActiveY; tnsHCY2RGB(hcy, bt->Active); bt->Active[3]=bt->Alpha;
     hcy[2]=bt->BorderY; tnsHCY2RGB(hcy, bt->Border); bt->Border[3]=1;
     hcy[2]=bt->TextY;   tnsHCY2RGB(hcy, bt->Text); bt->Text[3]=1;
     hcy[2]=bt->TextActiveY; tnsHCY2RGB(hcy, bt->TextActive); bt->TextActive[3]=1;
+    if(bt->NoDecalInvert){ hcy[2]=1.0f-bt->TextY; tnsHCY2RGB(hcy, bt->TextInvert); bt->TextInvert[3]=1.0f; }
+    else{ tnsVectorSet4v(bt->TextInvert,bt->Text); }
 }
 void la_RefreshThemeColorSelf(laTheme* th){
-    if(!th) return;
+    if((!th) || (!th->BoxedThemes.pFirst)) return;
     tnsVectorCopy3d(th->AccentColor, th->CursorColor);   th->CursorColor[3]=th->CursorAlpha;
     tnsVectorCopy3d(th->AccentColor, th->SelectionColor);th->SelectionColor[3]=th->SelectionAlpha; th->WarningColor[3]=th->SelectionAlpha;
     real hcy[3], usehcy[3];
@@ -2327,12 +2335,13 @@ void la_RefreshThemeColorSelf(laTheme* th){
     tnsVectorCopy3d(th->AccentColor, th->SVertexColor); th->SVertexColor[3]=th->SelectedVertexTransparency;
     tnsVectorCopy3d(th->AccentColor, th->SEdgeColor); th->SEdgeColor[3]=th->SelectedEdgeTransparency;
     tnsVectorCopy3d(th->AccentColor, th->SFaceColor); th->SFaceColor[3]=th->SelectedFaceTransparency;
-    tnsVectorCopy3d(th->Color, th->ShadowColor); th->ShadowColor[3]=th->CursorAlpha;
+    //tnsVectorCopy3d(th->Color, th->ShadowColor); th->ShadowColor[3]=th->CursorAlpha;
+    tnsVectorSet4(th->ShadowColor,0,0,0,th->ShadowAlpha);
+    tnsVectorSet4(th->TextShadowColor,0,0,0,th->TextShadowAlpha);
 }
 void la_RefreshThemeColor(laTheme* th){
     if(!th) return;
     real hcy[3], usehcy[3], normalhcy[3];
-    tnsRGB2HCY(th->Color,hcy);
     la_RefreshThemeColorSelf(th);
     for(laBoxedTheme* bt = th->BoxedThemes.pFirst;bt;bt=bt->Item.pNext){
         la_RefreshBoxedThemeColor(bt);
@@ -2631,10 +2640,12 @@ void la_SetPanelMatrixLRTB(int PW, int PH, int LPadding, int RPadding, int TPadd
     tnsOrtho(XOffset, XOffset + PW - LPadding - RPadding, YOffset + PH - BPadding, YOffset + TPadding, -100, 100);
 }
 void la_PanelBackgroundInit(laPanel *p, laBoxedTheme *bt){
-    glClearColor(LA_COLOR4(laThemeColor(bt,LA_BT_NORMAL)));
+    real* color=laThemeColor(bt,LA_BT_NORMAL);
+    glClearColor(LA_COLOR3(color), p->Block?1.0f:color[3]);
     tnsClearAll();
+    if(bt->BoxStyle==-1){ tnsUseNoTexture(); tnsColor4dv(laAccentColor(LA_BT_SHADOW)); la_DrawInnerShadow(0,p->W,0,p->H); }
 }
-void la_PanelDrawDescendBorder(laPanel* Panel, laBoxedTheme* bt, int Width, real Alpha);
+void la_PanelDrawDescendBorder(laPanel* Panel, laBoxedTheme* bt);
 void la_PanelDrawToWindow(laPanel *p, laWindow *w){
     real Color[] = {1, 1, 1, 1};
     real L, W, U, H;
@@ -2653,7 +2664,7 @@ void la_PanelDrawToWindow(laPanel *p, laWindow *w){
     if (p->Mode && (!p->AnimationMode || (p->AnimationMode && p->AnimationRatio > 0.99) || p->AnimationMode==LA_PANEL_ANIMATION_FLASH)){
         tnsUseNoTexture();
         if (!p->IsMenuPanel){
-            la_PanelDrawDescendBorder(p, (*p->BT), MAIN.SolidShadowLength, MAIN.FloatingAlpha);
+            la_PanelDrawDescendBorder(p, (*p->BT));
         }
         tnsFlush();
     }
@@ -2796,16 +2807,16 @@ void la_PanelRefreshDetachedProp(laPanel *panel){
     }
 }
 
-void la_PanelDrawDescendBorder(laPanel *Panel, laBoxedTheme *bt, int Width, real Alpha){
+void la_PanelDrawDescendBorder(laPanel *Panel, laBoxedTheme *bt){
     real* color=laThemeColor(bt,LA_BT_BORDER);
-    tnsColor4d(0,0,0,Alpha);
-    tnsVertex2d(Panel->X + Width, Panel->Y + Panel->H);
-    tnsVertex2d(Panel->X + Width, Panel->Y + Panel->H + Width);
-    tnsVertex2d(Panel->X + Panel->W, Panel->Y + Panel->H);
-    tnsVertex2d(Panel->X + Panel->W + Width, Panel->Y + Panel->H + Width);
-    tnsVertex2d(Panel->X + Panel->W, Panel->Y + Width);
-    tnsVertex2d(Panel->X + Panel->W + Width, Panel->Y + Width);
-    tnsPackAs(GL_TRIANGLE_STRIP);
+    real* shadow=laAccentColor(LA_BT_SHADOW);
+    int sw=LA_SHADOW_W;
+    tnsColor4d(LA_COLOR3(shadow),shadow[3]);
+    la_DrawOuterShadowLength(Panel->X,Panel->X+Panel->W,Panel->Y,Panel->Y+Panel->H,sw*2);
+    tnsColor4d(LA_COLOR3(shadow),shadow[3]*0.5);
+    la_DrawOuterShadowLength(Panel->X+sw*2,Panel->X+Panel->W+sw*2,Panel->Y+sw*2,Panel->Y+Panel->H+sw*2,sw*2);
+    tnsColor4d(LA_COLOR3(shadow),shadow[3]*0.25);
+    la_DrawOuterShadowLength(Panel->X+sw*4,Panel->X+Panel->W+sw*4,Panel->Y+sw*4,Panel->Y+Panel->H+sw*4,sw*2);
 
     tnsColor4dv(laThemeColor(bt,LA_BT_BORDER));
     tnsVertex2d(Panel->X-1, Panel->Y-1);
@@ -3036,7 +3047,6 @@ void la_BlockDefDrawSelf(laBlock *b, int CH){
         b->X + b->W - LA_SEAM_W, CH - (b->Y + b->H - LA_SEAM_W),
         b->X + b->W, CH - b->Y,
         b->X + b->W - LA_SEAM_W, CH - b->Y};
-    real tv[8];
     real ratio = 1.0001f;
     int tw = 0;
     int L = LA_RH+LA_SEAM_W;
@@ -3056,47 +3066,36 @@ void la_BlockDefDrawSelf(laBlock *b, int CH){
     }
     if (tw > b->W - LA_SEAM_W*2 - LA_RH) ratio = (real)(b->W - LA_SEAM_W*2 - LA_RH) / (real)tw;
 
+
+    real* cactive=laThemeColor(bt,LA_BT_ACTIVE);
+    real* cborder=laThemeColor(bt,LA_BT_BORDER);
+
     tnsUseNoTexture();
-    tnsColor4dv(laThemeColor(bt,LA_BT_ACTIVE));
+    tnsColor4d(LA_COLOR3(cactive),1);
     tnsVertexArray2d(v, 8);
     tnsPackAs(GL_TRIANGLE_STRIP);
 
     int TitleGap=b->Folded?0:LA_RH;
 
-    tnsMakeQuad2d(tv, b->X, (CH - b->Y),
-                    b->X + b->W, (CH - b->Y),
-                    b->X + b->W, (CH - b->Y - TitleGap),
-                    b->X, (CH - b->Y - TitleGap));
-    tnsColor4dv(laThemeColor(bt,LA_BT_ACTIVE));
-    tnsVertexArray2d(tv, 4);
-    tnsPackAs(GL_TRIANGLE_FAN);
-
-    tnsMakeQuad2d(tv,b->X + LA_SEAM_W, (CH - b->Y - TitleGap),
-                    b->X + b->W - LA_SEAM_W, (CH - b->Y - TitleGap),
-                    b->X + b->W - LA_SEAM_W, (CH - b->Y - TitleGap - LA_SEAM_W),
-                    b->X + LA_SEAM_W, (CH - b->Y - TitleGap- LA_SEAM_W));
-    tnsColor4dv(laThemeColor(bt,LA_BT_BORDER));
-    tnsVertexArray2d(tv, 4);
-    tnsPackAs(GL_TRIANGLE_FAN);
+    tnsColor4d(LA_COLOR3(cactive),1);
+    la_DrawBox(b->X, b->X+b->W, CH-b->Y, CH-b->Y-TitleGap);
+    
+    tnsColor4d(LA_COLOR3(cborder),1);
+    la_DrawBox(b->X+LA_SEAM_W, b->X+b->W-LA_SEAM_W, CH-b->Y-TitleGap, CH-b->Y-TitleGap-LA_SEAM_W);
 
     if(b->Folded){ return;  }
 
     int LT=0,RT=0;
     for (p = b->Panels.pFirst; p; p = p->Item.pNext){
         RT = LT + p->TitleWidth + LA_SEAM_W*2;
-        tnsMakeQuad2d(tv,b->X + L+LT * ratio, (CH - b->Y),
-                         b->X + L+RT * ratio, (CH - b->Y),
-                         b->X + L+RT * ratio, (CH - b->Y - LA_RH),
-                         b->X + L+LT * ratio, (CH - b->Y - LA_RH));
 
         if (p == b->CurrentPanel){
             tnsUseNoTexture();
-            tnsColor4dv(laThemeColor(bt,LA_BT_BORDER));
-            tnsVertexArray2d(tv, 4);
-            tnsPackAs(GL_TRIANGLE_FAN);
-            tnsDrawStringAuto(transLate(p->Title->Ptr), laThemeColor(bt,LA_BT_TEXT_ACTIVE), b->X + L +LT* ratio + LA_SEAM_W, b->X + L +RT* ratio, CH - b->Y, LA_TEXT_REVERT_Y);
+            tnsColor4d(LA_COLOR3(cborder),1);
+            la_DrawBox(b->X+L+LT*ratio, b->X+L+RT*ratio, CH-b->Y, CH-b->Y-LA_RH);
+            tnsDrawStringAuto(transLate(p->Title->Ptr), laThemeColor(bt,LA_BT_TEXT_ACTIVE), b->X+L+LT*ratio+LA_SEAM_W, b->X+L+RT*ratio, CH-b->Y, LA_TEXT_REVERT_Y);
         }else{
-            tnsDrawStringAuto(transLate(p->Title->Ptr), laThemeColor(bt,LA_BT_TEXT), b->X + L +LT* ratio + LA_SEAM_W, b->X + L +RT* ratio, CH - b->Y, LA_TEXT_REVERT_Y);
+            tnsDrawStringAuto(transLate(p->Title->Ptr), laThemeColor(bt,LA_BT_TEXT), b->X+L+LT*ratio+LA_SEAM_W, b->X+L+RT*ratio, CH-b->Y, LA_TEXT_REVERT_Y);
         }
 
         LT =RT;
@@ -3970,9 +3969,10 @@ int laEnclosePanelContent(laPanel *p, laUiList *uil){
     int CW = MAIN.CurrentWindow->CW;
     if(p->SL && p->SR){return 0;}
     la_SetPropMathcerContext(p);
+    int em=bt->BoxStyle==-1?LA_M:0;
 
-    la_UpdateUiListRecursive(&p->TitleBar, LA_M, LA_M, p->TW - LA_M*2, p->TH, 0, p);
-    la_UpdateUiListRecursive(uil, LA_M+p->TitleBar.B, 0, 1000, 0, 0, p);
+    la_UpdateUiListRecursive(&p->TitleBar, LA_M+em, LA_M+em, p->TW - LA_M*2, p->TH, 0, p);
+    la_UpdateUiListRecursive(uil, LA_M+p->TitleBar.B, em, 1000, 0, 0, p);
     MinWt = la_TestUiListMinumWidth(&p->TitleBar);
     MinW = la_TestUiListMinumWidth(uil);
     if (MinW<MinWt){MinW=MinWt;}
@@ -3983,8 +3983,8 @@ int laEnclosePanelContent(laPanel *p, laUiList *uil){
     la_PanelValidateWidth(p,uil);
     laEnsurePanelInBound(p,uil);
     if(p->TW>CW){ p->TW=CW; }
-    la_UpdateUiListRecursive(&p->TitleBar, LA_M, LA_M, p->TW - LA_M*2, p->TH, 0, p);
-    la_UpdateUiListRecursive(uil, LA_M+p->TitleBar.B, LA_M, p->TW - LA_M - ScrollerW, 0, 0, p);
+    la_UpdateUiListRecursive(&p->TitleBar, LA_M+em, LA_M+em, p->TW-LA_M*2, p->TH, 0, p);
+    la_UpdateUiListRecursive(uil, LA_M+p->TitleBar.B, LA_M+em, p->TW-LA_M-ScrollerW, 0, 0, p);
     laRedrawPanel(p);
     return 1;
 }
@@ -4270,6 +4270,7 @@ void laRecalcCurrentPanel(){
 void laRecalcPanelImmediate(laPanel* p){
     p->FrameDistinguish++;
     laBoxedTheme* bt = (*p->BT);
+    int em=bt->BoxStyle==-1?LA_M:0;
     int scrollw=p->UI.ScrollerShownV?LA_M*2+LA_SCROLL_W:0;
     la_PanelRefreshDetachedProp(p);
     int enclosed=0;
@@ -4280,9 +4281,9 @@ void laRecalcPanelImmediate(laPanel* p){
     if(!enclosed){
         la_PanelValidateWidth(p,&p->UI);
         laEnsurePanelInBound(p,p->MenuRefer?p->MenuRefer:&p->UI);
-        la_UpdateUiListRecursive(&p->TitleBar, LA_M, LA_M, p->TW-LA_M, p->TH-LA_M, 0, p);
-        int UseB=p->TitleBar.TB; if((!p->Mode)||(p->Mode==LA_PANEL_FLOATING_PASSIVE)){ UseB=0; }
-        la_UpdateUiListRecursive(&p->UI, UseB+LA_M, LA_M, p->TW-LA_M-scrollw, p->TH-LA_M, 0, p);
+        la_UpdateUiListRecursive(&p->TitleBar, LA_M+em, LA_M+em, p->TW-LA_M, p->TH-LA_M, 0, p);
+        int UseB=p->TitleBar.TB; if((!p->Mode)||(p->Mode==LA_PANEL_FLOATING_PASSIVE)){ UseB=em; }
+        la_UpdateUiListRecursive(&p->UI, UseB+LA_M, LA_M+em, p->TW-LA_M-scrollw, p->TH-LA_M, 0, p);
     }
     laWindow* w=MAIN.CurrentWindow;
     if(w->MaximizedUiPanel==p&&w->MaximizedUi){ int CW = w->CW; int CH = w->CH;
@@ -6460,25 +6461,11 @@ void la_DrawUiListScrollerV(laUiList *uil, int DisplayOffset, int TotalH, int Di
     laBoxedTheme* bt=_LA_THEME_PANEL;
     real* color=laThemeColor(bt, LA_BT_TEXT);
 
-    tnsColor4d(LA_COLOR3(color), 0.2);
-    tnsVertex2d(R-RM, BarTop);
-    tnsVertex2d(L+RM, BarTop);
-    tnsVertex2d(L+RM, BarBottom);
-    tnsVertex2d(R-RM, BarBottom);
-    tnsPackAs(GL_TRIANGLE_FAN);
-    tnsColor4d(LA_COLOR3(color), 0.5);
-    tnsVertex2d(R-RM, BarTop);
-    tnsVertex2d(L+RM, BarTop);
-    tnsVertex2d(L+RM, BarBottom);
-    tnsVertex2d(R-RM, BarBottom);
-    tnsPackAs(GL_LINE_LOOP);
+    real colorb[4]; tnsVectorSet3v(colorb,color); colorb[3]=0.3;
+    la_DrawBoxAutoArrayStyle(L+RM,R-RM,BarTop,BarBottom,bt,LA_BT_NORMAL,colorb,0,1,-1);
 
-    tnsColor4d(LA_COLOR3(color), 1);
-    tnsVertex2d(R, U);
-    tnsVertex2d(L, U);
-    tnsVertex2d(L, B);
-    tnsVertex2d(R, B);
-    tnsPackAs(GL_TRIANGLE_FAN);
+    colorb[3]=1;
+    la_DrawBoxAutoArrayStyle(L,R,U,B,bt,LA_BT_NORMAL,colorb,0,0,0);
 
     int HU=(U+B)/2+LA_RH2;
     tnsDrawStringAuto("⋮",laThemeColor(bt, LA_BT_BORDER),L-100,R+100,HU,LA_TEXT_REVERT_Y|LA_TEXT_ALIGN_CENTER);
@@ -6510,36 +6497,21 @@ void la_DrawUiListScrollerH(laUiList *uil, int DisplayOffset, int TotalW, int Di
 
     laBoxedTheme* bt=_LA_THEME_PANEL;
     real* color=laThemeColor(bt, LA_BT_TEXT);
-    tnsColor4d(LA_COLOR3(color), 0.2);
-    tnsVertex2d(BarLeft,U+RM);
-    tnsVertex2d(BarLeft,B-RM);
-    tnsVertex2d(BarRight,B-RM);
-    tnsVertex2d(BarRight,U+RM);
-    tnsPackAs(GL_TRIANGLE_FAN);
-    tnsColor4d(LA_COLOR3(color), 0.5);
-    tnsVertex2d(BarLeft,U+RM);
-    tnsVertex2d(BarLeft,B-RM);
-    tnsVertex2d(BarRight,B-RM);
-    tnsVertex2d(BarRight,U+RM);
+    
+    real colorb[4]; tnsVectorSet3v(colorb,color); colorb[3]=0.3;
+    la_DrawBoxAutoArrayStyle(BarLeft,BarRight,U+RM,B-RM,bt,LA_BT_NORMAL,colorb,0,1,-1);
     tnsPackAs(GL_LINE_LOOP);
 
-    tnsColor4d(LA_COLOR3(color), 1);
-    tnsVertex2d(R, U);
-    tnsVertex2d(L, U);
-    tnsVertex2d(L, B);
-    tnsVertex2d(R, B);
-    tnsPackAs(GL_TRIANGLE_FAN);
+    colorb[3]=1;
+    la_DrawBoxAutoArrayStyle(L,R,U,B,bt,LA_BT_NORMAL,colorb,0,0,0);
 
     int HU=(U+B)/2+LA_RH2;
     tnsDrawStringAuto("⋯",laThemeColor(bt, LA_BT_BORDER),L-100,R+100,HU,LA_TEXT_REVERT_Y|LA_TEXT_ALIGN_CENTER);
     tnsFlush();
 }
 void la_DrawInstanceBkg(laUiList *uil, real* color, int LP, int RP){
-    tnsUseNoTexture();
-    tnsColor4dv(color);
-    tnsVertex2d(uil->L-LP+0.5, uil->U+0.5); tnsVertex2d(uil->R+RP-0.5, uil->U+0.5);
-    tnsVertex2d(uil->R+RP-0.5, uil->B-0.5); tnsVertex2d(uil->L-LP+0.5, uil->B-0.5);
-    tnsPackAs(GL_TRIANGLE_FAN);
+    tnsUseNoTexture(); tnsColor4dv(color);
+    la_DrawBox(uil->L-LP+1,uil->R+RP-1,uil->U+1,uil->B-1);
 }
 void la_InitSocketRecord(laUiListDraw* uild, laUiList* container){
     laSocketRecord* sr;

+ 64 - 58
la_resource.c

@@ -118,43 +118,46 @@ void la_RegisterWindowKeys(){
 
 laTheme* la_CreateClassicLightTheme(){
     laTheme *t; laBoxedTheme *bt;
-    t = laDesignTheme("Classic Light", "YimingWu");{
+    t = laDesignTheme("Classic Light");{
         LA_SET3(t->Color, 0.58,0.58,0.55);
+        LA_SET3(t->ColorB, 0.58,0.58,0.55);
+        LA_SET3(t->ColorC, 0.58,0.58,0.55);
         LA_SET3(t->AccentColor, 0.27,0.47,0.79);
         LA_SET3(t->WarningColor, 0.9,0.45,0.2);
         t->InactiveMix=0.7; t->InactiveSaturation=0.2;
         t->CursorAlpha=0.9; t->SelectionAlpha=0.5;
+        t->ShadowAlpha=0.3; t->TextShadowAlpha=0.3;
         t->WireBrightness=0.5; t->WireSaturation=0.6; t->WireTransparency=0.65;
         t->EdgeBrightness=0.65; t->EdgeTransparency=0.8; t->VertexBrightness=0.65, t->VertexTransparency=0.9;
         t->SelectedFaceTransparency=0.6,t->SelectedEdgeTransparency=0.9, t->SelectedVertexTransparency=1.0;
-        laDesignBoxedTheme(t, "Panel",&_LA_THEME_PANEL,
-            0.85, 0.5, 0.9, 0.2, 0.1, 0.9);
-        laDesignBoxedTheme(t, "Floating Panel",&_LA_THEME_FLOATING_PANEL,
-            0.95, 0.8, 0.15, 0.15, 0.1, 0.9);
-        laDesignBoxedTheme(t, "Valuator",&_LA_THEME_VALUATOR,
-            0.8, 0.5, 0.3, 0.2, 0.1, 0.9);
-        laDesignBoxedTheme(t, "Button",&_LA_THEME_BUTTON,
-            0.97, 0.2, 0.3, 0.2, 0.9, 0.95);
-        laDesignBoxedTheme(t, "String",&_LA_THEME_STRING,
-            0.9, 0.95, 0.3, 0.2, 0.1, 0.95);
-        laDesignBoxedTheme(t, "Selector",&_LA_THEME_SELECTOR,
-            0.97, 0.25, 0.3, 0.2, 0.9, 0.95);
-        laDesignBoxedTheme(t, "Collection Selector",&_LA_THEME_COLLECTION_SELECTOR,
-            0.85, 0.7, 0.3, 0.2, 0.1, 0.95);
-        laDesignBoxedTheme(t, "Label",&_LA_THEME_LABEL,
-            0.7, 0.8, 0.3, 0.1, 0.05, 0.95);
-        laDesignBoxedTheme(t, "Tab",&_LA_THEME_TAB,
-            0.9, 0.8, 0.2, 0.1, 0.7, 0.9);
-        laDesignBoxedTheme(t, "Socket",&_LA_THEME_SOCKET,
-            0.97, 0.2, 0.3, 0.2, 0.9, 0.95);
-        laDesignBoxedTheme(t, "Collection Group",&_LA_THEME_COLLECTION_GROUP,
-            0.75, 0.65, 0.2, 0.1, 0.7, 0.3);
-        laDesignBoxedTheme(t, "Collection Item",&_LA_THEME_COLLECTION_ITEM,
-            0.75, 0.65, 0.2, 0.1, 0.7, 0.3);
-        laDesignBoxedTheme(t, "3D Viewer",&_LA_THEME_3D_VIEW,
-            0.75, 0.6, 0.50, 0.1, 0.92, 0.6);
-        laDesignBoxedTheme(t, "2D Viewer",&_LA_THEME_2D_VIEW,
-            0.75, 0.6, 0.50, 0.1, 0.92, 0.6);
+        laDesignBoxedTheme(t, "Panel",&_LA_THEME_PANEL, 0,
+            0.85, 0.5, 0.9, 0.2, 0.1, 0.9, 0, 0);
+        laDesignBoxedTheme(t, "Floating Panel",&_LA_THEME_FLOATING_PANEL, 0,
+            0.95, 0.8, 0.15, 0.15, 0.1, 0.9, 0, 0);
+        laDesignBoxedTheme(t, "Valuator",&_LA_THEME_VALUATOR, 0,
+            0.8, 0.5, 0.3, 0.2, 0.1, 0.9, 0, 0);
+        laDesignBoxedTheme(t, "Button",&_LA_THEME_BUTTON, 0,
+            0.97, 0.2, 0.3, 0.2, 0.9, 0.95, 0, 0);
+        laDesignBoxedTheme(t, "String",&_LA_THEME_STRING, 0,
+            0.9, 0.95, 0.3, 0.2, 0.1, 0.95, 0, 0);
+        laDesignBoxedTheme(t, "Selector",&_LA_THEME_SELECTOR, 0,
+            0.97, 0.25, 0.3, 0.2, 0.9, 0.95, 0, 0);
+        laDesignBoxedTheme(t, "Collection Selector",&_LA_THEME_COLLECTION_SELECTOR, 0,
+            0.85, 0.7, 0.3, 0.2, 0.1, 0.95, 0, 0);
+        laDesignBoxedTheme(t, "Label",&_LA_THEME_LABEL, 0,
+            0.7, 0.8, 0.3, 0.1, 0.05, 0.95, 0, 0);
+        laDesignBoxedTheme(t, "Tab",&_LA_THEME_TAB, 0,
+            0.9, 0.8, 0.2, 0.1, 0.7, 0.9, 0, 0);
+        laDesignBoxedTheme(t, "Socket",&_LA_THEME_SOCKET, 0,
+            0.97, 0.2, 0.3, 0.2, 0.9, 0.95, 0, 0);
+        laDesignBoxedTheme(t, "Collection Group",&_LA_THEME_COLLECTION_GROUP, 0,
+            0.75, 0.65, 0.2, 0.1, 0.7, 0.3, 0, 0);
+        laDesignBoxedTheme(t, "Collection Item",&_LA_THEME_COLLECTION_ITEM, 0,
+            0.75, 0.65, 0.2, 0.1, 0.7, 0.3, 0, 0);
+        laDesignBoxedTheme(t, "3D Viewer",&_LA_THEME_3D_VIEW, 0,
+            0.75, 0.6, 0.50, 0.1, 0.92, 0.6, 0, 0);
+        laDesignBoxedTheme(t, "2D Viewer",&_LA_THEME_2D_VIEW, 0,
+            0.75, 0.6, 0.50, 0.1, 0.92, 0.6, 0, 0);
 
         la_RefreshThemeColor(t);
     }
@@ -163,43 +166,46 @@ laTheme* la_CreateClassicLightTheme(){
 
 laTheme* la_CreateClassicDarkTheme(){
     laTheme *t; laBoxedTheme *bt;
-    t = laDesignTheme("Classic Dark", "YimingWu");{
+    t = laDesignTheme("Classic Dark");{
         LA_SET3(t->Color, 0.5,0.4,0.3);
+        LA_SET3(t->ColorB, 0.5,0.4,0.3);
+        LA_SET3(t->ColorC, 0.5,0.4,0.3);
         LA_SET3(t->AccentColor, 0.17,0.74,0.49);
         LA_SET3(t->WarningColor, 0.9,0.45,0.2);
         t->InactiveMix=0.7; t->InactiveSaturation=0.2;
         t->CursorAlpha=0.9; t->SelectionAlpha=0.4;
+        t->ShadowAlpha=0.3; t->TextShadowAlpha=0.3;
         t->WireBrightness=0.6; t->WireSaturation=0.7; t->WireTransparency=0.65;
         t->EdgeBrightness=0.05; t->EdgeTransparency=0.8; t->VertexBrightness=0.05, t->VertexTransparency=0.9;
         t->SelectedFaceTransparency=0.6,t->SelectedEdgeTransparency=0.9, t->SelectedVertexTransparency=1.0;
-        bt = laDesignBoxedTheme(t, "Panel",&_LA_THEME_PANEL,
-            0.2, 0.2, 0.1, 0.7, 0.9, 0.8);
-        bt = laDesignBoxedTheme(t, "Floating Panel",&_LA_THEME_FLOATING_PANEL,
-            0.05, 0.05, 0.4, 0.8, 0.9, 0.8);
-        bt = laDesignBoxedTheme(t, "Valuator",&_LA_THEME_VALUATOR,
-            0.3, 0.1, 0.4, 0.8, 0.9, 0.9);
-        bt = laDesignBoxedTheme(t, "Button",&_LA_THEME_BUTTON,
-            0.1, 0.9, 0.3, 0.8, 0.1, 0.95);
-        bt = laDesignBoxedTheme(t, "String",&_LA_THEME_STRING,
-            0.1, 0.03, 0.3, 0.8, 0.9, 0.95);
-        bt = laDesignBoxedTheme(t, "Selector",&_LA_THEME_SELECTOR,
-            0.15, 0.7, 0.3, 0.8, 0.2, 0.95);
-        bt = laDesignBoxedTheme(t, "Collection Selector",&_LA_THEME_COLLECTION_SELECTOR,
-            0.15, 0.1, 0.3, 0.8, 0.9, 0.95);
-        bt = laDesignBoxedTheme(t, "Label",&_LA_THEME_LABEL,
-            0.15, 0.1, 0.3, 0.8, 0.9, 0.95);
-        bt = laDesignBoxedTheme(t, "Tab",&_LA_THEME_TAB,
-            0.2, 0.3, 0.8, 0.7, 0.1, 0.9);
-        bt = laDesignBoxedTheme(t, "Socket",&_LA_THEME_SOCKET,
-            0.1, 0.65, 0.7, 0.8, 0.1, 0.95);
-        bt = laDesignBoxedTheme(t, "Collection Group",&_LA_THEME_COLLECTION_GROUP,
-            0.25, 0.35, 0.4, 0.7, 0.1, 0.45);
-        bt = laDesignBoxedTheme(t, "Collection Item",&_LA_THEME_COLLECTION_ITEM,
-            0.25, 0.35, 0.8, 0.7, 0.1, 0.3);
-        bt = laDesignBoxedTheme(t, "3D Viewer",&_LA_THEME_3D_VIEW,
-            0.25, 0.5, 0.5, 0.7, 0.1, 0.6);
-        bt = laDesignBoxedTheme(t, "2D Viewer",&_LA_THEME_2D_VIEW,
-            0.25, 0.5, 0.55, 0.7, 0.1, 0.6);
+        bt = laDesignBoxedTheme(t, "Panel",&_LA_THEME_PANEL, 0,
+            0.2, 0.2, 0.1, 0.7, 0.9, 0.8, 0, 0);
+        bt = laDesignBoxedTheme(t, "Floating Panel",&_LA_THEME_FLOATING_PANEL, 0,
+            0.05, 0.05, 0.4, 0.8, 0.9, 0.8, 0, 0);
+        bt = laDesignBoxedTheme(t, "Valuator",&_LA_THEME_VALUATOR, 0,
+            0.3, 0.1, 0.4, 0.8, 0.9, 0.9, 0, 0);
+        bt = laDesignBoxedTheme(t, "Button",&_LA_THEME_BUTTON, 0,
+            0.1, 0.9, 0.3, 0.8, 0.1, 0.95, 0, 0);
+        bt = laDesignBoxedTheme(t, "String",&_LA_THEME_STRING, 0,
+            0.1, 0.03, 0.3, 0.8, 0.9, 0.95, 0, 0);
+        bt = laDesignBoxedTheme(t, "Selector",&_LA_THEME_SELECTOR, 0,
+            0.15, 0.7, 0.3, 0.8, 0.2, 0.95, 0, 0);
+        bt = laDesignBoxedTheme(t, "Collection Selector",&_LA_THEME_COLLECTION_SELECTOR, 0,
+            0.15, 0.1, 0.3, 0.8, 0.9, 0.95, 0, 0);
+        bt = laDesignBoxedTheme(t, "Label",&_LA_THEME_LABEL, 0,
+            0.15, 0.1, 0.3, 0.8, 0.9, 0.95, 0, 0);
+        bt = laDesignBoxedTheme(t, "Tab",&_LA_THEME_TAB, 0,
+            0.2, 0.3, 0.8, 0.7, 0.1, 0.9, 0, 0);
+        bt = laDesignBoxedTheme(t, "Socket",&_LA_THEME_SOCKET, 0,
+            0.1, 0.65, 0.7, 0.8, 0.1, 0.95, 0, 0);
+        bt = laDesignBoxedTheme(t, "Collection Group",&_LA_THEME_COLLECTION_GROUP, 0,
+            0.25, 0.35, 0.4, 0.7, 0.1, 0.45, 0, 0);
+        bt = laDesignBoxedTheme(t, "Collection Item",&_LA_THEME_COLLECTION_ITEM, 0,
+            0.25, 0.35, 0.8, 0.7, 0.1, 0.3, 0, 0);
+        bt = laDesignBoxedTheme(t, "3D Viewer",&_LA_THEME_3D_VIEW, 0,
+            0.25, 0.5, 0.5, 0.7, 0.1, 0.6, 0, 0);
+        bt = laDesignBoxedTheme(t, "2D Viewer",&_LA_THEME_2D_VIEW, 0,
+            0.25, 0.5, 0.55, 0.7, 0.1, 0.6, 0, 0);
 
         la_RefreshThemeColor(t);
     }

+ 2 - 2
la_tns_kernel.c

@@ -3212,8 +3212,8 @@ int tns_ClipCharacterT2D(real* v, real* t){
 }
 void tnsDrawStringM(char *content, uint32_t* contentU, real Color[4], int L, int R, int T, int Flags){
     if(Flags&LA_TEXT_SHADOW){
-        int offset = LA_RH/16;
-        tnsDrawStringM(content, contentU, laAccentColor(LA_BT_SHADOW), L+offset, R+offset, T+offset, Flags&(~LA_TEXT_SHADOW));
+        int offset = FM->UsingFont->height*MAIN.UiScale/16.0f;
+        tnsDrawStringM(content, contentU, laAccentColor(LA_BT_SHADOW|LA_BT_TEXT), L+offset, R+offset, T+offset, Flags&(~LA_TEXT_SHADOW));
     }
     if(!FM->UsingFont){return;} if(Flags&(LA_TEXT_LCD_16|LA_TEXT_LCD_7)){
         tnsDrawStringLCD(content,contentU,Color,L,R,T,Flags,1.0); return;

+ 70 - 51
resources/la_properties.c

@@ -33,11 +33,17 @@ void laset_TerminalInput(void* unused, char* content){
     strcpy(MAIN.TerminalInput,content);
 }
 
+void lareset_Theme(laTheme *th){
+    laBoxedTheme*bt; while(bt=lstPopItem(&th->BoxedThemes)){ strSafeDestroy(&bt->Name); *bt->BackRef=0; memFree(bt); }
+    strSafeDestroy(&th->Name);
+}
 void lapostim_Theme(laTheme *th){
     for(laBoxedTheme* bt=th->BoxedThemes.pFirst;bt;bt=bt->Item.pNext){
         memAssignRef(bt, &bt->Parent,th);
     }
+    MAIN.CurrentTheme = th;
     la_RefreshThemeColor(th);
+    laRedrawAllWindows();
 }
 laTheme* laget_ThemePreviewTheme(void* unused, laTheme* theme){
     return theme;
@@ -55,71 +61,68 @@ void laset_ThemeName(laTheme *t, char *content){
     char buf[32]; sprintf(buf,"LATHEME_%.22s",content);
     laset_InstanceUID(t, buf);
 }
-void laset_ThemeAuthor(laTheme *t, char *content){ strSafeSet(&t->Author, content); }
 void laset_ThemeColor(laTheme* t, real* array){
-    tnsVectorCopy4d(array,t->Color);
-    la_RefreshThemeColor(t);
-    laRedrawAllWindows();
+    tnsVectorCopy4d(array,t->Color); la_RefreshThemeColor(t); laRedrawAllWindows();
+}
+void laset_ThemeColorB(laTheme* t, real* array){
+    tnsVectorCopy4d(array,t->ColorB); la_RefreshThemeColor(t); laRedrawAllWindows();
+}
+void laset_ThemeColorC(laTheme* t, real* array){
+    tnsVectorCopy4d(array,t->ColorC); la_RefreshThemeColor(t); laRedrawAllWindows();
 }
 void laset_ThemeAccentColor(laTheme* t, real* array){
-    tnsVectorCopy4d(array,t->AccentColor);
-    la_RefreshThemeColor(t);
-    laRedrawAllWindows();
+    tnsVectorCopy4d(array,t->AccentColor); la_RefreshThemeColor(t); laRedrawAllWindows();
 }
 void laset_ThemeWarningColor(laTheme* t, real* array){
-    tnsVectorCopy4d(array,t->WarningColor);
-    la_RefreshThemeColor(t);
-    laRedrawAllWindows();
+    tnsVectorCopy4d(array,t->WarningColor); la_RefreshThemeColor(t); laRedrawAllWindows();
 }
 void laset_ThemeInactiveSaturation(laTheme* t, real a){
-    t->InactiveSaturation=a;
-    la_RefreshThemeColor(t);
-    laRedrawAllWindows();
+    t->InactiveSaturation=a; la_RefreshThemeColor(t); laRedrawAllWindows();
 }
 void laset_ThemeInactiveMix(laTheme* t, real a){
-    t->InactiveMix=a;
-    la_RefreshThemeColor(t);
-    laRedrawAllWindows();
+    t->InactiveMix=a; la_RefreshThemeColor(t); laRedrawAllWindows();
 }
 void laset_ThemeCursorAlpha(laTheme* t, real a){
-    t->CursorAlpha=a;
-    la_RefreshThemeColorSelf(t);
-    laRedrawAllWindows();
+    t->CursorAlpha=a; la_RefreshThemeColorSelf(t); laRedrawAllWindows();
 }
 void laset_ThemeSelectionAlpha(laTheme* t, real a){
-    t->SelectionAlpha=a;
-    la_RefreshThemeColorSelf(t);
-    laRedrawAllWindows();
+    t->SelectionAlpha=a; la_RefreshThemeColorSelf(t); laRedrawAllWindows();
+}
+void laset_ThemeShadowAlpha(laTheme* t, real a){
+    t->ShadowAlpha=a; la_RefreshThemeColorSelf(t); laRedrawAllWindows();
+}
+void laset_ThemeTextShadowAlpha(laTheme* t, real a){
+    t->TextShadowAlpha=a; la_RefreshThemeColorSelf(t); laRedrawAllWindows();
 }
 void laset_ThemeNormal(laBoxedTheme* bt, real val){
-    bt->NormalY=val;
-    la_RefreshBoxedThemeColor(bt);
-    laRedrawAllWindows();
+    bt->NormalY=val; la_RefreshBoxedThemeColor(bt); laRedrawAllWindows();
 }
 void laset_ThemeActive(laBoxedTheme* bt, real val){
-    bt->ActiveY=val;
-    la_RefreshBoxedThemeColor(bt);
-    laRedrawAllWindows();
+    bt->ActiveY=val; la_RefreshBoxedThemeColor(bt); laRedrawAllWindows();
 }
 void laset_ThemeBorder(laBoxedTheme* bt, real val){
-    bt->BorderY=val;
-    la_RefreshBoxedThemeColor(bt);
-    laRedrawAllWindows();
+    bt->BorderY=val; la_RefreshBoxedThemeColor(bt); laRedrawAllWindows();
 }
 void laset_ThemeText(laBoxedTheme* bt, real val){
-    bt->TextY=val;
-    la_RefreshBoxedThemeColor(bt);
-    laRedrawAllWindows();
+    bt->TextY=val; la_RefreshBoxedThemeColor(bt); laRedrawAllWindows();
 }
 void laset_ThemeTextActive(laBoxedTheme* bt, real val){
-    bt->TextActiveY=val;
-    la_RefreshBoxedThemeColor(bt);
-    laRedrawAllWindows();
+    bt->TextActiveY=val; la_RefreshBoxedThemeColor(bt); laRedrawAllWindows();
 }
 void laset_ThemeAlpha(laBoxedTheme* bt, real val){
-    bt->Alpha=val;
-    la_RefreshBoxedThemeColor(bt);
-    laRedrawAllWindows();
+    bt->Alpha=val; la_RefreshBoxedThemeColor(bt); laRedrawAllWindows();
+}
+void laset_ThemeBoxStyle(laBoxedTheme* bt, int val){
+    bt->BoxStyle=val; la_RefreshBoxedThemeColor(bt); laRedrawAllWindows();
+}
+void laset_ThemeTextShadow(laBoxedTheme* bt, int val){
+    bt->TextShadow=val; la_RefreshBoxedThemeColor(bt); laRedrawAllWindows();
+}
+void laset_ThemeColorSelection(laBoxedTheme* bt, int val){
+    bt->ColorSelection=val; la_RefreshBoxedThemeColor(bt); laRedrawAllWindows();
+}
+void laset_ThemeNoDecalInvert(laBoxedTheme* bt, int val){
+    bt->NoDecalInvert=val; la_RefreshBoxedThemeColor(bt); laRedrawAllWindows();
 }
 void laset_ThemeWireTransparency(laTheme* t, real val){ t->WireTransparency = val; la_RegenerateWireColors(); laRedrawAllWindows(); }
 void laset_ThemeWireBrightness(laTheme* t, real val){ t->WireBrightness = val; la_RegenerateWireColors(); laRedrawAllWindows(); }
@@ -1549,7 +1552,7 @@ void la_RegisterInternalProps(){
             laAddSubGroup(p, "la","LA", "LA Main Structure", "la_main",0,0,laui_SubPropInfoDefault, -1, laget_Main, 0,0,0,0,0,0,LA_UDF_SINGLE | LA_UDF_LOCAL);
 
             p = laAddPropertyContainer("boxed_theme", "Boxed Theme", "A single theme item for one or multiple kinds of uiitems", 0,laui_BoxedThemeItem, sizeof(laBoxedTheme), 0,0,1);{
-                laAddStringProperty(p, "name", "Name", "Boxed theme name", 0,0,0,0,1, offsetof(laBoxedTheme, Name), 0,0,0,0,LA_AS_IDENTIFIER);
+                laAddStringProperty(p, "name", "Name", "Boxed theme name", 0,0,0,0,1, offsetof(laBoxedTheme, Name), 0,0,0,0,LA_AS_IDENTIFIER|LA_TRANSLATE);
                 laAddFloatProperty(p, "normal", "Normal", "Background brightness", 0,0,0,1, 0,0.025, 1, 0,offsetof(laBoxedTheme, NormalY), 0,laset_ThemeNormal, 0,0,0,0,0,0,0,0,0);
                 laAddFloatProperty(p, "active", "Active", "Background brightness in active state", 0,0,0,1, 0,0.025, 1, 0,offsetof(laBoxedTheme, ActiveY), 0,laset_ThemeActive, 0,0,0,0,0,0,0,0,0);
                 laAddFloatProperty(p, "border", "Border", "Border brightness", 0,0,0,1, 0,0.025, 1, 0,offsetof(laBoxedTheme, BorderY), 0,laset_ThemeBorder, 0,0,0,0,0,0,0,0,0);
@@ -1558,19 +1561,37 @@ void la_RegisterInternalProps(){
                 laAddFloatProperty(p, "alpha", "Alpha", "Background alpha", 0,0,0,1, 0,0.025, 1, 0,offsetof(laBoxedTheme, Alpha), 0,laset_ThemeAlpha, 0,0,0,0,0,0,0,0,0);
                 laAddSubGroup(p, "back_ref", "Back Ref", "Boxed theme internal back-ref", "any_pointer",0,0,0,offsetof(laBoxedTheme, BackRef), 0,0,0,0,0,0,0,LA_UDF_REFER);
                 laAddSubGroup(p, "parent", "Parent", "Parent Theme", "theme",0,0,0,offsetof(laBoxedTheme, Parent), 0,0,0,0,0,0,0,LA_UDF_REFER);
+                ep=laAddEnumProperty(p, "box_style","Box Style","Draw box pop up or lowered down",0,0,0,0,0,offsetof(laBoxedTheme, BoxStyle),0,laset_ThemeBoxStyle,0,0,0,0,0,0,0,0);
+                laAddEnumItemAs(ep,"NORMAL","Normal","Normal box",0,0);
+                laAddEnumItemAs(ep,"POP","Pop-up","Pop-up box",1,0);
+                laAddEnumItemAs(ep,"LOWERED","Lowered","Lowered box",-1,0);
+                ep=laAddEnumProperty(p, "text_shadow","Text Shadow","Whether to show text shadow",0,0,0,0,0,offsetof(laBoxedTheme, TextShadow),0,laset_ThemeTextShadow,0,0,0,0,0,0,0,0);
+                laAddEnumItemAs(ep,"NONE","None","Text doesn't have any shadow",0,0);
+                laAddEnumItemAs(ep,"SHADOW","Shadow","Text has shadow",1,0);
+                ep=laAddEnumProperty(p, "color_selection","Color Selection","Which color to use for this widget",0,0,0,0,0,offsetof(laBoxedTheme, ColorSelection),0,laset_ThemeColorSelection,0,0,0,0,0,0,0,0);
+                laAddEnumItemAs(ep,"SELA","A","Select Color A",0,0);
+                laAddEnumItemAs(ep,"SELB","B","Select Color B",1,0);
+                laAddEnumItemAs(ep,"SELC","C","Select Color C",2,0);
+                ep=laAddEnumProperty(p, "no_decal_invert","No Decal Invert","Invert text color when widget has no decal",0,0,0,0,0,offsetof(laBoxedTheme, NoDecalInvert),0,laset_ThemeNoDecalInvert,0,0,0,0,0,0,0,0);
+                laAddEnumItemAs(ep,"NONE","None","Don't invert text brightness when widget has no decal",0,0);
+                laAddEnumItemAs(ep,"INVERT","Invert","Invert text brightness when widget has no decal",1,0);
             }
 
-            p = laAddPropertyContainer("theme", "Theme Package", "A package with all types of theme for ui items", 0,laui_Theme, sizeof(laTheme), 0,lapostim_Theme,2);{
+            p = laAddPropertyContainer("theme", "Theme Package", "A package with all types of theme for ui items", 0,laui_Theme, sizeof(laTheme),0,lapostim_Theme,2);{
+                laPropContainerExtraFunctions(p,0,lareset_Theme,0,0,0);
                 laAddStringProperty(p, "name", "Name", "Theme name", 0,0,0,0,1, offsetof(laTheme, Name), 0,0,laset_ThemeName,0,LA_AS_IDENTIFIER);
-                laAddStringProperty(p, "author", "Author", "The author's name", 0,0,0,0,1, offsetof(laTheme, Author), 0,0,0,0,0);
                 laAddSubGroup(p, "boxed_themes", "Boxed Themes", "The Boxed Theme For Single UiItem Or Panel", "boxed_theme",0,0,0,-1, 0,0,0,0,0,0,offsetof(laTheme, BoxedThemes), 0);
-                laAddFloatProperty(p, "color", "Color", "Base color of the theme", LA_WIDGET_FLOAT_COLOR, "R,G,B,A", 0,1, 0,0.025, 1, 0,offsetof(laTheme, Color), 0,0,4, 0,0,0,0,laset_ThemeColor, 0,0,0);
+                laAddFloatProperty(p, "color", "Color A", "Base color of the theme", LA_WIDGET_FLOAT_COLOR, "R,G,B,A", 0,1, 0,0.025, 1, 0,offsetof(laTheme, Color), 0,0,4, 0,0,0,0,laset_ThemeColor, 0,0,0);
+                laAddFloatProperty(p, "color_b", "Color B", "Alternative (B) base color of the theme", LA_WIDGET_FLOAT_COLOR, "R,G,B,A", 0,1, 0,0.025, 1, 0,offsetof(laTheme, ColorB), 0,0,4, 0,0,0,0,laset_ThemeColorB, 0,0,0);
+                laAddFloatProperty(p, "color_c", "Color C", "Alternative (C) base color of the theme", LA_WIDGET_FLOAT_COLOR, "R,G,B,A", 0,1, 0,0.025, 1, 0,offsetof(laTheme, ColorC), 0,0,4, 0,0,0,0,laset_ThemeColorC, 0,0,0);
                 laAddFloatProperty(p, "accent_color", "Accent Color", "Theme accent color for hightlight etc", LA_WIDGET_FLOAT_COLOR, "R,G,B,A", 0,1, 0,0.025, 1, 0,offsetof(laTheme, AccentColor), 0,0,4, 0,0,0,0,laset_ThemeAccentColor, 0,0,0);
                 laAddFloatProperty(p, "warning_color", "Warning Color", "Theme accent color for warning etc", LA_WIDGET_FLOAT_COLOR, "R,G,B,A", 0,1, 0,0.025, 1, 0,offsetof(laTheme, WarningColor), 0,0,4, 0,0,0,0,laset_ThemeWarningColor, 0,0,0);
-                laAddFloatProperty(p, "inactive_saturation", "Inactive Saturation", "Reduced saturation on inactive widgets", 0,0,0,1, 0,0.025, 1, 0,offsetof(laTheme, InactiveSaturation), 0,0,1, 0,0,0,0,laset_ThemeInactiveSaturation, 0,0,0);
-                laAddFloatProperty(p, "inactive_mix", "Inactive Mix", "Reduced alpha on inactive widgets", 0,0,0,1, 0,0.025, 1, 0,offsetof(laTheme, InactiveMix), 0,0,1, 0,0,0,0,laset_ThemeInactiveMix, 0,0,0);
-                laAddFloatProperty(p, "cursor_alpha", "Cursor Alpha", "Transparency of the cursor", 0,0,0,1, 0,0.025, 1, 0,offsetof(laTheme, CursorAlpha), 0,0,1, 0,0,0,0,laset_ThemeCursorAlpha, 0,0,0);
-                laAddFloatProperty(p, "selection_alpha", "Selection Alpha", "Transparency of selection backgrounds", 0,0,0,1, 0,0.025, 1, 0,offsetof(laTheme, SelectionAlpha), 0,0,1, 0,0,0,0,laset_ThemeSelectionAlpha, 0,0,0);
+                laAddFloatProperty(p, "inactive_saturation", "Inactive Saturation", "Reduced saturation on inactive widgets", 0,0,0,1, 0,0.025, 1, 0,offsetof(laTheme, InactiveSaturation), 0,laset_ThemeInactiveSaturation,0,0,0,0,0,0,0,0,0);
+                laAddFloatProperty(p, "inactive_mix", "Inactive Mix", "Reduced alpha on inactive widgets", 0,0,0,1, 0,0.025, 1, 0,offsetof(laTheme, InactiveMix),0,laset_ThemeInactiveMix,0,0,0,0,0,0,0,0,0);
+                laAddFloatProperty(p, "cursor_alpha", "Cursor Alpha", "Transparency of the cursor", 0,0,0,1, 0,0.025, 1, 0,offsetof(laTheme, CursorAlpha), 0,laset_ThemeCursorAlpha,0,0,0,0,0,0,0,0,0);
+                laAddFloatProperty(p, "selection_alpha", "Selection Alpha", "Transparency of selection backgrounds", 0,0,0,1, 0,0.025, 1, 0,offsetof(laTheme, SelectionAlpha),0,laset_ThemeSelectionAlpha,0,0,0,0,0,0,0,0,0);
+                laAddFloatProperty(p, "shadow_alpha", "Shadow Alpha", "Transparency of the shadow", 0,0,0,1, 0,0.025, 1, 0,offsetof(laTheme, ShadowAlpha), 0,laset_ThemeShadowAlpha,0,0,0,0,0,0,0,0,0);
+                laAddFloatProperty(p, "text_shadow_alpha", "Text Shadow Alpha", "Transparency of the text shadow", 0,0,0,1, 0,0.025, 1, 0,offsetof(laTheme, TextShadowAlpha), 0,laset_ThemeTextShadowAlpha,0,0,0,0,0,0,0,0,0);
                 laAddFloatProperty(p, "wire_transparency", "Wire Transparency", "Alpha of the wire color", 0,0,0,1, 0,0.05, 0.7, 0,offsetof(laTheme, WireTransparency), 0,laset_ThemeWireTransparency, 0,0,0,0,0,0,0,0,0);
                 laAddFloatProperty(p, "wire_saturation", "Wire Saturation", "Saturation of the wires", 0,0,0,1, 0,0.05, 0.8, 0,offsetof(laTheme, WireSaturation), 0,laset_ThemeWireSaturation, 0,0,0,0,0,0,0,0,0);
                 laAddFloatProperty(p, "wire_brightness", "Wire Brightness", "Brightness of the wires", 0,0,0,1, 0,0.05, 0.8, 0,offsetof(laTheme, WireBrightness), 0,laset_ThemeWireBrightness, 0,0,0,0,0,0,0,0,0);
@@ -1584,7 +1605,7 @@ void la_RegisterInternalProps(){
                 sp=laAddSubGroup(p,"preview","Preview","Theme preview","theme",0,0,0,-1,laget_Self,0,0,0,0,0,0,LA_READ_ONLY|LA_UDF_IGNORE|LA_UDF_REFER);
                 laSubGroupExtraFunctions(sp,0,0,laget_ThemePreviewTheme,0,0);
                 laAddOperatorProperty(p, "delete", "Delete", "Delete this theme", "LA_delete_theme", 0,0);
-                laAddOperatorProperty(p, "save_as", "Save As", "Save theme as file", "LA_udf_save_instance", U'🖫',0);
+                laAddOperatorProperty(p, "save_as", "Save as", "Save theme as file", "LA_udf_save_instance", U'🖫',0);
                 laAddOperatorProperty(p, "duplicate", "Duplicate", "Duplicate this theme", "LA_new_theme", U'⎘',0)
                     ->ExtraInstructions="duplicate=true;";
             }
@@ -1816,8 +1837,6 @@ void la_RegisterInternalProps(){
             laAddFloatProperty(p, "font_size", "Font Size", "The height of the font related to the row height", 0,0,0,1.0f, 0.1f, 0.02, 0.75, 0,offsetof(LA, FontSize), 0,laset_FontSize, 0,0,0,0,0,0,0,0,0);
             laAddIntProperty(p, "interface_size", "Interface Size", "The height of one row of ui item", 0,0,0,64, 16, 1, 40,0,offsetof(LA, UiRowHeight), 0,laset_UiRowHeight, 0,0,0,0,0,0,0,0,0);
 
-            laAddFloatProperty(p, "floating_alpha", "Shadow Alpha", "Shadow transparency for floating panels", 0,0,0,1, 0,0.01, 0.7, 0,offsetof(LA, FloatingAlpha), 0,0,0,0,0,0,0,0,0,0,0);
-            laAddIntProperty(p, "solid_shadow_length", "Solid Shadow Length", "Solid shadow length for floating panels", 0,0,0,40,0,1, 6, 0,offsetof(LA, SolidShadowLength), 0,0,0,0,0,0,0,0,0,0,0);
             laAddIntProperty(p, "wire_color_slices", "Wire color slices", "How many slices of color to give to node sockets", 0,0,0,32, 1, 1, 16, 0,offsetof(LA, WireColorSlices), 0,laset_WireColorSlices, 0,0,0,0,0,0,0,0,0);
             laAddFloatProperty(p, "wire_thickness", "Wire thickness", "How thick is a wire", 0,0,0,10,0.1, 0.5, 5, 0,offsetof(LA, WireThickness), 0,laset_WireThickness, 0,0,0,0,0,0,0,0,0);
             laAddFloatProperty(p, "wire_saggyness", "Wire saggyness", "How saggy is a wire", 0,0,0,1,0,0.01, 0.5, 0,offsetof(LA, WireSaggyness), 0,laset_WireSaggyness, 0,0,0,0,0,0,0,0,0);

+ 42 - 21
resources/la_templates.c

@@ -38,9 +38,13 @@ void laui_DefaultPropDetails(laUiList *uil, laPropPack *This, laPropPack *Extra,
             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->Name,0,0);
+            laShowSeparator(uil,c);
             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;
+            laShowLabel(uil,c,SSTR(s),0,0)->Flags|=LA_TEXT_MONO|LA_UI_FLAGS_DISABLED;
         }else{
+            laShowLabel(uil,c,ui->AT->Name,0,0);
+            laShowSeparator(uil,c);
             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;
@@ -51,6 +55,8 @@ void laui_DefaultPropDetails(laUiList *uil, laPropPack *This, laPropPack *Extra,
         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->Name,0,0);
+        laShowSeparator(uil,c);
         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);
@@ -59,20 +65,27 @@ void laui_DefaultPropDetails(laUiList *uil, laPropPack *This, laPropPack *Extra,
         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);
+            laShowSeparator(uil,c); strSafeSet(&s,0); strSafePrint(&s,"[ %s > %s ]",
+                pc->Name?pc->Name:pc->Identifier,p->Name?p->Name:p->Identifier, inst);
             int Level=0; laMemNodeHyper* m=memGetHead(inst,&Level);
-
+            if(pc->SaverDummy){
+                laSubProp*sp=pc->SaverDummy; laListHandle* a=(((char*)inst)+sp->ListHandleOffset); m=memGetHead(a->pFirst,&Level);
+            }
             laListHandle* users=memGetUserList(inst);
-            if(users){ strSafePrint(&s," %d Users", lstCountElements(users)); }
+            if(users){ int count,spec=laCountUserSpecific(users,p,&count); strSafePrint(&s," %d > %d Users",count,spec); }
             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(Level==2 || pc->SaverDummy){
+                if(m){
+                    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|LA_UI_FLAGS_DISABLED;
+                }else{
+                    laShowLabel(uil,c,"<Dummy File Unassigned>",0,0)->Flags|=LA_TEXT_MONO|LA_UI_FLAGS_DISABLED;
+                }
             }
 
             if(m){
@@ -682,7 +695,7 @@ void laui_Theme(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColu
     //	laShowLabel(tuil, crr, 0, "EXEC", 0, 0, 0);
     //}
 
-    col = laFirstColumn(uil); laSplitColumn(uil,col,0.65);
+    col = laFirstColumn(uil); laSplitColumn(uil,col,0.6);
     cl=laLeftColumn(col,0); cr=laRightColumn(col,0);
     
     laShowLabel(uil,col,"Theme Details",0,0)->Flags|=LA_TEXT_ALIGN_CENTER;
@@ -690,10 +703,14 @@ void laui_Theme(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColu
     laShowItem(uil,cl,Base, "name");
 
     ui=laBeginRow(uil,cr, 0,0);
-    laShowItem(uil,cr,Base, "duplicate");
     laShowSeparator(uil,cr)->Expand=1;
     laShowItem(uil,cr,Base, "delete")->Flags|=LA_UI_FLAGS_ICON;
     laEndRow(uil, ui);
+
+    ui=laBeginRow(uil,col, 0,0);
+    laShowItem(uil,col,Base, "save_as");
+    laShowItem(uil,col,Base, "duplicate");
+    laEndRow(uil, ui);
     
     laShowSeparator(uil,col);
 
@@ -701,11 +718,15 @@ void laui_Theme(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColu
     b=laOnConditionToggle(uil,col,0,0,0,0,0);{
         laShowLabel(uil,col,"Basics",0,0);
         laEndRow(uil, ui);
-        laShowItem(uil, cl, Base, "color"); laShowLabel(uil, cr, "Base Color",0,0);
+        laShowItem(uil, cl, Base, "color"); laShowLabel(uil, cr, "Base Color A",0,0);
+        laShowItem(uil, cl, Base, "color_b"); laShowLabel(uil, cr, "B",0,0);
+        laShowItem(uil, cl, Base, "color_c"); laShowLabel(uil, cr, "C",0,0);
         laShowItem(uil, cl, Base, "accent_color"); laShowLabel(uil, cr, "Accent Color",0,0);
         laShowItem(uil, cl, Base, "warning_color"); laShowLabel(uil, cr, "Warning Color",0,0);
         laShowItem(uil, cl, Base, "cursor_alpha");
         laShowItem(uil, cl, Base, "selection_alpha");
+        laShowItem(uil, cl, Base, "shadow_alpha");
+        laShowItem(uil, cl, Base, "text_shadow_alpha");
         laShowItem(uil, cr, Base, "inactive_mix");
         laShowItem(uil, cr, Base, "inactive_saturation");
     }laElse(uil,b);{
@@ -790,6 +811,12 @@ void laui_BoxedThemeItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_Thi
     laShowItemFull(uil, cr, Base, "name", LA_WIDGET_STRING_PLAIN, 0 ,0,0);
 
     bracket = laOnConditionToggle(uil, cl, 0, 0, 0, 0, 0);{
+        laUiItem* b=laBeginRow(uil,crl,1,0);
+        laShowItem(uil, crl, Base, "color_selection")->Flags|=LA_UI_FLAGS_EXPAND;
+        laShowItemFull(uil, crl, Base, "text_shadow",0,"text=Shadow",0,0)->Flags|=LA_UI_FLAGS_CYCLE|LA_UI_FLAGS_HIGHLIGHT;
+        laShowItemFull(uil, crl, Base, "no_decal_invert",0,"text=Invert",0,0)->Flags|=LA_UI_FLAGS_CYCLE|LA_UI_FLAGS_HIGHLIGHT;
+        laEndRow(uil,b);
+        laShowItem(uil, crr, Base, "box_style")->Flags|=LA_UI_FLAGS_EXPAND;
         laShowItem(uil, crl, Base, "normal");
         laShowItem(uil, crr, Base, "active");
         laShowItem(uil, crl, Base, "border");
@@ -1182,7 +1209,7 @@ void laui_ManagedPropInstance(laUiList *uil, laPropPack *Base, laPropPack *Opera
             laShowItem(uil,crr,Base,"__single_saver_dummy.__file");
             continue;
         }
-        laUiItem* b=laOnConditionToggle(uil,cr,0,0,0,0,0);{ strSafePrint(&b->ExtraInstructions,"text=📦 %s;",transLate(p->Name));
+        laUiItem* b=laOnConditionToggle(uil,c,0,0,0,0,0);{ strSafePrint(&b->ExtraInstructions,"text=📦 %s;",transLate(p->Name));
             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|LA_UI_COLLECTION_MANAGER_FILTER;
@@ -1410,12 +1437,6 @@ void laui_UserPreference(laUiList *uil, laPropPack *Base, laPropPack *OperatorIn
             laShowItem(muil, mcr, &UP->PP, "wire_color_slices");
             laShowItem(muil, mcr, &UP->PP, "wire_thickness");
             laShowItem(muil, mcr, &UP->PP, "wire_saggyness");
-
-            laShowSeparator(muil, mc);
-
-            laShowLabel(muil, mc, "Floating Panel:", 0, 0);
-            laShowItem(muil, mcl, &UP->PP, "floating_alpha");
-            laShowItem(muil, mcr, &UP->PP, "solid_shadow_length");
         }
         
         muil = laAddTabPage(bracket, "Input");{

+ 21 - 3
resources/la_translations_es-ES.c

@@ -24,9 +24,28 @@
 #include "la_5.h"
 
 static const char *entries[]={
+"<Dummy File Unassigned>","<Archivo ficticio no asignado>",
+"Lowered","Bajado",
+"Pop-up","Ventana emergente",
+"Invert","Invertir",
+"Shadow","Sombra",
+"New Theme","Nuevo tema",
+"Theme Details","Detalles del tema",
+"Installed Themes","Temas instalados",
+"Or click mouse button in:","O haga clic con el botón del mouse en:",
+"Select Operator","Seleccionar Operador",
+"Panel","Panel",
+"Widget","Widget",
+"Reset","Reiniciar",
+"Mouse","Ratón",
+"Signal","Señal",
+"Operator","Operador",
+"Editor de la caja de herramientas",
+"Mode","Modo",
+"Disp","Mostrar",
 "Toolbox","Caja de instrumento",
 "Toolboxes","Cajas de herramientas",
-"Performance Overlay", "Superposición de Rendimiento"
+"Performance Overlay", "Superposición de Rendimiento",
 "Menu","Menú",
 "☰ Menu","☰ Menú",
 "Remove this resource folder entry","Quita esta entrada de carpeta de recursos",
@@ -385,7 +404,6 @@ static const char *entries[]={
 "px","px",
 "Information","Información",
 "Width,Height","Ancho,Alto",
-"Floating Panel:","Panel Flotante:",
 "Solid Shadow Length","Longitud de Sombra sólida",
 "Wire Transparency","Transparencia del cable",
 "Cursor Alpha","Alfa de Cursor",
@@ -434,7 +452,7 @@ static const char *entries[]={
 "Hide","Ocultar",
 "Viewing Texture:","Textura de Visualización:",
 "Stylus Device","Dispositivo de Pluma",
-"Base Color","Color de Base",
+"Base Color A","Color de Base A",
 "Margin Size:","Tamaño de Márgen:",
 "Eraser Device","Dispositivo Borrador",
 "Animation Speed","Velocidad de Animación",

+ 20 - 2
resources/la_translations_zh-hans.c

@@ -19,6 +19,25 @@
 #include "la_5.h"
 
 static const char *entries[]={
+"<Dummy File Unassigned>","<未指定占位文件>",
+"Lowered","凹陷",
+"Pop-up","凸起",
+"Invert","反转",
+"Shadow","阴影",
+"New Theme","新主题",
+"Theme Details","主题详细信息",
+"Installed Themes","已安装的主题",
+"Or click mouse button in:","或者在这里点击鼠标:",
+"Select Operator","选择操作",
+"Panel","面板",
+"Widget","挂件",
+"Reset","重置",
+"Mouse","鼠标",
+"Signal","信号",
+"Operator","操作",
+"Toolbox Editor","工具箱编辑器",
+"Mode","模式",
+"Disp","显示",
 "Toolbox","工具箱",
 "Toolboxes","工具箱",
 "Performance Overlay","性能参数叠加",
@@ -380,7 +399,6 @@ static const char *entries[]={
 "px","px",
 "Information","信息",
 "Width,Height","宽度,高度",
-"Floating Panel:","浮动面板:",
 "Solid Shadow Length","阴影长度",
 "Wire Transparency","线条透明度",
 "Cursor Alpha","指针透明度",
@@ -429,7 +447,7 @@ static const char *entries[]={
 "Hide","隐藏",
 "Viewing Texture:","查看贴图:",
 "Stylus Device","手写笔设备",
-"Base Color","基础颜色",
+"Base Color A","基础颜色 A",
 "Margin Size:","留白尺寸:",
 "Eraser Device","橡皮擦设备",
 "Animation Speed","动画速度",

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 313 - 247
resources/la_widgets.c


Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov