protected override bool InitExtra() { this.mUIManager = ScriptCoreManager.UIManager; this.mLocalizer = ScriptCoreManager.LocalizedStringService; ScriptCore.VisualEffect.OnEffectFinishedEventHandler += new EventHandler(OnEffectFinished); this.Scene.MainCamera.LookAt(ref this.mCameraEye, ref this.mCameraUp, ref this.mCameraTarget); return(true); }
/// <summary> /// Localizes the labels of the controls /// using the game engine's localization service. /// </summary> public void Localize() { ScriptCore.LocalizedStringService gStringTable = ScriptCoreManager.LocalizedStringService; if (gStringTable != null) { string local = gStringTable.GetLocalizedString(kVideoSoundCapture); if (!string.IsNullOrEmpty(local)) { soundCaptureCHK.Text = local; } local = gStringTable.GetLocalizedString(kHideUITitleText); if (!string.IsNullOrEmpty(local)) { hideUiCHK.Text = local; } local = gStringTable.GetLocalizedString(kRecordingTimeText); if (!string.IsNullOrEmpty(local)) { maxRecordTimeGRP.Text = local; } local = gStringTable.GetLocalizedString(kRecordingTimeUnitText); if (!string.IsNullOrEmpty(local)) { secondsLBL.Text = local; } local = gStringTable.GetLocalizedString(kFrameSizeText); if (!string.IsNullOrEmpty(local)) { frameSizeGRP.Text = local; } for (int i = 0; i < 3; i++) { local = gStringTable.GetLocalizedString(kFrameSizeKeys[i]); if (!string.IsNullOrEmpty(local)) { this.mFrameSizeRads[i].Text = local; } } local = gStringTable.GetLocalizedString(kQualityText); if (!string.IsNullOrEmpty(local)) { qualityGRP.Text = local; } for (int j = 0; j < 4; j++) { local = gStringTable.GetLocalizedString(kQualityKeys[j]); if (!string.IsNullOrEmpty(local)) { this.mQualityRads[j].Text = local; } } } }
/// <summary> /// Initializes the music data by reading it from the MusicEntries XML resources in UI.package. /// Copied from <see cref="M:Sims3.UI.OptionsDialog.SetupMusicControls()"/>. /// </summary> public static void Intialize() { gUIMgr = ChaosTools.Sims3Engine.ScriptCoreManager.UIManager; gLocalizer = ChaosTools.Sims3Engine.ScriptCoreManager.LocalizedStringService; LoadXmlData("MusicEntries"); List <string> list = new List <string>(); foreach (uint num in Enum.GetValues(typeof(ProductVersion))) { //if (GameUtils.IsInstalled((ProductVersion)num)) { string name = Enum.GetName(typeof(ProductVersion), num); string item = "MusicEntries" + name; list.Add(item); } } for (int i = list.Count - 1; i >= 0; i--) { LoadXmlData(list[i]); } LoadCustomSongData(); }