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); } } }
void OpenApp() { Monitor.Log("Opening App"); JoJa84PlusApp.Start(); }