Exemple #1
0
 private void OnGameLaunched(object sender, GameLaunchedEventArgs e)
 {
     if (Config.EnableMobileApp)
     {
         api = Helper.ModRegistry.GetApi <IMobilePhoneApi>("aedenthorn.MobilePhone");
         if (api != null)
         {
             Texture2D appIcon;
             bool      success;
             appIcon = Helper.Content.Load <Texture2D>(Path.Combine("assets", "app_icon.png"));
             success = api.AddApp(Helper.ModRegistry.ModID, Helper.Translation.Get("app-name"), OpenApp, appIcon);
             Monitor.Log($"loaded app successfully: {success}", LogLevel.Debug);
             JoJa84PlusApp.Initialize(Helper, Monitor, Config, api);
         }
     }
 }
Exemple #2
0
 void OpenApp()
 {
     Monitor.Log("Opening App");
     JoJa84PlusApp.Start();
 }