Prechádzať zdrojové kódy

Merge pull request #874 from eightyeight/enable-gamepad-earlier

Enable gamepad input when the startup GUI wakes
Daniel Buckmaster 11 rokov pred
rodič
commit
644225db92

+ 6 - 0
Templates/Empty/game/scripts/gui/startupGui.cs

@@ -45,6 +45,12 @@ function loadStartup()
    //SFXPlayOnce(AudioGui, "art/sound/gui/startup");//SFXPlay(startsnd);
 }
 
+function StartupGui::onWake(%this)
+{
+   $enableDirectInput = "1";
+   activateDirectInput();
+}
+
 function StartupGui::click(%this)
 {
    %this.done = true;

+ 6 - 0
Templates/Full/game/scripts/gui/startupGui.cs

@@ -45,6 +45,12 @@ function loadStartup()
    //SFXPlayOnce(AudioGui, "art/sound/gui/startup");//SFXPlay(startsnd);
 }
 
+function StartupGui::onWake(%this)
+{
+   $enableDirectInput = "1";
+   activateDirectInput();
+}
+
 function StartupGui::click(%this)
 {
    %this.done = true;