Skip to content
This repository was archived by the owner on Jan 4, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 127 additions & 0 deletions FunkeySelector/About.Designer.cs

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

14 changes: 14 additions & 0 deletions FunkeySelector/About.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using FunkeySelector.UserControls;
using System;
using System.Windows.Forms;

namespace FunkeySelector
{
public partial class About : BasicForm
{
public About()
{
InitializeComponent();
}
}
}
File renamed without changes.
36 changes: 21 additions & 15 deletions FunkeySelector/CustomFManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,29 @@

namespace FunkeySelector
{
class CustomFManager
static class CustomF
{
public void setFunkey(string funkeyCodeNum) //This is the code to switch Funkeys, funkeyCodeNum is the code defined in funkeys.rdf.
// The FunkeyIDs and other information about funkeys can be found in RadicaGame/data/system/funkeys.rdf
public static void SetFunkey(string funkeyID)
{
using (StreamWriter writetext = new StreamWriter("customF.txt"))
{
writetext.Write("funkeyCodeNum=" + funkeyCodeNum); //Creates the customF.txt
}
if (Properties.Settings.Default.wineCompat == false) //Checks if Wine/Mono compatibility is not enabled.
{
Process[] pname = Process.GetProcessesByName("UBFunkeys");
if (pname.Length == 0) //Prevents crashing if UBFunkeys.exe isn't running.
{
}
else Process.GetProcessesByName("UBFunkeys")[0].CloseMainWindow(); //Closes the game to trigger the mod.
}
//It saves a lot of time to have a simple function to call rather than individual statements.
File.WriteAllText("customF.txt", $"funkeyCodeNum={funkeyID}");
TriggerFunkeySelectionMod();
}

public static void SetFunkeyFromFile(string filename)
{
File.Copy(filename, "customF.txt", true);
TriggerFunkeySelectionMod();
}

public static void TriggerFunkeySelectionMod()
{
if (Properties.Settings.Default.wineCompat == true) return;

Process[] processes = Process.GetProcessesByName("UBFunkeys");
if (processes.Length == 0) return;
// Close the main window to trigger the mod
processes[0].CloseMainWindow();
}
}
}
168 changes: 168 additions & 0 deletions FunkeySelector/CustomFunkeys.Designer.cs

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

Loading