Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
FelisDiligens committed Jul 30, 2022
2 parents edab32f + 66a3cf8 commit f4f05b8
Show file tree
Hide file tree
Showing 26 changed files with 242 additions and 400 deletions.
3 changes: 3 additions & 0 deletions Fo76ini/Fo76ini.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,9 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\Oswald.ttf" />
<None Include="Resources\RobotoCondensed-Bold.ttf" />
<None Include="Resources\RobotoCondensed.ttf" />
<None Include="Resources\wrench-2-24.png" />
<None Include="Resources\fallout76-logo-black.png" />
<None Include="Resources\fallout76-logo-white.png" />
Expand Down
8 changes: 7 additions & 1 deletion Fo76ini/Forms/FormMain/FormMain.Language.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
namespace Fo76ini
using Fo76ini.Utilities;
using System.Drawing;

namespace Fo76ini
{
partial class FormMain
{
Expand All @@ -14,6 +17,9 @@ public void OnLanguageChanged(object sender, TranslationEventArgs e)
// TODO: UpdateUI?
this.CheckVersion();

// Set font:
this.labelWelcome.Font = CustomFonts.GetHeaderFont();

this.Refresh(); // Forces redraw
}
// TODO: FormMods needs OnLanguageChanged code.
Expand Down
6 changes: 1 addition & 5 deletions Fo76ini/Forms/FormMain/FormMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ public partial class FormMain : Form

private GameInstance game;

public readonly bool FirstStart;

public FormMain()
{
InitializeComponent();
Expand Down Expand Up @@ -82,16 +80,14 @@ public FormMain()
// Disable scroll wheel on UI elements to prevent the user from accidentally changing values:
Utils.PreventChangeOnMouseWheelForAllElements(this);

this.labelWelcome.Font = new Font(CustomFonts.Overseer, 20, FontStyle.Regular);

}

private void FormMain_Load(object sender, EventArgs e)
{
this.timerCheckFiles.Enabled = true;

// Load translations
if (FirstStart)
if (Initialization.FirstStart)
Localization.DownloadLanguageFiles(); // Download language on first start! Might hang the program for a while, if the internet connection is bad, though...
Localization.GenerateDefaultTemplate();
Localization.LookupLanguages();
Expand Down
5 changes: 1 addition & 4 deletions Fo76ini/Forms/FormMain/Tabs/UserControlCustom.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ private void Translation_LanguageChanged(object sender, TranslationEventArgs e)
{
Translation translation = (Translation)sender;

if (translation.UsesNonLatinCharacters)
this.labelCustomTitle.Font = new Font("Impact", 18, FontStyle.Regular);
else
this.labelCustomTitle.Font = new Font(CustomFonts.Overseer, 20, FontStyle.Regular);
this.labelCustomTitle.Font = CustomFonts.GetHeaderFont();
}

#region Event handler
Expand Down
5 changes: 1 addition & 4 deletions Fo76ini/Forms/FormMain/Tabs/UserControlGallery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,7 @@ private void Translation_LanguageChanged(object sender, TranslationEventArgs e)
{
Translation translation = (Translation)sender;

if (translation.UsesNonLatinCharacters)
this.labelGalleryTitle.Font = new Font("Impact", 18, FontStyle.Regular);
else
this.labelGalleryTitle.Font = new Font(CustomFonts.Overseer, 20, FontStyle.Regular);
this.labelGalleryTitle.Font = CustomFonts.GetHeaderFont();
}

private void LinkControls()
Expand Down
5 changes: 1 addition & 4 deletions Fo76ini/Forms/FormMain/Tabs/UserControlNexusMods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ private void Translation_LanguageChanged(object sender, TranslationEventArgs e)
{
Translation translation = (Translation)sender;

if (translation.UsesNonLatinCharacters)
this.labelNexusTitle.Font = new Font("Impact", 18, FontStyle.Regular);
else
this.labelNexusTitle.Font = new Font(CustomFonts.Overseer, 20, FontStyle.Regular);
this.labelNexusTitle.Font = CustomFonts.GetHeaderFont();
}

private void UserControlNexusMods_Load(object sender, EventArgs e)
Expand Down
2 changes: 1 addition & 1 deletion Fo76ini/Forms/FormMain/Tabs/UserControlPipboy.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions Fo76ini/Forms/FormMain/Tabs/UserControlPipboy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@ private void Translation_LanguageChanged(object sender, TranslationEventArgs e)
{
Translation translation = (Translation)sender;

if (translation.UsesNonLatinCharacters)
this.labelPipboyTitle.Font = new Font("Impact", 18, FontStyle.Regular);
else
this.labelPipboyTitle.Font = new Font(CustomFonts.Overseer, 20, FontStyle.Regular);
this.labelPipboyTitle.Font = CustomFonts.GetHeaderFont();
}

private void LinkPipboyControls()
Expand Down
12 changes: 2 additions & 10 deletions Fo76ini/Forms/FormMain/Tabs/UserControlProfiles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,8 @@ private void Translation_LanguageChanged(object sender, TranslationEventArgs e)
{
Translation translation = (Translation)sender;

if (translation.UsesNonLatinCharacters)
{
this.labelSelectTitle.Font = new Font("Impact", 18, FontStyle.Regular);
this.labelEditTitle.Font = new Font("Impact", 18, FontStyle.Regular);
}
else
{
this.labelSelectTitle.Font = new Font(CustomFonts.Overseer, 20, FontStyle.Regular);
this.labelEditTitle.Font = new Font(CustomFonts.Overseer, 20, FontStyle.Regular);
}
this.labelSelectTitle.Font = CustomFonts.GetHeaderFont();
this.labelEditTitle.Font = CustomFonts.GetHeaderFont();
}

private void OnProfileChanged(object sender, ProfileEventArgs e)
Expand Down
5 changes: 1 addition & 4 deletions Fo76ini/Forms/FormMain/Tabs/UserControlSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,7 @@ public void OnLanguageChanged(object sender, TranslationEventArgs e)
Translation translation = (Translation)sender;
this.labelOutdatedLanguage.Visible = translation.IsOutdated();

if (translation.UsesNonLatinCharacters)
this.labelSettingsTitle.Font = new Font("Impact", 18, FontStyle.Regular);
else
this.labelSettingsTitle.Font = new Font(CustomFonts.Overseer, 20, FontStyle.Regular);
this.labelSettingsTitle.Font = CustomFonts.GetHeaderFont();
}

private void buttonDownloadLanguages_Click(object sender, EventArgs e)
Expand Down
44 changes: 22 additions & 22 deletions Fo76ini/Forms/FormMain/Tabs/UserControlTweaks.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions Fo76ini/Forms/FormMain/Tabs/UserControlTweaks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,7 @@ private void Translation_LanguageChanged(object sender, TranslationEventArgs e)
{
LoadTextResources();

Translation translation = (Translation)sender;
if (translation.UsesNonLatinCharacters)
this.labelTweaksTitle.Font = new Font("Impact", 18, FontStyle.Regular);
else
this.labelTweaksTitle.Font = new Font(CustomFonts.Overseer, 20, FontStyle.Regular);
this.labelTweaksTitle.Font = CustomFonts.GetHeaderFont();
}

private void UserControlTweaks_Load(object sender, EventArgs e)
Expand Down
Loading

0 comments on commit f4f05b8

Please sign in to comment.