SSN Support Forums/Help from the Community/Community Help

Answered

How do we implement a EULA in Direct?

Jason Eley
asked this on December 02, 2010 16:00

Q: We would like to add a EULA to our Launcher that needs to be accepted by the user before they can begin downloading our Patch. We would also like that EULA to be displayed after every Launcher update.


 

Comments latest first

User photo
Jason Eley
Solid State Networks
Ajax_loader_small Answer

A: Adding a mandatory EULA acceptance if fairly easy.

First you will want to create a visual way to present the EULA to your users. This can be done by your creative team in a number of fashions. We typically present it in an IFRAME somewhere in the Skin that it is very obviously and prevents users from interacting with the Skin in any fashion until they have accepted the EULA. This decision is entirely up to your design team.

Below is some pseudo-code to get you started.

Inside a script tag in the global declarations area you can call

SSN.Launcher.setLauncherInitializedCallback(showEULA);

Then create a function called showEULA() that looks like this

function showEULA()
function showEULA() {
if (SSN.Launcher.getSetting('Eula_Accepted') == 'false' || SSN.Launcher.getSetting('Eula_Accepted') == "undefined") {         SSN.defaultStopDownload();    
 showEULAUI(); //you will need to create the javascript function that calls your displays your EULA in the Skin
  } else {    
 SSN.defaultStartDownload();    
 }
}

The way it works is when the Launcher initializes it fires off a callback that checks the settings.xml file for the "EULA_Accepted" value. If that value is false, or doesn't exist, or the settings.xml file doesn't exist, the Launcher displays your EULA UI Solution.

Once the user accepts the EULA, the "EULA_Accepted" setting in the settings.xml file is changed to 'true' (if the settings.xml file didn't previously exist, it is created at that time). defaultStartDownload is then called to start the download.

Now that the EULA_Accepted is stored as true in the settings file, each subsequent time the user opens the Launcher, the EULA will not be displayed.

When a new Patch is released, if you need to display a new EULA, you can simply do a new Launcher release (Launcher releases do not include the settings.xml file).


December 02, 2010 16:04.