Skip to content

Commit 93189f9

Browse files
committed
random changes
1 parent 76b42f3 commit 93189f9

3 files changed

Lines changed: 11 additions & 8 deletions

File tree

Bloxstrap/Bootstrapper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -727,14 +727,14 @@ private void SetRobloxWindowIcon(Process process, RobloxIcon icon)
727727
IntPtr hwnd = IntPtr.Zero;
728728

729729
// increased the amount of attempt + how long each one takes, hopefully it works everytime now without issues + it stops when it changes it successfully
730-
for (int i = 0; i < 800; i++)
730+
for (int i = 0; i < 1000; i++)
731731
{
732732
hwnd = process.MainWindowHandle;
733733

734734
if (hwnd != IntPtr.Zero && IsWindowVisible(hwnd))
735735
break;
736736

737-
Thread.Sleep(25);
737+
Thread.Sleep(10);
738738
}
739739

740740
if (hwnd == IntPtr.Zero || !IsWindowVisible(hwnd))

Bloxstrap/UI/Elements/Settings/Pages/ModsPage.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,6 @@
426426
</Border>
427427

428428
<StackPanel Grid.Column="2" VerticalAlignment="Top" Margin="16,0,0,0">
429-
<!-- Custom Mod Generator Options -->
430429
<TextBlock Text="Mod Generation Options" FontSize="13" FontWeight="Bold" Margin="0,8,0,4"/>
431430

432431
<StackPanel Orientation="Vertical" Margin="0,0,0,12">

Bloxstrap/UI/Elements/Settings/Pages/ModsPage.xaml.cs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -576,9 +576,12 @@ private Bitmap ApplyMaskPreview(Bitmap original, Color? solidColor, List<ModGene
576576
int idx = y * srcData.Stride + x * bytesPerPixel;
577577
byte a = srcPtr[idx + 3];
578578

579-
if (a == 0)
579+
if (a <= 5)
580580
{
581-
dstPtr[idx] = 0; dstPtr[idx + 1] = 0; dstPtr[idx + 2] = 0; dstPtr[idx + 3] = 0;
581+
dstPtr[idx] = 0;
582+
dstPtr[idx + 1] = 0;
583+
dstPtr[idx + 2] = 0;
584+
dstPtr[idx + 3] = 0;
582585
continue;
583586
}
584587

@@ -595,9 +598,10 @@ private Bitmap ApplyMaskPreview(Bitmap original, Color? solidColor, List<ModGene
595598
applyColor = solidColor ?? Color.White;
596599
}
597600

598-
dstPtr[idx] = applyColor.B;
599-
dstPtr[idx + 1] = applyColor.G;
600-
dstPtr[idx + 2] = applyColor.R;
601+
float alphaFactor = a / 255f;
602+
dstPtr[idx] = (byte)(applyColor.B * alphaFactor);
603+
dstPtr[idx + 1] = (byte)(applyColor.G * alphaFactor);
604+
dstPtr[idx + 2] = (byte)(applyColor.R * alphaFactor);
601605
dstPtr[idx + 3] = a;
602606
}
603607
}

0 commit comments

Comments
 (0)