generated from coloursofnoise/TemplateMod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
WiiButtonPromptsModule.cs
executable file
·43 lines (34 loc) · 1.29 KB
/
WiiButtonPromptsModule.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using System;
using Celeste;
using Microsoft.Xna.Framework;
using Monocle;
namespace Celeste.Mod.WiiButtonPrompts {
public class WiiButtonPromptsModule : EverestModule {
public static WiiButtonPromptsModule Instance;
public WiiButtonPromptsModule() {
Instance = this;
}
public override void Load() {
On.Celeste.Input.GuiInputPrefix += WiiButtons;
}
public override void Unload() {
On.Celeste.Input.GuiInputPrefix -= WiiButtons;
}
// Code to Get GUID of a Controller
/*public override void Initialize() {
string gUIDEXT = Microsoft.Xna.Framework.Input.GamePad.GetGUIDEXT(MInput.GamePads[Input.Gamepad].PlayerIndex);
Console.WriteLine(gUIDEXT);
}*/
//Code who Actually Makes it work
private string WiiButtons(On.Celeste.Input.orig_GuiInputPrefix orig, Input.PrefixMode mode)
{
string gUIDEXT = Microsoft.Xna.Framework.Input.GamePad.GetGUIDEXT(MInput.GamePads[Input.Gamepad].PlayerIndex);
string ret = orig(mode);
if (gUIDEXT.Equals("7e050603"))
{
return "wii";
}
return ret = orig(mode);
}
}
}