fix bugs, add enhancements.
This commit is contained in:
parent
25a4838a11
commit
3dfb0d2e12
|
|
@ -128,7 +128,10 @@ public class GlobalFuncs
|
|||
ini.IniWriteValue(section, "PlayerLimit", GlobalVars.UserConfiguration.PlayerLimit.ToString());
|
||||
ini.IniWriteValue(section, "UPnP", GlobalVars.UserConfiguration.UPnP.ToString());
|
||||
ini.IniWriteValue(section, "ItemMakerDisableHelpMessage", GlobalVars.UserConfiguration.DisabledItemMakerHelp.ToString());
|
||||
ini.IniWriteValue(section, "PlayerTripcode", SecurityFuncs.Base64Encode(GlobalVars.UserConfiguration.PlayerTripcode.ToString()));
|
||||
if (string.IsNullOrWhiteSpace(ini.IniReadValue(section, "PlayerTripcode", GenerateAndReturnTripcode())))
|
||||
{
|
||||
ini.IniWriteValue(section, "PlayerTripcode", SecurityFuncs.Base64Encode(GlobalVars.UserConfiguration.PlayerTripcode.ToString()));
|
||||
}
|
||||
ini.IniWriteValue(section, "DiscordRichPresence", GlobalVars.UserConfiguration.DiscordPresence.ToString());
|
||||
ini.IniWriteValue(section, "MapPath", GlobalVars.UserConfiguration.MapPath.ToString());
|
||||
ini.IniWriteValue(section, "MapPathSnip", GlobalVars.UserConfiguration.MapPathSnip.ToString());
|
||||
|
|
|
|||
|
|
@ -180,7 +180,10 @@ namespace NovetusLauncher
|
|||
#region Form Event Functions
|
||||
public void InitForm()
|
||||
{
|
||||
Parent.Text = "Novetus " + GlobalVars.ProgramInformation.Version;
|
||||
if (FormStyle != Settings.Style.Stylish)
|
||||
{
|
||||
Parent.Text = "Novetus " + GlobalVars.ProgramInformation.Version;
|
||||
}
|
||||
GlobalFuncs.ConsolePrint("Novetus version " + GlobalVars.ProgramInformation.Version + " loaded. Initializing config.", 4, ConsoleBox);
|
||||
GlobalFuncs.ConsolePrint("Novetus path: " + GlobalPaths.BasePath, 4, ConsoleBox);
|
||||
|
||||
|
|
@ -226,6 +229,13 @@ namespace NovetusLauncher
|
|||
File.Create(GlobalPaths.ConfigDir + "\\ports.txt").Dispose();
|
||||
}
|
||||
|
||||
if (FormStyle == Settings.Style.Stylish)
|
||||
{
|
||||
Parent.Text = "Novetus " + GlobalVars.ProgramInformation.Version + " [CLIENT: " +
|
||||
GlobalVars.UserConfiguration.SelectedClient + " | MAP: " +
|
||||
GlobalVars.UserConfiguration.Map + "]";
|
||||
}
|
||||
|
||||
GlobalFuncs.CreateAssetCacheDirectories();
|
||||
|
||||
SetupImportantData();
|
||||
|
|
|
|||
|
|
@ -123,6 +123,12 @@ namespace NovetusLauncher
|
|||
launcherFormStylishInterface1.userNameBox.Text = GlobalVars.UserConfiguration.PlayerName;
|
||||
launcherFormStylishInterface1.mapsBox.SelectedNode = TreeNodeHelper.SearchTreeView(GlobalVars.UserConfiguration.Map, launcherFormStylishInterface1.mapsBox.Nodes);
|
||||
launcherFormStylishInterface1.mapsBox.Focus();
|
||||
//stupid fucking HACK because we aren't selecting it properly.
|
||||
if (launcherFormStylishInterface1.mapsBox.SelectedNode != null)
|
||||
{
|
||||
launcherFormStylishInterface1.mapsBox.SelectedNode.BackColor = SystemColors.Highlight;
|
||||
launcherFormStylishInterface1.mapsBox.SelectedNode.ForeColor = SystemColors.HighlightText;
|
||||
}
|
||||
launcherFormStylishInterface1.joinPortBox.Text = GlobalVars.JoinPort.ToString();
|
||||
launcherFormStylishInterface1.serverPortBox.Text = GlobalVars.UserConfiguration.RobloxPort.ToString();
|
||||
launcherFormStylishInterface1.discordRichPresenceBox.IsChecked = GlobalVars.UserConfiguration.DiscordPresence;
|
||||
|
|
@ -168,7 +174,7 @@ namespace NovetusLauncher
|
|||
|
||||
foreach (Form f in openForms)
|
||||
{
|
||||
if (f.Name != Parent.Name)
|
||||
if (f.Name != Name)
|
||||
f.Close();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -574,6 +574,36 @@
|
|||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="{x:Type ComboBoxItem}">
|
||||
<Setter Property="FontFamily" Value="Comic Sans MS" />
|
||||
<Setter Property="FontSize" Value="12" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ComboBoxItem">
|
||||
<Border Name="_Border"
|
||||
Padding="2"
|
||||
SnapsToDevicePixels="true">
|
||||
<ContentPresenter />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsSelected" Value="true">
|
||||
<Setter TargetName="_Border" Property="Background">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="{DynamicResource {x:Static SystemColors.HighlightColorKey}}"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Foreground">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="{DynamicResource {x:Static SystemColors.HighlightTextColorKey}}"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- Edited From https://gist.github.com/hansmaad/9187633 -->
|
||||
<SolidColorBrush x:Key="ComboBoxNormalBorderBrush" Color="#FFEDEDED" />
|
||||
<SolidColorBrush x:Key="ComboBoxNormalBackgroundBrush" Color="#FFEDEDED" />
|
||||
|
|
@ -626,6 +656,8 @@
|
|||
<Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
|
||||
<Setter Property="TextElement.Foreground" Value="Black"/>
|
||||
<Setter Property="FrameworkElement.FocusVisualStyle" Value="{x:Null}"/>
|
||||
<Setter Property="FontSize" Value="12" />
|
||||
<Setter Property="FontFamily" Value="Helvetica" />
|
||||
<Setter Property="Control.Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ComboBox">
|
||||
|
|
@ -761,7 +793,7 @@
|
|||
<TextBox x:Name="maxPlayersBox" HorizontalAlignment="Left" Height="20" Margin="16.166,71,0,0" TextWrapping="Wrap" Text="12" VerticalAlignment="Top" Width="66" Grid.Column="2" TextChanged="maxPlayersBox_TextChanged"/>
|
||||
<CheckBox x:Name="uPnPBox" Content="uPnP" Grid.Column="1" HorizontalAlignment="Left" Margin="78,93,0,0" VerticalAlignment="Top" Checked="uPnPBox_Checked" Unchecked="uPnPBox_Unchecked" Click="uPnPBox_Click"/>
|
||||
<CheckBox x:Name="NotifBox" Content="Join Alerts" Grid.Column="1" HorizontalAlignment="Left" Margin="134,93,0,0" VerticalAlignment="Top" Grid.ColumnSpan="2" Checked="NotifBox_Checked" Unchecked="NotifBox_Unchecked"/>
|
||||
<Button x:Name="serverInfoButton" Content="Server Information" Grid.Column="1" HorizontalAlignment="Left" Margin="78,113,0,0" VerticalAlignment="Top" Width="139" Grid.ColumnSpan="2" Click="serverInfoButton_Click"/>
|
||||
<Button x:Name="serverInfoButton" Content="Server Information" Grid.Column="1" HorizontalAlignment="Left" Margin="78,113,0,0" VerticalAlignment="Top" Width="139" Grid.ColumnSpan="2" Click="serverInfoButton_Click" Height="20"/>
|
||||
<Rectangle x:Name="hostServerBrowserGroupBox" Fill="#FFDEDCDC" HorizontalAlignment="Left" Height="110" Margin="72,145,0,0" Stroke="Black" VerticalAlignment="Top" Width="153" Grid.Column="1" Grid.ColumnSpan="2"/>
|
||||
<Rectangle x:Name="hostServerBrowserLabelBox" Fill="#FFAAA8A8" HorizontalAlignment="Left" Height="30" Margin="72,145,0,0" Stroke="Black" VerticalAlignment="Top" Width="153" Grid.Column="1" Grid.ColumnSpan="2"/>
|
||||
<Label x:Name="hostServerBrowserLabel" Content="Optional Hosting Settings" HorizontalAlignment="Left" Margin="69,147,0,0" VerticalAlignment="Top" Width="156" Grid.Column="1" RenderTransformOrigin="0.561,0.175" FontSize="12" Grid.ColumnSpan="2"/>
|
||||
|
|
|
|||
|
|
@ -131,6 +131,10 @@ namespace NovetusLauncher
|
|||
|
||||
launcherForm.SelectMap();
|
||||
LoadMapDesc();
|
||||
|
||||
FormParent.Text = "Novetus " + GlobalVars.ProgramInformation.Version + " [CLIENT: " +
|
||||
GlobalVars.UserConfiguration.SelectedClient + " | MAP: " +
|
||||
GlobalVars.UserConfiguration.Map + "]";
|
||||
}
|
||||
|
||||
private void clientListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
|
|
@ -177,6 +181,10 @@ namespace NovetusLauncher
|
|||
return;
|
||||
}
|
||||
|
||||
FormParent.Text = "Novetus " + GlobalVars.ProgramInformation.Version + " [CLIENT: " +
|
||||
GlobalVars.UserConfiguration.SelectedClient + " | MAP: " +
|
||||
GlobalVars.UserConfiguration.Map + "]";
|
||||
|
||||
GlobalFuncs.UpdateRichPresence(GlobalVars.LauncherState.InLauncher, "");
|
||||
|
||||
FormCollection fc = System.Windows.Forms.Application.OpenForms;
|
||||
|
|
|
|||
Loading…
Reference in New Issue