mirror of
https://github.com/4sval/FModel.git
synced 2026-07-29 15:06:31 -05:00
Merge remote-tracking branch 'origin/master' into master
This commit is contained in:
commit
8dd348638d
|
|
@ -392,24 +392,19 @@ namespace FModel.Creator
|
|||
{
|
||||
icon.Draw(c);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((EIconDesign) Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoBackground)
|
||||
{
|
||||
Rarity.DrawRarity(c, icon);
|
||||
}
|
||||
else if ((EIconDesign) Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoBackground)
|
||||
{
|
||||
Rarity.DrawRarity(c, icon);
|
||||
}
|
||||
|
||||
LargeSmallImage.DrawPreviewImage(c, icon);
|
||||
|
||||
if ((EIconDesign) Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoBackground)
|
||||
if ((EIconDesign) Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoBackground &&
|
||||
(EIconDesign)Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoText)
|
||||
{
|
||||
if ((EIconDesign) Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoText)
|
||||
{
|
||||
Text.DrawBackground(c, icon);
|
||||
Text.DrawDisplayName(c, icon);
|
||||
Text.DrawDescription(c, icon);
|
||||
}
|
||||
Text.DrawBackground(c, icon);
|
||||
Text.DrawDisplayName(c, icon);
|
||||
Text.DrawDescription(c, icon);
|
||||
}
|
||||
|
||||
Watermark.DrawWatermark(c); // watermark should only be applied on icons with width = 512
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
<CommandBinding Command="{x:Static utils:Commands.AutoExport}" Executed="OnAutoShortcutPressed"/>
|
||||
<CommandBinding Command="{x:Static utils:Commands.AutoSave}" Executed="OnAutoShortcutPressed"/>
|
||||
<CommandBinding Command="{x:Static utils:Commands.AutoSaveImage}" Executed="OnAutoShortcutPressed"/>
|
||||
<CommandBinding Command="{x:Static utils:Commands.AutoOpenSounds}" Executed="OnAutoShortcutPressed"/>
|
||||
<CommandBinding Command="{x:Static utils:Commands.OpenImageDoubleClick}" Executed="OnImageOpenClick"/>
|
||||
</Window.CommandBindings>
|
||||
<Window.InputBindings>
|
||||
|
|
@ -30,6 +31,7 @@
|
|||
<KeyBinding Key="F4" Command="{x:Static utils:Commands.AutoExport}"/>
|
||||
<KeyBinding Key="F5" Command="{x:Static utils:Commands.AutoSave}"/>
|
||||
<KeyBinding Key="F6" Command="{x:Static utils:Commands.AutoSaveImage}"/>
|
||||
<KeyBinding Key="F7" Command="{x:Static utils:Commands.AutoOpenSounds}"/>
|
||||
</Window.InputBindings>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
|
|
@ -91,6 +93,9 @@
|
|||
<MenuItem Header="{x:Static properties:Resources.SaveImage}" IsCheckable="True" StaysOpenOnClick="True"
|
||||
IsChecked="{Binding Source={x:Static properties:Settings.Default}, Path=AutoSaveImage, Mode=TwoWay}"
|
||||
InputGestureText="F6"/>
|
||||
<MenuItem Header="{x:Static properties:Resources.OpenSounds}" IsCheckable="True" StaysOpenOnClick="True"
|
||||
IsChecked="{Binding Source={x:Static properties:Settings.Default}, Path=AutoOpenSounds, Mode=TwoWay}"
|
||||
InputGestureText="F7"/>
|
||||
</MenuItem>
|
||||
<MenuItem x:Name="FModel_MI_Assets_Export" Header="{x:Static properties:Resources.Export}" Click="FModel_MI_Assets_Export_Click">
|
||||
<MenuItem.Icon>
|
||||
|
|
|
|||
|
|
@ -120,29 +120,37 @@ namespace FModel
|
|||
switch (command.Name)
|
||||
{
|
||||
case "AutoExport":
|
||||
{
|
||||
bool b = Properties.Settings.Default.AutoExport;
|
||||
Properties.Settings.Default.AutoExport = !b;
|
||||
name = Properties.Resources.Export;
|
||||
state = states[Convert.ToInt32(b)];
|
||||
break;
|
||||
}
|
||||
{
|
||||
bool b = Properties.Settings.Default.AutoExport;
|
||||
Properties.Settings.Default.AutoExport = !b;
|
||||
name = Properties.Resources.Export;
|
||||
state = states[Convert.ToInt32(b)];
|
||||
break;
|
||||
}
|
||||
case "AutoSave":
|
||||
{
|
||||
bool b = Properties.Settings.Default.AutoSave;
|
||||
Properties.Settings.Default.AutoSave = !b;
|
||||
name = Properties.Resources.Save;
|
||||
state = states[Convert.ToInt32(b)];
|
||||
break;
|
||||
}
|
||||
{
|
||||
bool b = Properties.Settings.Default.AutoSave;
|
||||
Properties.Settings.Default.AutoSave = !b;
|
||||
name = Properties.Resources.Save;
|
||||
state = states[Convert.ToInt32(b)];
|
||||
break;
|
||||
}
|
||||
case "AutoSaveImage":
|
||||
{
|
||||
bool b = Properties.Settings.Default.AutoSaveImage;
|
||||
Properties.Settings.Default.AutoSaveImage = !b;
|
||||
name = Properties.Resources.SaveImage;
|
||||
state = states[Convert.ToInt32(b)];
|
||||
break;
|
||||
}
|
||||
{
|
||||
bool b = Properties.Settings.Default.AutoSaveImage;
|
||||
Properties.Settings.Default.AutoSaveImage = !b;
|
||||
name = Properties.Resources.SaveImage;
|
||||
state = states[Convert.ToInt32(b)];
|
||||
break;
|
||||
}
|
||||
case "AutoOpenSounds":
|
||||
{
|
||||
bool b = Properties.Settings.Default.AutoOpenSounds;
|
||||
Properties.Settings.Default.AutoOpenSounds = !b;
|
||||
name = Properties.Resources.OpenSounds;
|
||||
state = states[Convert.ToInt32(b)];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Properties.Settings.Default.Save();
|
||||
|
|
@ -290,11 +298,10 @@ namespace FModel
|
|||
var launcher = new FLauncher();
|
||||
if ((bool) launcher.ShowDialog())
|
||||
{
|
||||
string currentvalue = Properties.Settings.Default.PakPath;
|
||||
Properties.Settings.Default.PakPath = launcher.Path;
|
||||
|
||||
if (Properties.Settings.Default.PakPath != currentvalue)
|
||||
if (Properties.Settings.Default.PakPath != launcher.Path)
|
||||
{
|
||||
Properties.Settings.Default.PakPath = launcher.Path;
|
||||
|
||||
DarkMessageBoxHelper.Show(Properties.Resources.PathChangedRestart, Properties.Resources.PathChanged, MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[Restarting]", "Path(s) changed");
|
||||
|
||||
|
|
@ -302,10 +309,6 @@ namespace FModel
|
|||
Process.Start(Process.GetCurrentProcess().MainModule.FileName);
|
||||
Application.Current.Shutdown();
|
||||
}
|
||||
else
|
||||
{
|
||||
launcher.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace PakReader.Parsers.Objects
|
||||
{
|
||||
|
|
@ -18,7 +17,7 @@ namespace PakReader.Parsers.Objects
|
|||
EFormatArgumentType.UInt => reader.ReadUInt64(),
|
||||
EFormatArgumentType.Double => reader.ReadDouble(),
|
||||
EFormatArgumentType.Float => reader.ReadFloat(),
|
||||
_ => throw new NotImplementedException(string.Format(FModel.Properties.Resources.ParsingNotSupported, Type)),
|
||||
_ => null, // throw new NotImplementedException(string.Format(FModel.Properties.Resources.ParsingNotSupported, Type)),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,8 +45,6 @@ namespace PakReader.Textures.BC
|
|||
return ret;
|
||||
}
|
||||
|
||||
//BC7 https://github.com/hglm/detex/blob/master/decompress-bptc.c
|
||||
|
||||
static int GetPixelLoc(int width, int x, int y, int bpp, int off) => (y * width + x) * bpp + off;
|
||||
|
||||
static byte GetZNormal(byte x, byte y)
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ namespace PakReader.Textures
|
|||
data = Detex.DecodeDetexLinear(sequence, width, height, isFloat: false,
|
||||
inputFormat: DetexTextureFormat.DETEX_TEXTURE_FORMAT_BPTC,
|
||||
outputPixelFormat: DetexPixelFormat.DETEX_PIXEL_FORMAT_RGBA8);
|
||||
colorType = SKColorType.Rgba8888;
|
||||
colorType = SKColorType.Rgb888x;
|
||||
break;
|
||||
case EPixelFormat.PF_BC6H:
|
||||
data = Detex.DecodeDetexLinear(sequence, width, height, isFloat: true,
|
||||
|
|
|
|||
677
FModel/Properties/Resources.Designer.cs
generated
677
FModel/Properties/Resources.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
|
|
@ -1142,4 +1142,7 @@ It's now the most used free software to leak on Fortnite.</value>
|
|||
<data name="GameName_TheCycle" xml:space="preserve">
|
||||
<value>The Cycle</value>
|
||||
</data>
|
||||
<data name="OpenSounds" xml:space="preserve">
|
||||
<value>Open Sounds</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -10,6 +10,7 @@ namespace FModel.Utils
|
|||
public static readonly RoutedUICommand AutoExport = new RoutedUICommand(string.Empty, "AutoExport", typeof(MainWindow));
|
||||
public static readonly RoutedUICommand AutoSave = new RoutedUICommand(string.Empty, "AutoSave", typeof(MainWindow));
|
||||
public static readonly RoutedUICommand AutoSaveImage = new RoutedUICommand(string.Empty, "AutoSaveImage", typeof(MainWindow));
|
||||
public static readonly RoutedUICommand AutoOpenSounds = new RoutedUICommand(string.Empty, "AutoOpenSounds", typeof(MainWindow));
|
||||
public static readonly RoutedUICommand OpenImageDoubleClick = new RoutedUICommand(string.Empty, "OpenImageDoubleClick", typeof(MainWindow));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -124,8 +124,9 @@ namespace FModel.Utils
|
|||
private static string GetLanguageCode() => GetLanguageCode((ELanguage)Properties.Settings.Default.AssetsLanguage);
|
||||
private static string GetLanguageCode(ELanguage lang)
|
||||
{
|
||||
if (Globals.Game.ActualGame == EGame.Fortnite)
|
||||
return lang switch
|
||||
return Globals.Game.ActualGame switch
|
||||
{
|
||||
EGame.Fortnite => lang switch
|
||||
{
|
||||
ELanguage.English => "en",
|
||||
ELanguage.French => "fr",
|
||||
|
|
@ -143,9 +144,8 @@ namespace FModel.Utils
|
|||
ELanguage.Chinese => "zh-CN",
|
||||
ELanguage.TraditionalChinese => "zh-Hant",
|
||||
_ => "en",
|
||||
};
|
||||
if (Globals.Game.ActualGame == EGame.Valorant)
|
||||
return lang switch
|
||||
},
|
||||
EGame.Valorant => lang switch
|
||||
{
|
||||
ELanguage.English => "en-US",
|
||||
ELanguage.French => "fr-FR",
|
||||
|
|
@ -166,9 +166,8 @@ namespace FModel.Utils
|
|||
ELanguage.VietnameseVietnam => "vi-VN",
|
||||
ELanguage.Indonesian => "id-ID",
|
||||
_ => "en",
|
||||
};
|
||||
if (Globals.Game.ActualGame == EGame.DeadByDaylight)
|
||||
return lang switch
|
||||
},
|
||||
EGame.DeadByDaylight => lang switch
|
||||
{
|
||||
ELanguage.English => "en",
|
||||
ELanguage.French => "fr",
|
||||
|
|
@ -187,9 +186,8 @@ namespace FModel.Utils
|
|||
ELanguage.TraditionalChinese => "zh-Hant",
|
||||
ELanguage.Thai => "th",
|
||||
_ => "en",
|
||||
};
|
||||
if (Globals.Game.ActualGame == EGame.MinecraftDungeons)
|
||||
return lang switch
|
||||
},
|
||||
EGame.MinecraftDungeons => lang switch
|
||||
{
|
||||
ELanguage.English => "en",
|
||||
ELanguage.BritishEnglish => "en-GB",
|
||||
|
|
@ -206,9 +204,8 @@ namespace FModel.Utils
|
|||
ELanguage.Russian => "ru-RU",
|
||||
ELanguage.Swedish => "sv-SE",
|
||||
_ => "en"
|
||||
};
|
||||
if (Globals.Game.ActualGame == EGame.BattleBreakers)
|
||||
return lang switch
|
||||
},
|
||||
EGame.BattleBreakers => lang switch
|
||||
{
|
||||
ELanguage.English => "en",
|
||||
ELanguage.Russian => "ru",
|
||||
|
|
@ -220,9 +217,8 @@ namespace FModel.Utils
|
|||
ELanguage.PortugueseBrazil => "pt-BR",
|
||||
ELanguage.Chinese => "zh-Hans",
|
||||
_ => "en"
|
||||
};
|
||||
if (Globals.Game.ActualGame == EGame.Spellbreak)
|
||||
return lang switch
|
||||
},
|
||||
EGame.Spellbreak => lang switch
|
||||
{
|
||||
ELanguage.English => "en",
|
||||
ELanguage.Russian => "ru",
|
||||
|
|
@ -234,9 +230,8 @@ namespace FModel.Utils
|
|||
ELanguage.PortugueseBrazil => "pt-BR",
|
||||
ELanguage.Chinese => "zh-Hans",
|
||||
_ => "en"
|
||||
};
|
||||
if (Globals.Game.ActualGame == EGame.StateOfDecay2)
|
||||
return lang switch
|
||||
},
|
||||
EGame.StateOfDecay2 => lang switch
|
||||
{
|
||||
ELanguage.English => "en-US",
|
||||
ELanguage.AustralianEnglish => "en-AU",
|
||||
|
|
@ -247,9 +242,8 @@ namespace FModel.Utils
|
|||
ELanguage.SpanishMexico => "es-MX",
|
||||
ELanguage.German => "de-DE",
|
||||
_ => "en-US"
|
||||
};
|
||||
if (Globals.Game.ActualGame == EGame.TheCycle)
|
||||
return lang switch
|
||||
},
|
||||
EGame.TheCycle => lang switch
|
||||
{
|
||||
ELanguage.English => "en",
|
||||
ELanguage.German => "de",
|
||||
|
|
@ -260,8 +254,9 @@ namespace FModel.Utils
|
|||
ELanguage.Russian => "ru",
|
||||
ELanguage.Chinese => "zh",
|
||||
_ => "en"
|
||||
};
|
||||
return "en";
|
||||
},
|
||||
_ => "en"
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,9 +152,6 @@
|
|||
<CheckBox Grid.Row="0" Margin="5,6.5,5,5"
|
||||
Content="{x:Static properties:Resources.ReloadAesKeysAtLaunch}"
|
||||
IsChecked="{Binding Source={x:Static properties:Settings.Default}, Path=ReloadAesKeys, Mode=TwoWay}"/>
|
||||
<CheckBox Grid.Row="1" Margin="5,6.5,5,5"
|
||||
Content="{x:Static properties:Resources.AutoOpenSounds}"
|
||||
IsChecked="{Binding Source={x:Static properties:Settings.Default}, Path=AutoOpenSounds, Mode=TwoWay}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
|
|
|||
|
|
@ -49,9 +49,9 @@ namespace FModel.Windows.Settings
|
|||
if (_useDiscordRpc && !Properties.Settings.Default.UseDiscordRpc) // previously enabled
|
||||
DiscordIntegration.Deinitialize();
|
||||
|
||||
if (Properties.Settings.Default.AssetsLanguage != Languages_CbBox.SelectedIndex)
|
||||
if (Languages_CbBox.SelectedIndex > -1 && Languages_CbBox.SelectedItem is ComboBoxViewModel cb && cb.Id != Properties.Settings.Default.AssetsLanguage)
|
||||
{
|
||||
Properties.Settings.Default.AssetsLanguage = Languages_CbBox.SelectedIndex;
|
||||
Properties.Settings.Default.AssetsLanguage = cb.Id;
|
||||
await Localizations.SetLocalization(Properties.Settings.Default.AssetsLanguage, true).ConfigureAwait(false);
|
||||
}
|
||||
if (Properties.Settings.Default.AssetsJsonType != Json_CbBox.SelectedIndex)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user