spanish support

This commit is contained in:
2023-11-09 18:29:53 -05:00
parent e3b5962ecd
commit 0810b1b4df
10472 changed files with 81407 additions and 17087 deletions
@@ -1,4 +1,5 @@
using System;
using Assets.Scripts;
using Qoo;
using Qoo.Game;
using Qoo.Input;
@@ -138,7 +139,14 @@ public class AdventureMenuWindow : SubTaskBaseWindow
new BaseWindow.UIImage("Confirm", 136, 182, this.wndz + 3, "screen/common/sys_dialog", true, false),
new BaseWindow.UIButton("Confirm_YES", 312, 277, this.wndz + 4, "screen/common/dlog_btn_y", true, false, 1, 2, 0),
new BaseWindow.UIButton("Confirm_NO", 513, 277, this.wndz + 4, "screen/common/dlog_btn_n", true, false, 1, 2, 0),
new BaseWindow.UIText("Confirm_MSG", 480, 230, this.wndz + 4, UnityApp.Instance.isJapanese ? "タイトル画面へ戻りますか?" : "Return to Title Screen", 28, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.TopLeft, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue)
new BaseWindow.UIText("Confirm_MSG", 480, 230, this.wndz + 4,
UnityApp.Instance.locale switch
{
LocaleEnum.English => "Return to Title Screen",
LocaleEnum.Spanish => "Spanish translation exit to menu message",
_ => "タイトル画面へ戻りますか?"
}, 28, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.TopLeft, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue)
};
}
return new BaseWindow.UIComponent[]
@@ -157,7 +165,19 @@ public class AdventureMenuWindow : SubTaskBaseWindow
new BaseWindow.UIImage("Confirm", 136, 182, this.wndz + 3, "screen/common/sys_dialog", true, false),
new BaseWindow.UIButton("Confirm_YES", 312, 277, this.wndz + 4, "screen/common/dlog_btn_y", true, false, 1, 2, 0),
new BaseWindow.UIButton("Confirm_NO", 513, 277, this.wndz + 4, "screen/common/dlog_btn_n", true, false, 1, 2, 0),
new BaseWindow.UIText("Confirm_MSG", 480, UnityApp.Instance.isJapanese ? 230 : 210, this.wndz + 4, UnityApp.Instance.isJapanese ? "回想を停止しますか?" : "Do you want to stop\nreplaying this event", 28, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.TopLeft, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue)
new BaseWindow.UIText("Confirm_MSG", 480,
UnityApp.Instance.locale switch
{
LocaleEnum.English => 210,
LocaleEnum.Spanish => 210,
_ => 230
}, this.wndz + 4,
UnityApp.Instance.locale switch
{
LocaleEnum.English => "Do you want to stop\nreplaying this event",
LocaleEnum.Spanish => "Spanish translation exit event replay message",
_ => "回想を停止しますか?"
}, 28, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.TopLeft, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue)
};
}
@@ -254,15 +274,12 @@ public class AdventureMenuWindow : SubTaskBaseWindow
base.GameObjectShow("CofirmCollision", show);
if (show)
{
if (UnityApp.Instance.isJapanese)
{
this.SetText("Confirm_MSG", (!AdventureMenuWindow.IsNormal) ? "回想を停止しますか?" : "タイトル画面へ戻りますか?");
}
else
{
this.SetText("Confirm_MSG", (!AdventureMenuWindow.IsNormal) ? "Do you want to stop\nreplaying this event" : "Return to Title Screen");
}
this.SetText("Confirm_MSG", (UnityApp.Instance.locale switch
{
LocaleEnum.English => !AdventureMenuWindow.IsNormal ? "Do you want to stop\nreplaying this event" : "Return to Title Screen",
LocaleEnum.Spanish => !AdventureMenuWindow.IsNormal ? "Spanish translation exit event replay message" : "Spanish translation exit to menu message",
_ => !AdventureMenuWindow.IsNormal ? "回想を停止しますか?" : "タイトル画面へ戻りますか?"
}));
}
else
{
+3 -22
View File
@@ -54,16 +54,7 @@ public class CBackLogWnd : UserBaseClass
unityTextSprite.z = 1301;
unityTextSprite.SetColor(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue));
unityTextSprite.SetTextColor(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue));
if (!UnityApp.PlatformApp.isJapanese)
{
UnityEngine.Debug.LogWarning(UnityApp.PlatformApp.preferredFontSize);
unityTextSprite.AddText("♪", UnityApp.PlatformApp.preferredFontSize);
}
else
{
unityTextSprite.AddText("♪", 28);
}
unityTextSprite.AddText("♪", UnityApp.PlatformApp.preferredFontSize);
unityTextSprite.Show = false;
}
this.InitLog();
@@ -389,18 +380,8 @@ public class CBackLogWnd : UserBaseClass
unityTextSprite.SetTextColor(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue));
unityTextSprite2.SetTextColor(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue));
}
if (!UnityApp.PlatformApp.isJapanese)
{
UnityEngine.Debug.LogWarning(UnityApp.PlatformApp.preferredFontSize);
unityTextSprite.AddText(linedata.pszTxt, UnityApp.PlatformApp.preferredFontSize);
unityTextSprite2.AddText("♪", UnityApp.PlatformApp.preferredFontSize);
}
else
{
unityTextSprite.AddText(linedata.pszTxt, 28);
unityTextSprite2.AddText("♪", 28);
}
unityTextSprite.AddText(linedata.pszTxt, UnityApp.PlatformApp.preferredFontSize);
unityTextSprite2.AddText("♪", UnityApp.PlatformApp.preferredFontSize);
if (linedata.nType == CBackLogWnd.LINETYPE.LINETYPE_MES)
{
unityTextSprite.x = 204;
@@ -1,4 +1,5 @@
using Qoo.Def;
using Assets.Scripts;
using Qoo.Def;
using Qoo.Game;
using System.Collections.Generic;
using System.Reflection.Emit;
@@ -178,16 +179,12 @@ public class CMessageText
{
int testWidth = 0;
if (!UnityApp.PlatformApp.isJapanese)
// formatting for non-Japanese languages
if (UnityApp.Instance.locale != LocaleEnum.Japanese)
{
CMessageText.m_isHyphenation = true;
for (int i = 0; i < szMsg.Length; i++)
{
//Force diacritics to closest letter with no accent mark
if (Regex.IsMatch(szMsg[i].ToString(), "[À-ž]"))
{
szMsg = szMsg.Remove(i, 1).Insert(i, szMsg[i].ToString().Normalize(NormalizationForm.FormC).Normalize(NormalizationForm.FormD));
}
//Improved line breaker
@@ -1,4 +1,5 @@
using System;
using Assets.Scripts;
using Qoo.Game;
using UnityEngine;
@@ -119,43 +120,48 @@ public class GalleryInputNameDialogWindow : BaseWindow
switch (this.type)
{
case GalleryInputNameDialogType.EMPTY:
return UnityApp.Instance.isJapanese ? "名前が入力されていません。" : "No name entered";
return UnityApp.Instance.locale switch
{
LocaleEnum.English => "No name entered",
LocaleEnum.Spanish => "Spanish translation for no name error",
_ => "名前が入力されていません"
};
case GalleryInputNameDialogType.OVER:
return UnityApp.Instance.isJapanese ? "入力できる名前は7文字までです。" : "You can enter up to 7 characters";
return UnityApp.Instance.locale switch
{
LocaleEnum.English => "You can enter up to 7 characters",
LocaleEnum.Spanish => "Spanish translation name length message",
_ => "入力できる名前は7文字までです。"
};
case GalleryInputNameDialogType.INVALIDCHAR:
return UnityApp.Instance.isJapanese ? "表示できない文字が含まれています。" : "Input contains characters that cannot be displayed";
return UnityApp.Instance.locale switch
{
LocaleEnum.English => "Input contains characters that cannot be displayed",
LocaleEnum.Spanish => "Spanish translation for contains invalid characters error",
_ => "表示できない文字が含まれています。"
};
case GalleryInputNameDialogType.CONFIRM:
if (UnityApp.Instance.isJapanese)
if (line == 0)
{
if (line == 0)
{
string galleryInputNameDialog_Name = UIValue.GalleryInputNameDialog_Name;
string paramString = GameData.GetParamString("familyname", string.Empty);
return string.Format("{0}{1}」です。", galleryInputNameDialog_Name, paramString);
}
if (line != 1)
{
return string.Empty;
}
return "よろしいですか?";
}
else
string galleryInputNameDialog_Name = UIValue.GalleryInputNameDialog_Name;
string paramString = GameData.GetParamString("familyname", string.Empty);
return string.Format(UnityApp.Instance.locale switch
{
LocaleEnum.English => "{0} {1}",
LocaleEnum.Spanish => "{0} {1}",
_ => "「{0}{1}」です。"
}, galleryInputNameDialog_Name, paramString);
}
if (line != 1)
{
if (line == 0)
{
string galleryInputNameDialog_Name = UIValue.GalleryInputNameDialog_Name;
string galleryInputNameDialog_LastName = UIValue.GalleryInputNameDialog_LastName;
//string paramString = GameData.GetParamString("familyname", string.Empty);
return string.Format("Is {0} {1} correct?", galleryInputNameDialog_Name, galleryInputNameDialog_LastName);
}
if (line != 1)
{
return string.Empty;
}
return string.Empty;
}
return string.Empty;
}
return UnityApp.Instance.locale switch
{
LocaleEnum.English => "Is this Correct?",
LocaleEnum.Spanish => "Spanish translation name confirmation message",
_ => "よろしいですか?"
};
default:
return string.Empty;
}
@@ -32,15 +32,17 @@ namespace Game
msgwnd_STYLE_DATA.posFrm = new Point3(0, 181, 800);
msgwnd_STYLE_DATA.posName[0] = new Point3(86, 170, 803);
msgwnd_STYLE_DATA.posName[1] = new Point3(126, 170, 802);
if (!UnityApp.PlatformApp.isJapanese)
switch (UnityApp.Instance.locale)
{
msgwnd_STYLE_DATA.posTxt = new Point3(104, 198, 801);
msgwnd_STYLE_DATA.sizeTxt = new Size(704, 136);
}
else
{
msgwnd_STYLE_DATA.posTxt = new Point3(109, 198, 801);
msgwnd_STYLE_DATA.sizeTxt = new Size(654, 136);
case Assets.Scripts.LocaleEnum.English:
case Assets.Scripts.LocaleEnum.Spanish:
msgwnd_STYLE_DATA.posTxt = new Point3(104, 198, 801);
msgwnd_STYLE_DATA.sizeTxt = new Size(704, 136);
break;
default:
msgwnd_STYLE_DATA.posTxt = new Point3(109, 198, 801);
msgwnd_STYLE_DATA.sizeTxt = new Size(654, 136);
break;
}
msgwnd_STYLE_DATA.posFace = new Point3(0, 173, 803);
msgwnd_STYLE_DATA.posBrk = new Point3(459, 252, 802);
@@ -1,6 +1,7 @@
using System;
using System.Collections;
using UnityEngine;
using UnityEngine.Localization;
// Token: 0x020000DD RID: 221
public class NameInputKeyboard : MonoBehaviour
@@ -80,15 +81,20 @@ public class NameInputKeyboard : MonoBehaviour
}
if (ScreenKeyboardManager.IsCancel)
{
if (UnityApp.Instance.isJapanese)
switch (UnityApp.Instance.locale)
{
NameInputKeyboard.Instance.m_inputText = "アリス";
NameInputKeyboard.Instance.m_inputTextLastName = "リデル";
}
else
{
NameInputKeyboard.Instance.m_inputText = "Alice";
NameInputKeyboard.Instance.m_inputTextLastName = "Liddell";
case Assets.Scripts.LocaleEnum.English:
NameInputKeyboard.Instance.m_inputText = "Alice";
NameInputKeyboard.Instance.m_inputTextLastName = "Liddell";
break;
case Assets.Scripts.LocaleEnum.Spanish:
NameInputKeyboard.Instance.m_inputText = "Alice";
NameInputKeyboard.Instance.m_inputTextLastName = "Liddell";
break;
default:
NameInputKeyboard.Instance.m_inputText = "アリス";
NameInputKeyboard.Instance.m_inputTextLastName = "リデル";
break;
}
}
+11 -3
View File
@@ -10,10 +10,18 @@ public static class Pathing
get
{
string locale = "/JP/";
if (!UnityApp.Instance.isJapanese)
switch (UnityApp.Instance.locale)
{
locale = "/EN/";
}
case Assets.Scripts.LocaleEnum.English:
locale = "/EN/";
break;
case Assets.Scripts.LocaleEnum.Spanish:
locale = "/SP/";
break;
default:
locale = "/JP/";
break;
}
return Application.streamingAssetsPath + locale;
}
}
@@ -1,4 +1,5 @@
using System;
using Assets.Scripts;
using Qoo.Game;
namespace Qoo.Def
@@ -90,8 +91,20 @@ namespace Qoo.Def
// Token: 0x040004FE RID: 1278
private static readonly GameDef.GAME_PARAM_TABLE[] g_GameParamTable = new GameDef.GAME_PARAM_TABLE[]
{
UnityApp.Instance.isJapanese? new GameDef.GAME_PARAM_TABLE("firstname", "アリス", false) : new GameDef.GAME_PARAM_TABLE("firstname", "Alice", false),
UnityApp.Instance.isJapanese? new GameDef.GAME_PARAM_TABLE("familyname", "リデル", false) : new GameDef.GAME_PARAM_TABLE("familyname", "Liddell", false),
new GameDef.GAME_PARAM_TABLE("firstname", UnityApp.Instance.locale switch
{
LocaleEnum.English => "Alice",
LocaleEnum.Spanish => "Alice",
_ => "アリス"
}, false),
new GameDef.GAME_PARAM_TABLE("familyname", UnityApp.Instance.locale switch
{
LocaleEnum.English => "Liddell",
LocaleEnum.Spanish => "Liddell",
_ => "リデル"
}, false),
new GameDef.GAME_PARAM_TABLE("scene", string.Empty, false),
new GameDef.GAME_PARAM_TABLE("memory", string.Empty, false),
new GameDef.GAME_PARAM_TABLE("map_bg", string.Empty, false),
@@ -7,12 +7,24 @@ namespace Qoo.Def
{
void Awake()
{
if (!UnityApp.Instance.isJapanese)
{
MSG_SAVE_CONFIRM = "Do you want to save?";
MSG_OVER_CONFIRM = "Do you want to overwrite this save";
MSG_LOAD_CONFIRM = "Do you want to load this save";
}
switch (UnityApp.Instance.locale)
{
case Assets.Scripts.LocaleEnum.English:
MSG_SAVE_CONFIRM = "Do you want to save?";
MSG_LOAD_CONFIRM = "Do you want to load this save?";
MSG_OVER_CONFIRM = "Do you want to overwrite this Save?";
break;
case Assets.Scripts.LocaleEnum.Spanish:
MSG_SAVE_CONFIRM = "Spanish translation save message";
MSG_LOAD_CONFIRM = "Spanish translation load message";
MSG_OVER_CONFIRM = "Spanish translation overwrite confirm message";
break;
default:
MSG_SAVE_CONFIRM = "セーブしますか?";
MSG_LOAD_CONFIRM = "ロードしますか?";
MSG_OVER_CONFIRM = "上書きしますか";
break;
}
}
// Token: 0x04000565 RID: 1381
@@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Assets.Scripts;
using Game;
using Qoo.Input;
using Qoo.Wnd;
@@ -82,15 +83,20 @@ namespace Qoo.Game
UnityEngine.Debug.LogWarning("first");
KsExec.confirm = false;
KsExec.confirmResult = false;
if (UnityApp.Instance.isJapanese)
{
KsExec.editName = "アリス";
KsExec.editLastName = "リデル";
}
else
switch (UnityApp.Instance.locale)
{
KsExec.editName = "Alice";
KsExec.editLastName = "Liddell";
case Assets.Scripts.LocaleEnum.English:
KsExec.editName = "Alice";
KsExec.editLastName = "Liddell";
break;
case Assets.Scripts.LocaleEnum.Spanish:
KsExec.editName = "Alice";
KsExec.editLastName = "Liddell";
break;
default:
KsExec.editName = "アリス";
KsExec.editLastName = "リデル";
break;
}
NameInputKeyboard.DebugInputText = KsExec.editName;
NameInputKeyboard.DebugInputTextLastName = KsExec.editLastName;
@@ -151,7 +157,24 @@ namespace Qoo.Game
}*/
if (UnityApp.Instance.isJapanese)
msgs = new string[]
{
string.Format(
UnityApp.Instance.locale switch
{
LocaleEnum.English => "{0} {1}",
LocaleEnum.Spanish => "{0} {1}",
_ => "「{0}{1}」です。"
}, arg, arg2),
UnityApp.Instance.locale switch
{
LocaleEnum.English => "Is this Correct?",
LocaleEnum.Spanish => "Spanish translation name confirmation message",
_ => "よろしいですか?"
}
};
/*if (UnityApp.Instance.isJapanese)
{
msgs = new string[]
{
@@ -165,8 +188,8 @@ namespace Qoo.Game
{
string.Format("Is {0} {1} correct?", arg, arg2)
};
}
}*/
UnityTask.SetSubNoUnityTask(MessageDlg.ExecDlg(msgs, new Action<bool>(KsExec.SetResult)));
KsExec.confirm = true;
KsExec.confirmResult = false;
@@ -60,7 +60,20 @@ public class SaveLoadManager
{
string text = SaveLoadManager.SAVEDATA_NAME + index.ToString();
byte[] array = null;
for (int i = 0; i < SaveLoadManager.SAVE_RETRY_CNT; i++)
string saveFailureMsg = "ゲームデータの保存を正常に終了できませんでした。";
switch (UnityApp.Instance.locale)
{
case Assets.Scripts.LocaleEnum.English:
saveFailureMsg = "The game data could not be saved";
break;
case Assets.Scripts.LocaleEnum.Spanish:
saveFailureMsg = "Spanish translation save failure message?";
break;
}
for (int i = 0; i < SaveLoadManager.SAVE_RETRY_CNT; i++)
{
try
{
@@ -77,28 +90,28 @@ public class SaveLoadManager
catch (Exception ex2)
{
Qoo.Debug.Print(ex2.Message);
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.FAIL_SAVE_CATCH_EXCEPTION, UnityApp.Instance.isJapanese ? "ゲームデータの保存を正常に終了できませんでした。" : "The game data could not be saved");
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.FAIL_SAVE_CATCH_EXCEPTION, saveFailureMsg);
break;
}
}
if (array == null)
{
Qoo.Debug.Print("####Save file create error");
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.FAIL_SAVE_DATA_CREATE, UnityApp.Instance.isJapanese ? "ゲームデータの保存を正常に終了できませんでした。" : "The game data could not be saved");
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.FAIL_SAVE_DATA_CREATE, saveFailureMsg);
return false;
}
string text2 = BytesHash.CreateHashCode(array);
if (text2 == null)
{
Qoo.Debug.Print("####hash = null death");
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.FAIL_SAVE_HASHCODE_CREATE, UnityApp.Instance.isJapanese ? "ゲームデータの保存を正常に終了できませんでした。" : "The game data could not be saved");
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.FAIL_SAVE_HASHCODE_CREATE, saveFailureMsg);
return false;
}
info.HashCode = text2;
if (SaveLoadManager.SaveToXML<SaveFileInfo>("H_" + text + "_TMP", info, Encoding.UTF8, false) == null)
{
Qoo.Debug.Print("header file save error");
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.FAIL_SAVE_HEADER_CREATE, UnityApp.Instance.isJapanese ? "ゲームデータの保存を正常に終了できませんでした。" : "The game data could not be saved");
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.FAIL_SAVE_HEADER_CREATE, saveFailureMsg);
return false;
}
try
@@ -117,7 +130,7 @@ public class SaveLoadManager
catch (Exception ex3)
{
Qoo.Debug.Print(ex3.Message);
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.FAIL_SAVE_RENAME, "ゲームデータの保存を正常に終了できませんでした。");
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.FAIL_SAVE_RENAME, saveFailureMsg);
}
return true;
}
@@ -157,7 +170,20 @@ public class SaveLoadManager
public static byte[] Load(int index)
{
string text = SaveLoadManager.SAVEDATA_NAME + index.ToString();
if (!File.Exists(SaveLoadManager.SAVEDIR + "/" + text))
string loadFailureMsg = "ゲームデータの読込を正常に終了できませんでした。";
switch (UnityApp.Instance.locale)
{
case Assets.Scripts.LocaleEnum.English:
loadFailureMsg = "The game data could not be loaded";
break;
case Assets.Scripts.LocaleEnum.Spanish:
loadFailureMsg = "Spanish translation load failure message?";
break;
}
if (!File.Exists(SaveLoadManager.SAVEDIR + "/" + text))
{
return null;
}
@@ -180,20 +206,20 @@ public class SaveLoadManager
catch (Exception ex2)
{
Qoo.Debug.Print(ex2.Message);
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.FAIL_LOAD_CATCH_EXCEPTION, UnityApp.Instance.isJapanese ? "ゲームデータの読込を正常に終了できませんでした。" : "The game data could not be loaded");
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.FAIL_LOAD_CATCH_EXCEPTION, loadFailureMsg);
break;
}
}
if (array == null)
{
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.FAIL_LOAD, UnityApp.Instance.isJapanese ? "ゲームデータの読込を正常に終了できませんでした。" : "The game data could not be loaded");
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.FAIL_LOAD, loadFailureMsg);
return null;
}
string hashCode = BytesHash.CreateHashCode(array);
if (!saveFileInfo.CheckHash(hashCode))
{
Qoo.Debug.Print("hash ga tigau yo");
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.UNMATCH_SAVE_HASH, UnityApp.Instance.isJapanese ? "ゲームデータの読込を正常に終了できませんでした。" : "The game data could not be loaded");
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.UNMATCH_SAVE_HASH, loadFailureMsg);
return null;
}
return array;
@@ -86,18 +86,37 @@ public class SaveLoadWindow : BaseWindow
base.GameObjectShow("Confirm_YES", show);
base.GameObjectShow("Confirm_NO", show);
base.GameObjectShow("CofirmCollision", show);
if (show)
string saveConfirmMsg = "セーブしますか?";
string loadConfirmMsg = "ロードしますか?";
string overConfirmMsg = "上書きしますか?";
switch (UnityApp.Instance.locale)
{
case Assets.Scripts.LocaleEnum.English:
saveConfirmMsg = "Do you want to save?";
loadConfirmMsg = "Do you want to load this save?";
overConfirmMsg = "Do you want to overwrite this Save?";
break;
case Assets.Scripts.LocaleEnum.Spanish:
saveConfirmMsg = "Spanish translation save message";
loadConfirmMsg = "Spanish translation load message";
overConfirmMsg = "Spanish translation overwrite confirm message";
break;
}
if (show)
{
switch (ct)
{
case SaveLoadWindow.ConfrmType.Save:
this.SetText("SaveConfirmMsg", (!show) ? string.Empty : UnityApp.Instance.isJapanese ? "セーブしますか?" : "Do you want to save?");
this.SetText("SaveConfirmMsg", (!show) ? string.Empty : saveConfirmMsg);
break;
case SaveLoadWindow.ConfrmType.Load:
this.SetText("LoadConfirmMsg", (!show) ? string.Empty : UnityApp.Instance.isJapanese ? "ロードしますか?" : "Do you want to load this save?");
this.SetText("LoadConfirmMsg", (!show) ? string.Empty : loadConfirmMsg);
break;
case SaveLoadWindow.ConfrmType.Over:
this.SetText("OverConfirmMsg", (!show) ? string.Empty : UnityApp.Instance.isJapanese ? "上書きしますか?" : "Do you want to overwrite this Save?");
this.SetText("OverConfirmMsg", (!show) ? string.Empty : overConfirmMsg);
break;
}
}
@@ -305,7 +324,27 @@ public class SaveLoadWindow : BaseWindow
string[] saveDataIcons = this.GetSaveDataIcons();
int num = 188;
int num2 = 131;
return new BaseWindow.UIComponent[]
string saveConfirmMsg = "セーブしますか?";
string loadConfirmMsg = "ロードしますか?";
string overConfirmMsg = "上書きしますか?";
switch (UnityApp.Instance.locale)
{
case Assets.Scripts.LocaleEnum.English:
saveConfirmMsg = "Do you want to save?";
loadConfirmMsg = "Do you want to load this save?";
overConfirmMsg = "Do you want to overwrite this Save?";
break;
case Assets.Scripts.LocaleEnum.Spanish:
saveConfirmMsg = "Spanish translation save message";
loadConfirmMsg = "Spanish translation load message";
overConfirmMsg = "Spanish translation overwrite confirm message";
break;
}
return new BaseWindow.UIComponent[]
{
new BaseWindow.UIImage("BackGround", 0, 0, this.wndz, "screen/cgmemory2/cgm_bg_1", true, true),
new BaseWindow.UIImage("Banner", 0, 0, this.wndz + 1, "screen/sysmenu/sys_bnr_" + str, true, true),
@@ -329,9 +368,9 @@ public class SaveLoadWindow : BaseWindow
new BaseWindow.UIImage("Confirm", 136, 182, this.wndz + 3, "screen/common/sys_dialog", true, false),
new BaseWindow.UIButton("Confirm_YES", 312, 277, this.wndz + 4, "screen/common/dlog_btn_y", true, false, 1, 2, 0),
new BaseWindow.UIButton("Confirm_NO", 513, 277, this.wndz + 4, "screen/common/dlog_btn_n", true, false, 1, 2, 0),
new BaseWindow.UIText("SaveConfirmMsg", 480, 230, this.wndz + 4, UnityApp.Instance.isJapanese ? "セーブしますか?" : "Do you want to save?", 28, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.TopLeft, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
new BaseWindow.UIText("LoadConfirmMsg", 480, 230, this.wndz + 4, UnityApp.Instance.isJapanese ? "ロードしますか?" : "Do you want to load this save?", 28, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.TopLeft, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
new BaseWindow.UIText("OverConfirmMsg", 480, 230, this.wndz + 4, UnityApp.Instance.isJapanese ? "上書きしますか?" : "Do you want to overwrite this Save?", 28, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.TopLeft, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue)
new BaseWindow.UIText("SaveConfirmMsg", 480, 230, this.wndz + 4, saveConfirmMsg, 28, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.TopLeft, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
new BaseWindow.UIText("LoadConfirmMsg", 480, 230, this.wndz + 4, loadConfirmMsg, 28, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.TopLeft, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
new BaseWindow.UIText("OverConfirmMsg", 480, 230, this.wndz + 4, overConfirmMsg, 28, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.TopLeft, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue)
};
}
@@ -117,6 +117,8 @@ public class ScreenResWindow : BaseWindow
new BaseWindow.UIText("JPOption", column2Text, column2TextHeight += (columnHeightIncrement * 2), this.wndz + 4, "日本語", 30, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.Center, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
new BaseWindow.UIButton("EN", column2Button, column2ButtonHeight += columnHeightIncrement, this.wndz + 3, "screen/title/buy02", true, true, 1, 2, 0),
new BaseWindow.UIText("ENOption", column2Text, column2TextHeight += columnHeightIncrement, this.wndz + 4, "English", 30, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.Center, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
new BaseWindow.UIButton("SP", column2Button, column2ButtonHeight += columnHeightIncrement, this.wndz + 3, "screen/title/buy02", true, true, 1, 2, 0),
new BaseWindow.UIText("SPOption", column2Text, column2TextHeight += columnHeightIncrement, this.wndz + 4, "Español", 30, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.Center, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
//new BaseWindow.UIImage("ArrowL", 33, 80, this.wndz + 3, "screen/cgmemory/cgm_arwl", false, true),
//new BaseWindow.UIImage("ArrowR", 848, 80, this.wndz + 3, "screen/cgmemory/cgm_arwr", false, true)
@@ -179,8 +181,12 @@ public class ScreenResWindow : BaseWindow
{
"EN",
11
}
};
},
{
"SP",
12
}
};
}
int num;
if (this.dict.TryGetValue(obj, out num))
@@ -243,17 +249,20 @@ public class ScreenResWindow : BaseWindow
}
else if (num == 10)
{
UnityEngine.PlayerPrefs.SetInt("language", 0);
//UnityApp.Instance.isJapanese = true;
UnityEngine.PlayerPrefs.SetInt("language", (int)Assets.Scripts.LocaleEnum.Japanese);
RebootGame();
}
else if (num == 11)
{
UnityEngine.PlayerPrefs.SetInt("language", 1);
//UnityApp.Instance.isJapanese = false;
UnityEngine.PlayerPrefs.SetInt("language", (int)Assets.Scripts.LocaleEnum.English);
RebootGame();
}
}
else if (num == 12)
{
UnityEngine.PlayerPrefs.SetInt("language", (int)Assets.Scripts.LocaleEnum.Spanish);
RebootGame();
}
}
}
}
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using Assets.Scripts;
using Qoo.Application;
using Qoo.Game;
using UnityEngine;
@@ -70,9 +71,8 @@ public class TitleWindow : BaseWindow
new BaseWindow.UICollision("BtnGuard", 0, 0, this.wndz + 3, 960, 544),
new BaseWindow.UIButton("BtnScreenRes", 16, 472, this.wndz + 1, "screen/title/restore", !base.IsTrial, !base.IsTrial, 1, 2, 0)
};
if (!UnityApp.Instance.isJapanese)
if (UnityApp.Instance.locale != LocaleEnum.Japanese)
{
components.Add(new BaseWindow.UIButton("BtnCredits", 16, 402, this.wndz + 1, "screen/title/restore", !base.IsTrial, !base.IsTrial, 1, 2, 0));
}
return components.ToArray();
+18 -8
View File
@@ -1,5 +1,6 @@
using System;
using System.Collections;
using Assets.Scripts;
using Qoo;
using Qoo.Application;
using Qoo.File;
@@ -23,14 +24,21 @@ public class UnityApp : Singleton<UnityApp>
private void Start()
{
int language = PlayerPrefs.GetInt("language");
if (language == 0)
switch (language)
{
isJapanese = true;
}
else
{
isJapanese = false;
}
case 0:
this.locale = LocaleEnum.Japanese;
break;
case 1:
this.locale = LocaleEnum.English;
break;
case 2:
this.locale = LocaleEnum.Spanish;
break;
default:
this.locale = LocaleEnum.Japanese;
break;
}
//UnityEngine.Object.DontDestroyOnLoad(this);
Application.targetFrameRate = 60;
this.preferredFontSize = 28;
@@ -319,7 +327,9 @@ public class UnityApp : Singleton<UnityApp>
// Token: 0x04000774 RID: 1908
private bool m_isInit;
internal bool isJapanese;
//internal bool isJapanese;
internal LocaleEnum locale = LocaleEnum.Japanese;
public int preferredFontSize = 28;
}