Skip to content

Commit

Permalink
Changelog:
Browse files Browse the repository at this point in the history
v2.1 - April 25 , 2022
 - Added Context.HandlersFolder (path to the root of Nucleus Co-op handlers folder: NucleusCo-op\handlers).
 - Fixed app crash when a handler throws an error (sometimes on app close).
 - Fixed random crashes while clicking on the game list.
 - All monitors in use should be correctly scaled to 100% when a game starts now.
 - Added UI option to enable/disable the auto setting of the desktop scale to 100% (enabled by default).
 - All UI elements (pictures) can be customized now (see the default theme folder).
 - Splashscreen fixes, you can skip it now by clicking on it if it shows for too long.
 - Added UI options in settings to disable/enable the splashscreen and click sound in the settings tab and moved the "mouse click" setting to the setting.ini instead of theme.ini.
 - Other UI related details.
 - Some UI code optimizations.
 - New and improved Nucleus Co-op themes.
 - Added theme switch option in settings.
 - Links can be clicked in handler notes now.
 - Added option to use custom text in Context.RunAdditionalFiles prompt(s) + a boolean to show or not the file path. See readme.txt.
 - New Documents path registry key backup/restoration handling, should fully fix Nucleus changing the location of the Documents folder sometimes after a crash.
 - Added custom virtual devices icons.
 - First attempt to fix Turkish "ı" bug, requires to be tested in real conditions.
 - Fixed account_name.txt being edited while UseGoldberg is not used.
 - Added new input device detection in setup screen, keyboards and mice icons will only show in the UI if a key is pressed or a mouse moved now.
 - Added an option in theme.ini to round the Nucleus Co-op window corners (enabled by default).
 - Added multiple Nucleus Co-op instances check (can be disabled in settings.ini).
 - Added the possibility to choose the app font in theme.ini (size can be adjusted).
 - Fixed a crash that occurred when custom icon pictures were deleted.
 - Added new "icons" folder inside the Nucleus Co-op "gui" folder, custom icon paths are now saved in the "icons.ini" inside that folder instead of being saved in settings.ini.
 - Fixed crash that occurred when an user had a custom Documents folder in the root of his drive and clicked game options in the UI.
 - Fixed "Game.SymlinkFiles = [""];" and updated so that it can work under "Game.Play = function() {" using "Context.ProceedSymlink();".
 - Help gif updated.
 - Fixed Nucleus Co-op reporting the incorrect line number when a handler has an error, can still show the number with an offset of +1 if the line number returned is a float.
 - Fixed a Nucleus Co-op silent crash that happened when controllers got disconnected and reconnected multiple times.
 - Added Game.SetTopMostAtEnd = true; Sets the game windows to top most at the very end.
 - Added .ini option to hide the Nucleus Co-op offline icon.
 - Added handler notes magnifier option.
 - Added new supported inputs UI icons, display what input devices a handler supports.
 - Added Player Steam IDs fields to the Nucleus Nicknames settings tab (now named Players), you can change the instances Player Steam IDs when a handler uses goldberg or SSE via the UI now.
 - Added new Nicknames/Player Steam IDs switcher, you can quickly switch the order of the nicknames and Player Steam IDs you set up.
  • Loading branch information
Mikou27 committed Apr 25, 2022
1 parent 8a0086c commit 5f9b38b
Show file tree
Hide file tree
Showing 115 changed files with 1,512 additions and 792 deletions.
2 changes: 1 addition & 1 deletion Master/NucleusCoopTool/Forms/DownloadPrompt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public DownloadPrompt(Handler handler, MainForm mf, string zipFileName)
try
{
InitializeComponent();

Handler = handler;
mainForm = mf;

Expand Down
1 change: 0 additions & 1 deletion Master/NucleusCoopTool/Forms/HandlerInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ public void UpdateSize(float scale)
if (c.GetType() == typeof(TextBox) ^ c.GetType() == typeof(RichTextBox) ^ c.GetType() == typeof(PictureBox))
{
c.Font = new Font(mainForm.customFont, newFontSize, FontStyle.Regular, GraphicsUnit.Point, 0);

}
}
}
Expand Down
532 changes: 284 additions & 248 deletions Master/NucleusCoopTool/Forms/MainForm.Designer.cs

Large diffs are not rendered by default.

79 changes: 66 additions & 13 deletions Master/NucleusCoopTool/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,24 @@ public partial class MainForm : BaseForm, IDynamicSized
public string[] rgb_MenuStripBackColor;
public string[] rgb_MenuStripFontColor;
public string[] rgb_TitleBarColor;
public string[] rgb_HandlerNoteBackColor;
public string[] rgb_HandlerNoteTitleFont;
public string[] rgb_HandlerNoteFontColor;
public string[] rgb_HandlerNoteTitleFontColor;
public string[] rgb_ButtonsBorderColor;
public string[] rgb_ThirdPartyToolsLinks;
public string[] rgb_HandlerNoteBackColor;
public string[] rgb_HandlerNoteTitleBackColor;

public Color TitleBarColor;
public Color MouseOverBackColor;
public Color MenuStripBackColor;
public Color MenuStripFontColor;
public Color ButtonsBorderColor;
private Color HandlerNoteBackColor;
private Color HandlerNoteFontColor;
private Color HandlerNoteTitleBackColor;
private Color HandlerNoteTitleFont;

public FileInfo fontPath;

public void CheckNetCon()
Expand Down Expand Up @@ -281,6 +288,7 @@ public void button_Click(object sender, EventArgs e)
private void minimizeButton(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Minimized;

}

private void maximizeButton(object sender, EventArgs e)
Expand All @@ -292,13 +300,16 @@ private void maximizeButton(object sender, EventArgs e)
{
if (WindowState == FormWindowState.Maximized)
{
Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, Width, Height, 0, 0));
Region = Region.FromHrgn(CreateRoundRectRgn(0, 0, Width, Height, 0, 0));
}
else
{
Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, Width, Height, 20, 20));
Region = Region.FromHrgn(CreateRoundRectRgn(0, 0, Width, Height, 20, 20));
}
}

positionsControl.handlerNoteZoom.Visible = false;
btn_magnifier.Image = new Bitmap(themePath + "\\magnifier.png");
ResumeLayout();
}

Expand Down Expand Up @@ -360,6 +371,8 @@ public MainForm()
rgb_TitleBarColor = theme.IniReadValue("Colors", "TitleBar").Split(',');
rgb_HandlerNoteBackColor = theme.IniReadValue("Colors", "HandlerNoteBack").Split(',');
rgb_HandlerNoteFontColor = theme.IniReadValue("Colors", "HandlerNoteFont").Split(',');
rgb_HandlerNoteTitleFontColor = theme.IniReadValue("Colors", "HandlerNoteTitleFont").Split(',');
rgb_HandlerNoteTitleBackColor = theme.IniReadValue("Colors", "HandlerNoteTitleBackColor").Split(',');
rgb_ButtonsBorderColor = theme.IniReadValue("Colors", "ButtonsBorder").Split(',');
float fontSize = float.Parse(theme.IniReadValue("Font", "MainFontSize"));

Expand All @@ -372,10 +385,10 @@ public MainForm()
MenuStripFontColor = Color.FromArgb(Convert.ToInt32(rgb_MenuStripFontColor[0]), Convert.ToInt32(rgb_MenuStripFontColor[1]), Convert.ToInt32(rgb_MenuStripFontColor[2]));
HandlerNoteBackColor = Color.FromArgb(Convert.ToInt32(rgb_HandlerNoteBackColor[0]), Convert.ToInt32(rgb_HandlerNoteBackColor[1]), Convert.ToInt32(rgb_HandlerNoteBackColor[2]));
HandlerNoteFontColor = Color.FromArgb(Convert.ToInt32(rgb_HandlerNoteFontColor[0]), Convert.ToInt32(rgb_HandlerNoteFontColor[1]), Convert.ToInt32(rgb_HandlerNoteFontColor[2]));
HandlerNoteTitleBackColor = Color.FromArgb(Convert.ToInt32(rgb_HandlerNoteTitleBackColor[0]), Convert.ToInt32(rgb_HandlerNoteTitleBackColor[1]), Convert.ToInt32(rgb_HandlerNoteTitleBackColor[2]));
HandlerNoteTitleFont = Color.FromArgb(Convert.ToInt32(rgb_HandlerNoteTitleFontColor[0]), Convert.ToInt32(rgb_HandlerNoteTitleFontColor[1]), Convert.ToInt32(rgb_HandlerNoteTitleFontColor[2]));
ButtonsBorderColor = Color.FromArgb(Convert.ToInt32(rgb_ButtonsBorderColor[0]), Convert.ToInt32(rgb_ButtonsBorderColor[1]), Convert.ToInt32(rgb_ButtonsBorderColor[2]));



InitializeComponent();

SuspendLayout();
Expand All @@ -393,6 +406,9 @@ public MainForm()
ForeColor = Color.FromArgb(Convert.ToInt32(rgb_font[0]), Convert.ToInt32(rgb_font[1]), Convert.ToInt32(rgb_font[2]));
scriptAuthorTxt.BackColor = HandlerNoteBackColor;
scriptAuthorTxt.ForeColor = HandlerNoteFontColor;
scriptAuthorTxtSizer.BackColor = HandlerNoteTitleBackColor;
HandlerNoteTitle.ForeColor = HandlerNoteTitleFont;

//Controls Pictures

AppButtons = new Bitmap(themePath + "\\button.png");
Expand Down Expand Up @@ -430,6 +446,7 @@ public MainForm()
btn_dlFromHub.BackgroundImage = new Bitmap(themePath + "\\dlhub_btn.png");
glowingLine0.Image = new Bitmap(themePath + "\\lightbar_top.gif");
StepPanel.BackgroundImage = new Bitmap(themePath + "\\setup_screen.png");
btn_magnifier.Image = new Bitmap(themePath + "\\magnifier.png");
//
btn_Extract.FlatAppearance.MouseOverBackColor = MouseOverBackColor;
btnAutoSearch.FlatAppearance.MouseOverBackColor = MouseOverBackColor;
Expand Down Expand Up @@ -495,7 +512,7 @@ public MainForm()

foreach (Control control in ctrls)
{
if (control.Name != "btn_Links" && control.Name != "btn_thirdPartytools")//Close "third_party_tools_container" control when an other control in the form is clicked.
if (control.Name != "btn_Links" && control.Name != "btn_thirdPartytools" && control.Name != "HandlerNoteTitle")//Close "third_party_tools_container" control when an other control in the form is clicked.
{
control.Font = new Font(customFont, fontSize, FontStyle.Regular, GraphicsUnit.Pixel, 0);
control.Click += new EventHandler(this.this_Click);
Expand Down Expand Up @@ -588,7 +605,7 @@ public void UpdateSize(float scale)

scriptAuthorTxt.Font = new Font(customFont, newFontSize, FontStyle.Regular, GraphicsUnit.Pixel, 0);
txt_GameDesc.Font = new Font(customFont, newFontSize, FontStyle.Regular, GraphicsUnit.Pixel, 0);

ResumeLayout();
}

Expand Down Expand Up @@ -968,7 +985,8 @@ private void list_Games_SelectedChanged(object arg1, Control arg2)
{
currentControl = (GameControl)arg1;
currentGameInfo = currentControl.UserGameInfo;

positionsControl.handlerNoteZoom.Visible = false;
btn_magnifier.Image = new Bitmap(themePath + "\\magnifier.png");
if (currentGameInfo == null)
{
btn_gameOptions.Visible = false;
Expand Down Expand Up @@ -1494,7 +1512,10 @@ private void UpdateGameManager(object state)
proc.Dispose();
}

File.Delete(regFilePath);
if (!regFilePath.Contains("User Shell Folders"))
{
File.Delete(regFilePath);
}
}

handler_Ended();
Expand Down Expand Up @@ -2428,7 +2449,6 @@ private void button_UpdateAvailable_Click(object sender, EventArgs e)
}
}


private void btn_Extract_Click(object sender, EventArgs e)
{
System.Windows.Forms.OpenFileDialog ofd = new System.Windows.Forms.OpenFileDialog
Expand Down Expand Up @@ -2464,8 +2484,6 @@ private void button1_Click_1(object sender, EventArgs e)
CheckNetCon();
}



private void btn_Links_Click(object sender, EventArgs e)
{

Expand Down Expand Up @@ -2668,7 +2686,6 @@ private void btn_Discord_MouseLeave(object sender, EventArgs e)
private void btn_SplitCalculator_MouseEnter(object sender, EventArgs e)
{
btn_SplitCalculator.BackgroundImage = new Bitmap(themePath + "\\splitcalculator_mousehover.png");

}

private void btn_SplitCalculator_MouseLeave(object sender, EventArgs e)
Expand All @@ -2687,5 +2704,41 @@ private void btn_thirdPartytools_MouseLeave(object sender, EventArgs e)
btn_thirdPartytools.BackgroundImage = new Bitmap(themePath + "\\thirdPartytools.png");
}

private void btn_Next_MouseEnter(object sender, EventArgs e)
{
btn_Next.BackgroundImage = new Bitmap(themePath + "\\arrow_right_mousehover.png");
}

private void btn_Next_MouseLeave(object sender, EventArgs e)
{
btn_Next.BackgroundImage = new Bitmap(themePath + "\\arrow_right.png");
}

private void btnBack_MouseEnter(object sender, EventArgs e)
{
btnBack.BackgroundImage = new Bitmap(themePath + "\\arrow_left_mousehover.png");
}

private void btnBack_MouseLeave(object sender, EventArgs e)
{
btnBack.BackgroundImage = new Bitmap(themePath + "\\arrow_left.png");
}

private void btn_magnifier_Click(object sender, EventArgs e)
{
if (!positionsControl.handlerNoteZoom.Visible)
{
positionsControl.handlerNoteZoom.Text = currentGame.Description;
positionsControl.handlerNoteZoom.Location = new Point(positionsControl.Width / 2 - positionsControl.handlerNoteZoom.Width / 2, positionsControl.instruction.Height + 10);
positionsControl.handlerNoteZoom.Region = Region.FromHrgn(CreateRoundRectRgn(0, 0, positionsControl.handlerNoteZoom.Width, positionsControl.handlerNoteZoom.Height, 15, 15));
positionsControl.handlerNoteZoom.Visible = true;
btn_magnifier.Image = new Bitmap(themePath + "\\magnifier_close.png");
}
else
{
positionsControl.handlerNoteZoom.Visible = false;
btn_magnifier.Image = new Bitmap(themePath + "\\magnifier.png");
}
}
}
}
Loading

0 comments on commit 5f9b38b

Please sign in to comment.