*/}}
ソースを参照

minor drawing tweak

YimingWu 1 日 前
コミット
279c33b258

+ 1 - 0
la_interface.h

@@ -354,6 +354,7 @@ STRUCTURE(laInitArguments){
     int HasHistories;
     int HasTerminal;
     int HasAudio;
+    int HasHalftoneOption;
     int GLDebug;
     int EnableLogStdOut;
 };

+ 2 - 2
resources/la_templates.c

@@ -1464,9 +1464,9 @@ void laui_UserPreference(laUiList *uil, laPropPack *Base, laPropPack *OperatorIn
 
             laShowSeparator(muil, mc);
 
-            if(MAIN.InitArgs.HasWorldObjects){
+            if(MAIN.InitArgs.HasWorldObjects || MAIN.InitArgs.HasHalftoneOption){
                 laShowLabel(muil, mc, "Viewport:", 0, 0);
-                laShowItem(muil, mcl, &UP->PP, "viewport_halftone_factor");
+                laShowItem(muil, mcr, &UP->PP, "viewport_halftone_factor");
                 laShowItem(muil, mcr, &UP->PP, "viewport_halftone_size");
                 laShowSeparator(muil, mc);
             }

+ 1 - 1
resources/la_tns_shaders.cpp

@@ -867,7 +867,7 @@ void main(){
 	if(UseLut!=0){
 		color.rgb = texture(TexLut,color.bgr*vec3(32.0/33.0)+vec3(1.0/64.0)).rgb;
 	}
-	if(UseHalftone>1e-6){ color=mix(color,halftone(color),UseHalftone); }
+	if(UseHalftone>1e-6){ color=mix(color,halftone(color),UseHalftone); if(color.a==0.0) discard; }
     outColor = color;
     outGPos = fGPos;
 })";

+ 3 - 6
resources/la_widgets_viewers.c

@@ -522,14 +522,11 @@ void la_CanvasDefaultOverlay(laUiItem* ui, int h){
     int startx=(ui->R+ui->L)/2-LA_RH2*2;
     int offs=LA_RH/12;
     
-    tnsDrawStringAuto("☰",colork,startx+offs, startx+LA_RH+offs, ui->B-LA_M-LA_RH+offs, LA_TEXT_ALIGN_CENTER);
-    tnsDrawStringAuto("☰",color,startx, startx+LA_RH, ui->B-LA_M-LA_RH, LA_TEXT_ALIGN_CENTER);
-    tnsDrawStringAuto(MaxIco,colork,startx+LA_RH+offs, startx+LA_2RH+offs, ui->B-LA_M-LA_RH+offs, LA_TEXT_ALIGN_CENTER);
-    tnsDrawStringAuto(MaxIco,color,startx+LA_RH, startx+LA_2RH, ui->B-LA_M-LA_RH, LA_TEXT_ALIGN_CENTER);
+    tnsDrawStringAuto("☰",color,startx, startx+LA_RH, ui->B-LA_M-LA_RH, LA_TEXT_ALIGN_CENTER|LA_TEXT_SHADOW);
+    tnsDrawStringAuto(MaxIco,color,startx+LA_RH, startx+LA_2RH, ui->B-LA_M-LA_RH, LA_TEXT_ALIGN_CENTER|LA_TEXT_SHADOW);
 
     if(ui->Expand>=0 && ui!=MAIN.CurrentWindow->MaximizedUi){
-        tnsDrawStringAuto("◿",colork,ui->R-LA_RH+offs, ui->R+offs, ui->B-LA_M-LA_RH+offs, LA_TEXT_ALIGN_CENTER);
-        tnsDrawStringAuto("◿",laThemeColor(bt,LA_BT_BORDER),ui->R-LA_RH, ui->R, ui->B-LA_M-LA_RH, LA_TEXT_ALIGN_CENTER);
+        tnsDrawStringAuto("◿",laThemeColor(bt,LA_BT_BORDER),ui->R-LA_RH, ui->R, ui->B-LA_M-LA_RH, LA_TEXT_ALIGN_CENTER|LA_TEXT_SHADOW);
     }
 
     tnsFlush();