added support for android and linux
This commit is contained in:
@@ -145,8 +145,9 @@ public class GalleryInputNameDialogWindow : BaseWindow
|
||||
if (line == 0)
|
||||
{
|
||||
string galleryInputNameDialog_Name = UIValue.GalleryInputNameDialog_Name;
|
||||
string paramString = GameData.GetParamString("familyname", string.Empty);
|
||||
return string.Format("Is {0} {1} correct?", galleryInputNameDialog_Name, paramString);
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Qoo.Game;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -15,7 +16,8 @@ public class GalleryInputNameKeyboardWindow : BaseWindow
|
||||
public IEnumerator Run()
|
||||
{
|
||||
string initvalue = UIValue.GalleryInputNameDialog_Name;
|
||||
yield return NameInputKeyboard.Open(initvalue, false);
|
||||
string initvalue2 = UIValue.GalleryInputNameDialog_LastName;
|
||||
yield return NameInputKeyboard.Open(initvalue, initvalue2, false);
|
||||
/*switch (Application.platform)
|
||||
{
|
||||
case RuntimePlatform.IPhonePlayer:
|
||||
@@ -26,7 +28,8 @@ public class GalleryInputNameKeyboardWindow : BaseWindow
|
||||
//NameInputKeyboard.DebugInputText = initvalue;
|
||||
IL_82:
|
||||
UIValue.GalleryInputNameDialog_Name = NameInputKeyboard.InputText;
|
||||
UIValue.GalleryInputNameDialog_Exit = GalleryInputNameDialogExitType.INPUT;
|
||||
UIValue.GalleryInputNameDialog_LastName = NameInputKeyboard.InputTextLastName;
|
||||
UIValue.GalleryInputNameDialog_Exit = GalleryInputNameDialogExitType.INPUT;
|
||||
base.DeleteLastAddScene();
|
||||
NameInputKeyboard.Close();
|
||||
yield break;
|
||||
|
||||
@@ -12,7 +12,8 @@ public class GalleryInputNameWindow : BaseWindow
|
||||
{
|
||||
UIValue.GalleryInputNameDialog_Exit = GalleryInputNameDialogExitType.INVALID;
|
||||
UIValue.GalleryInputNameDialog_Name = GameData.GetParamString("firstname", string.Empty);
|
||||
this.edit = true;
|
||||
UIValue.GalleryInputNameDialog_LastName = GameData.GetParamString("familyname", string.Empty);
|
||||
this.edit = true;
|
||||
this.wait = 0f;
|
||||
}
|
||||
|
||||
@@ -79,16 +80,17 @@ public class GalleryInputNameWindow : BaseWindow
|
||||
case GalleryInputNameDialogExitType.INPUT:
|
||||
{
|
||||
UIValue.GalleryInputNameDialog_Exit = GalleryInputNameDialogExitType.INVALID;
|
||||
string galleryInputNameDialog_Name = UIValue.GalleryInputNameDialog_Name;
|
||||
if (galleryInputNameDialog_Name.Length == 0 || this.checkSpaceOnly(galleryInputNameDialog_Name))
|
||||
string galleryInputNameDialog_Name = UIValue.GalleryInputNameDialog_Name;
|
||||
string galleryInputNameDialog_LastName = UIValue.GalleryInputNameDialog_LastName;
|
||||
if (galleryInputNameDialog_Name.Length == 0 || this.checkSpaceOnly(galleryInputNameDialog_Name) || galleryInputNameDialog_LastName.Length == 0 || this.checkSpaceOnly(galleryInputNameDialog_LastName))
|
||||
{
|
||||
UIValue.GalleryInputNameDialog_Type = GalleryInputNameDialogType.EMPTY;
|
||||
}
|
||||
else if (galleryInputNameDialog_Name.Length > 7)
|
||||
else if (galleryInputNameDialog_Name.Length > 7 || galleryInputNameDialog_LastName.Length > 7)
|
||||
{
|
||||
UIValue.GalleryInputNameDialog_Type = GalleryInputNameDialogType.OVER;
|
||||
}
|
||||
else if (!this.checkValidString(galleryInputNameDialog_Name))
|
||||
else if (!this.checkValidString(galleryInputNameDialog_Name) || !this.checkValidString(galleryInputNameDialog_LastName))
|
||||
{
|
||||
UIValue.GalleryInputNameDialog_Type = GalleryInputNameDialogType.INVALIDCHAR;
|
||||
}
|
||||
@@ -102,6 +104,7 @@ public class GalleryInputNameWindow : BaseWindow
|
||||
case GalleryInputNameDialogExitType.YES:
|
||||
UIValue.GalleryInputNameDialog_Exit = GalleryInputNameDialogExitType.INVALID;
|
||||
GameData.SetParamString("firstname", string.Empty, UIValue.GalleryInputNameDialog_Name);
|
||||
GameData.SetParamString("familyname", string.Empty, UIValue.GalleryInputNameDialog_LastName);
|
||||
SceneManager.BackScene();
|
||||
break;
|
||||
case GalleryInputNameDialogExitType.NO:
|
||||
|
||||
@@ -40,7 +40,7 @@ public class GalleryMovieWindow : BaseWindow
|
||||
{
|
||||
//TODO fix movie playing. either make platform specific versions OR make platform agnostic
|
||||
//yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/high/op_movie.mp4", FullScreenMovieControlMode.CancelOnInput));
|
||||
yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/high/op_movie.mp4", this.gameObject));
|
||||
yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/high/op_movie.webm", this.gameObject));
|
||||
this.state = GalleryMovieWindow.STATE.END;
|
||||
yield break;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ public class LogoMovieWindow : BaseWindow
|
||||
{
|
||||
//TODO fix movie playing. either make platform specific versions OR make platform agnostic
|
||||
//yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/normal/quinrose_logo_8.mp4", FullScreenMovieControlMode.CancelOnInput));
|
||||
yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/normal/quinrose_logo_8.mp4", this.gameObject));
|
||||
yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/normal/quinrose_logo_8.webm", this.gameObject));
|
||||
this.state = LogoMovieWindow.STATE.END;
|
||||
yield break;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
public class MovieDef
|
||||
{
|
||||
// Token: 0x04000550 RID: 1360
|
||||
public const string MOVIE_EXT = ".mp4";
|
||||
public const string MOVIE_EXT = ".webm";
|
||||
|
||||
// Token: 0x04000551 RID: 1361
|
||||
public const string EFFECT_MOVIE_EXT = ".ogv";
|
||||
|
||||
@@ -42,7 +42,7 @@ public static class MovieManager
|
||||
VideoPlayer m_tex = movieFrame.obj.transform.gameObject.AddComponent<VideoPlayer>();
|
||||
m_tex.playOnAwake = true;
|
||||
Material newMat = new Material(Shader.Find("QO/Sprite") as Shader);
|
||||
m_tex.url = Application.streamingAssetsPath + "/" + path + ".mp4";
|
||||
m_tex.url = Application.streamingAssetsPath + "/" + path + ".webm";
|
||||
m_tex.isLooping = false;
|
||||
movieFrame.SetMaterial(newMat, 960, 544);
|
||||
m_tex.renderMode = UnityEngine.Video.VideoRenderMode.MaterialOverride;
|
||||
|
||||
@@ -46,7 +46,7 @@ public class MovieTex : MonoBehaviour
|
||||
/*this.m_tex.url = "file:///" + Application.streamingAssetsPath + "/" + path;
|
||||
this.m_tex.isLooping = isLoop;*/
|
||||
//this.m_tex.m_path = path + ".mp4";
|
||||
this.m_tex.url = "file:///" + Application.streamingAssetsPath + "/" + path + ".mp4";
|
||||
this.m_tex.url = "file:///" + Application.streamingAssetsPath + "/" + path + ".webm";
|
||||
this.m_tex.isLooping = isLoop;
|
||||
this.m_tex.renderMode = UnityEngine.Video.VideoRenderMode.MaterialOverride;
|
||||
//this.m_tex.targetMaterialRenderer = newMat;
|
||||
|
||||
@@ -20,7 +20,8 @@ public class NameInputKeyboard : MonoBehaviour
|
||||
}
|
||||
NameInputKeyboard.m_instance = gameObject.AddComponent<NameInputKeyboard>();
|
||||
NameInputKeyboard.m_instance.m_inputText = string.Empty;
|
||||
}
|
||||
NameInputKeyboard.m_instance.m_inputTextLastName = string.Empty;
|
||||
}
|
||||
return NameInputKeyboard.m_instance;
|
||||
}
|
||||
}
|
||||
@@ -45,33 +46,57 @@ public class NameInputKeyboard : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600060E RID: 1550 RVA: 0x00019310 File Offset: 0x00017510
|
||||
public static IEnumerator Open(string defaultString = "", bool isUnitySubTask = false)
|
||||
// Token: 0x170000D4 RID: 212
|
||||
// (get) Token: 0x0600060C RID: 1548 RVA: 0x000192F4 File Offset: 0x000174F4
|
||||
public static string InputTextLastName
|
||||
{
|
||||
get
|
||||
{
|
||||
return NameInputKeyboard.Instance.m_inputTextLastName;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000D5 RID: 213
|
||||
// (set) Token: 0x0600060D RID: 1549 RVA: 0x00019300 File Offset: 0x00017500
|
||||
public static string DebugInputTextLastName
|
||||
{
|
||||
set
|
||||
{
|
||||
NameInputKeyboard.Instance.m_inputTextLastName = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600060E RID: 1550 RVA: 0x00019310 File Offset: 0x00017510
|
||||
public static IEnumerator Open(string defaultString = "", string defaultString2 = "", bool isUnitySubTask = false)
|
||||
{
|
||||
if (isUnitySubTask)
|
||||
{
|
||||
yield return NameInputKeyboard.Instance.StartCoroutine(ScreenKeyboardManager.Open(defaultString));
|
||||
//Debug.LogWarning("Name" + defaultString + " = " + defaultString2);
|
||||
yield return NameInputKeyboard.Instance.StartCoroutine(ScreenKeyboardManager.Open(defaultString, defaultString2));
|
||||
}
|
||||
else
|
||||
{
|
||||
yield return ScreenKeyboardManager.Open(defaultString);
|
||||
yield return ScreenKeyboardManager.Open(defaultString, defaultString2);
|
||||
}
|
||||
if (ScreenKeyboardManager.IsCancel)
|
||||
{
|
||||
if (UnityApp.Instance.isJapanese)
|
||||
{
|
||||
NameInputKeyboard.Instance.m_inputText = "アリス";
|
||||
}
|
||||
NameInputKeyboard.Instance.m_inputTextLastName = "リデル";
|
||||
}
|
||||
else
|
||||
{
|
||||
NameInputKeyboard.Instance.m_inputText = "Alice";
|
||||
}
|
||||
NameInputKeyboard.Instance.m_inputTextLastName = "Liddell";
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
NameInputKeyboard.Instance.m_inputText = ScreenKeyboardManager.InputText;
|
||||
}
|
||||
NameInputKeyboard.Instance.m_inputTextLastName = ScreenKeyboardManager.InputTextLastName;
|
||||
}
|
||||
yield break;
|
||||
}
|
||||
|
||||
@@ -90,4 +115,6 @@ public class NameInputKeyboard : MonoBehaviour
|
||||
|
||||
// Token: 0x040005A8 RID: 1448
|
||||
private string m_inputText;
|
||||
|
||||
private string m_inputTextLastName;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,17 @@ public static class Pathing
|
||||
get
|
||||
{
|
||||
string path = Application.streamingAssetsPath.TrimStart('/');
|
||||
return "file://localhost/" + path;
|
||||
if(Application.platform == RuntimePlatform.Android)
|
||||
{
|
||||
string url = path;
|
||||
//UnityEngine.Debug.LogWarning(url);
|
||||
return url;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "file://localhost/" + path;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -428,13 +428,24 @@ namespace Qoo.Game
|
||||
}
|
||||
|
||||
// Token: 0x060000A9 RID: 169 RVA: 0x000044D8 File Offset: 0x000026D8
|
||||
public static void SetFirstName(string name)
|
||||
public static void SetLastName(string name)
|
||||
{
|
||||
GameData.SetParamString("firstname", string.Empty, name);
|
||||
GameData.SetParamString("familyname", string.Empty, name);
|
||||
}
|
||||
|
||||
// Token: 0x060000AA RID: 170 RVA: 0x000044EC File Offset: 0x000026EC
|
||||
public static byte[] Save()
|
||||
public static string GetLastName()
|
||||
{
|
||||
return GameData.GetParamString("familyname", string.Empty);
|
||||
}
|
||||
|
||||
// Token: 0x060000A9 RID: 169 RVA: 0x000044D8 File Offset: 0x000026D8
|
||||
public static void SetFirstName(string name)
|
||||
{
|
||||
GameData.SetParamString("firstname", string.Empty, name);
|
||||
}
|
||||
|
||||
// Token: 0x060000AA RID: 170 RVA: 0x000044EC File Offset: 0x000026EC
|
||||
public static byte[] Save()
|
||||
{
|
||||
if (!GameData.m_isLoadData)
|
||||
{
|
||||
@@ -473,7 +484,8 @@ namespace Qoo.Game
|
||||
GameParam gameParam = new GameParam();
|
||||
gameParam.Copy(GameData.LockParam);
|
||||
gameParam.Set("firstname", GameData.GetFirstName());
|
||||
return gameParam;
|
||||
gameParam.Set("familyname", GameData.GetLastName());
|
||||
return gameParam;
|
||||
}
|
||||
|
||||
// Token: 0x060000AF RID: 175 RVA: 0x000045AC File Offset: 0x000027AC
|
||||
|
||||
@@ -85,20 +85,24 @@ namespace Qoo.Game
|
||||
if (UnityApp.Instance.isJapanese)
|
||||
{
|
||||
KsExec.editName = "アリス";
|
||||
}
|
||||
KsExec.editLastName = "リデル";
|
||||
}
|
||||
else
|
||||
{
|
||||
KsExec.editName = "Alice";
|
||||
}
|
||||
KsExec.editLastName = "Liddell";
|
||||
}
|
||||
NameInputKeyboard.DebugInputText = KsExec.editName;
|
||||
KsExec.KeyboardMain();
|
||||
NameInputKeyboard.DebugInputTextLastName = KsExec.editLastName;
|
||||
KsExec.KeyboardMain();
|
||||
}
|
||||
else if (KsExec.confirm)
|
||||
{
|
||||
if (KsExec.confirmResult)
|
||||
{
|
||||
GameData.SetParamString("firstname", string.Empty, KsExec.editName);
|
||||
NameInputKeyboard.Close();
|
||||
GameData.SetParamString("familyname", string.Empty, KsExec.editLastName);
|
||||
NameInputKeyboard.Close();
|
||||
return true;
|
||||
}
|
||||
KsExec.KeyboardMain();
|
||||
@@ -108,7 +112,8 @@ namespace Qoo.Game
|
||||
else
|
||||
{
|
||||
KsExec.editName = NameInputKeyboard.InputText;
|
||||
if (KsExec.editName.Length == 0 || KsExec.checkSpaceOnly(KsExec.editName))
|
||||
KsExec.editLastName = NameInputKeyboard.InputTextLastName;
|
||||
if (KsExec.editName.Length == 0 || KsExec.checkSpaceOnly(KsExec.editName))
|
||||
{
|
||||
UnityTask.SetSubNoUnityTask(MessageDlg.ExecDlg("No name entered", null));
|
||||
KsExec.KeyboardMain();
|
||||
@@ -126,9 +131,10 @@ namespace Qoo.Game
|
||||
else
|
||||
{
|
||||
string arg = KsExec.editName;
|
||||
string paramString = GameData.GetParamString("familyname", string.Empty);
|
||||
string arg2 = KsExec.editLastName;
|
||||
string paramString = GameData.GetParamString("familyname", string.Empty);
|
||||
string[] msgs;
|
||||
if (UnityApp.Instance.isJapanese)
|
||||
/*if (UnityApp.Instance.isJapanese)
|
||||
{
|
||||
msgs = new string[]
|
||||
{
|
||||
@@ -143,8 +149,25 @@ namespace Qoo.Game
|
||||
string.Format("Is {0} {1} correct?", arg, paramString)
|
||||
};
|
||||
|
||||
}
|
||||
UnityTask.SetSubNoUnityTask(MessageDlg.ExecDlg(msgs, new Action<bool>(KsExec.SetResult)));
|
||||
}*/
|
||||
|
||||
if (UnityApp.Instance.isJapanese)
|
||||
{
|
||||
msgs = new string[]
|
||||
{
|
||||
string.Format("「{0}={1}」です。", arg, arg2),
|
||||
"よろしいですか?"
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
msgs = new string[]
|
||||
{
|
||||
string.Format("Is {0} {1} correct?", arg, arg2)
|
||||
};
|
||||
|
||||
}
|
||||
UnityTask.SetSubNoUnityTask(MessageDlg.ExecDlg(msgs, new Action<bool>(KsExec.SetResult)));
|
||||
KsExec.confirm = true;
|
||||
KsExec.confirmResult = false;
|
||||
}
|
||||
@@ -168,7 +191,7 @@ namespace Qoo.Game
|
||||
// Token: 0x06000614 RID: 1556 RVA: 0x00019604 File Offset: 0x00017804
|
||||
private static void KeyboardMain()
|
||||
{
|
||||
UnityTask.SetSubTask(NameInputKeyboard.Open(KsExec.editName, true));
|
||||
UnityTask.SetSubTask(NameInputKeyboard.Open(KsExec.editName, KsExec.editLastName, true));
|
||||
/*switch (UnityEngine.Application.platform)
|
||||
{
|
||||
case RuntimePlatform.IPhonePlayer:
|
||||
@@ -259,5 +282,7 @@ namespace Qoo.Game
|
||||
|
||||
// Token: 0x040005AB RID: 1451
|
||||
private static string editName = string.Empty;
|
||||
}
|
||||
|
||||
private static string editLastName = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
|
||||
// Token: 0x02000174 RID: 372
|
||||
@@ -21,8 +23,12 @@ public class ScreenKeyboardManager : MonoBehaviour
|
||||
gameObject = new GameObject("_ScreenKeyboardManager");
|
||||
}
|
||||
ScreenKeyboardManager.m_instance = gameObject.AddComponent<ScreenKeyboardManager>();
|
||||
gameObject.AddComponent<EventSystem>();
|
||||
gameObject.AddComponent<StandaloneInputModule>();
|
||||
ScreenKeyboardManager.m_instance.m_inputText = string.Empty;
|
||||
}
|
||||
ScreenKeyboardManager.m_instance.m_inputTextLastName = string.Empty;
|
||||
ScreenKeyboardManager.m_instance.isKeyboardActive = true;
|
||||
}
|
||||
return ScreenKeyboardManager.m_instance;
|
||||
}
|
||||
}
|
||||
@@ -47,9 +53,29 @@ public class ScreenKeyboardManager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700015D RID: 349
|
||||
// (get) Token: 0x06000A96 RID: 2710 RVA: 0x0002EAB4 File Offset: 0x0002CCB4
|
||||
public static bool IsCancel
|
||||
// Token: 0x1700015B RID: 347
|
||||
// (get) Token: 0x06000A94 RID: 2708 RVA: 0x0002EA98 File Offset: 0x0002CC98
|
||||
public static string InputTextLastName
|
||||
{
|
||||
get
|
||||
{
|
||||
return ScreenKeyboardManager.Instance.m_inputTextLastName;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700015C RID: 348
|
||||
// (set) Token: 0x06000A95 RID: 2709 RVA: 0x0002EAA4 File Offset: 0x0002CCA4
|
||||
public static string DebugInputTextLastName
|
||||
{
|
||||
set
|
||||
{
|
||||
ScreenKeyboardManager.Instance.m_inputTextLastName = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700015D RID: 349
|
||||
// (get) Token: 0x06000A96 RID: 2710 RVA: 0x0002EAB4 File Offset: 0x0002CCB4
|
||||
public static bool IsCancel
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -59,108 +85,191 @@ public class ScreenKeyboardManager : MonoBehaviour
|
||||
}
|
||||
|
||||
// Token: 0x06000A97 RID: 2711 RVA: 0x0002EAC8 File Offset: 0x0002CCC8
|
||||
public static IEnumerator Open(string defaultString = "")
|
||||
public static IEnumerator Open(string defaultString = "", string defaultString2 = "")
|
||||
{
|
||||
bool isKeyboardActive = true;
|
||||
int width = 350;
|
||||
int height = 50;
|
||||
int fontSize = 24;
|
||||
Color fontColor = Color.white;
|
||||
Color inputBoxColor = new Color(87f/255f,48f / 255f, 55f / 255f, 255f / 255f);
|
||||
|
||||
GameObject manager= ScreenKeyboardManager.Instance.gameObject;
|
||||
//ScreenKeyboardManager.m_instance.isKeyboardActive = true;
|
||||
//Debug.LogWarning("Name: " + defaultString + " = " + defaultString2);
|
||||
GameObject manager = ScreenKeyboardManager.Instance.gameObject;
|
||||
|
||||
Canvas canvas = manager.AddComponent<Canvas>();
|
||||
canvas.gameObject.AddComponent<CanvasScaler>();
|
||||
CanvasScaler scaler = canvas.gameObject.AddComponent<CanvasScaler>();
|
||||
scaler.uiScaleMode = CanvasScaler.ScaleMode.ScaleWithScreenSize;
|
||||
canvas.gameObject.AddComponent<GraphicRaycaster>();
|
||||
canvas.renderMode = RenderMode.ScreenSpaceOverlay;
|
||||
|
||||
GameObject container = new GameObject();
|
||||
container.name = "InputField";
|
||||
container.transform.parent = canvas.transform;
|
||||
container.AddComponent<CanvasRenderer>();
|
||||
InputField _inputFieldFirstName = createInputBox(canvas, "FirstName", defaultString, "Input First Name", new Vector3(-250, 50, 0));
|
||||
InputField _inputFieldLastName = createInputBox(canvas, "LastName", defaultString2, "Input Last Name", new Vector3(0, 50, 0));
|
||||
|
||||
Image _image = container.AddComponent<Image>();
|
||||
//_image.sprite = UnityEditor.AssetDatabase.GetBuiltinExtraResource<Sprite>("UI/Skin/UISprite.psd");
|
||||
_image.type = Image.Type.Sliced;
|
||||
_image.color = inputBoxColor;
|
||||
createEqualsBox(canvas, "Equals", new Vector3(-125, 50, 0));
|
||||
createButton(canvas, "SubmitButton", new Vector3(-125, -35, 0));
|
||||
|
||||
Font font = (Font)Resources.Load("font/Cabin");
|
||||
string firstNameString = _inputFieldFirstName.text;
|
||||
string lastNameString = _inputFieldLastName.text;
|
||||
|
||||
GameObject textContainer = new GameObject();
|
||||
textContainer.name = "Text";
|
||||
textContainer.transform.parent = container.transform;
|
||||
Text _text = textContainer.AddComponent<Text>();
|
||||
RectTransform _textTransform = _text.GetComponent<RectTransform>();
|
||||
_textTransform.sizeDelta = new Vector2(width, height);
|
||||
_text.supportRichText = false;
|
||||
_text.color = fontColor;
|
||||
_text.font = font;
|
||||
_text.fontSize = fontSize;
|
||||
_text.horizontalOverflow = HorizontalWrapMode.Overflow;
|
||||
_text.alignment = TextAnchor.MiddleCenter;
|
||||
|
||||
GameObject placeholderContainer = new GameObject();
|
||||
placeholderContainer.name = "Placeholder";
|
||||
placeholderContainer.transform.parent = container.transform;
|
||||
Text _placeholder = placeholderContainer.AddComponent<Text>();
|
||||
RectTransform _placeholderTransform = _placeholder.GetComponent<RectTransform>();
|
||||
_placeholderTransform.sizeDelta = new Vector2(width, height);
|
||||
_placeholder.color = fontColor;
|
||||
_placeholder.font = font;
|
||||
_placeholder.fontSize = fontSize;
|
||||
_placeholder.fontStyle = FontStyle.Italic;
|
||||
_placeholder.supportRichText = false;
|
||||
_placeholder.horizontalOverflow = HorizontalWrapMode.Overflow;
|
||||
_placeholder.text = "Enter your Name";
|
||||
_placeholder.alignment = TextAnchor.MiddleCenter;
|
||||
|
||||
InputField _inputField = container.AddComponent<InputField>();
|
||||
_inputField.targetGraphic = _image;
|
||||
_inputField.textComponent = _text;
|
||||
_inputField.placeholder = _placeholder;
|
||||
RectTransform _inputFieldTransform = _inputField.GetComponent<RectTransform>();
|
||||
_inputFieldTransform.localPosition = new Vector3(0, 0, 0);
|
||||
_inputFieldTransform.sizeDelta = new Vector2(width, height);
|
||||
_inputField.characterLimit = 7;
|
||||
_inputField.characterValidation = InputField.CharacterValidation.Name;
|
||||
_inputField.text = defaultString;
|
||||
|
||||
string nameString = _inputField.text;
|
||||
|
||||
while (isKeyboardActive)
|
||||
while (ScreenKeyboardManager.m_instance.isKeyboardActive)
|
||||
{
|
||||
yield return 0;
|
||||
if (Input.GetKeyDown(KeyCode.Return))
|
||||
{
|
||||
nameString = _inputField.text;
|
||||
ScreenKeyboardManager.Instance.m_inputText = nameString;
|
||||
GameObject.Destroy(canvas.gameObject);
|
||||
/*if (Input.GetKeyDown(KeyCode.Return))
|
||||
{
|
||||
firstNameString = _inputFieldFirstName.text;
|
||||
lastNameString = _inputFieldLastName.text;
|
||||
ScreenKeyboardManager.Instance.m_inputText = firstNameString;
|
||||
ScreenKeyboardManager.Instance.m_inputTextLastName = lastNameString;
|
||||
GameObject.Destroy(canvas.gameObject);
|
||||
isKeyboardActive = false;
|
||||
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
//TODO fix TouchScreenKeyboard issue
|
||||
/*ScreenKeyboardManager.Instance.m_inputText = defaultString;
|
||||
ScreenKeyboardManager.Instance.m_keyboard = TouchScreenKeyboard.Open(defaultString, TouchScreenKeyboardType.NamePhonePad);
|
||||
while (!ScreenKeyboardManager.Instance.m_keyboard.active)
|
||||
{
|
||||
yield return 0;
|
||||
}
|
||||
while (ScreenKeyboardManager.Instance.m_keyboard.active)
|
||||
{
|
||||
yield return 0;
|
||||
}
|
||||
if (ScreenKeyboardManager.Instance.m_keyboard.done)
|
||||
{
|
||||
ScreenKeyboardManager.Instance.m_inputText = ScreenKeyboardManager.Instance.m_keyboard.text;
|
||||
}*/
|
||||
yield break;
|
||||
}
|
||||
|
||||
// Token: 0x06000A98 RID: 2712 RVA: 0x0002EAEC File Offset: 0x0002CCEC
|
||||
public static void Close()
|
||||
public static InputField createInputBox(Canvas canvas, string objectName, string defaultString, string placeholderString, Vector3 position)
|
||||
{
|
||||
int width = 200;
|
||||
int height = 50;
|
||||
int fontSize = 24;
|
||||
Color fontColor = Color.white;
|
||||
Color inputBoxColor = new Color(87f / 255f, 48f / 255f, 55f / 255f, 255f / 255f);
|
||||
|
||||
GameObject container = new GameObject();
|
||||
container.name = objectName;
|
||||
container.transform.parent = canvas.transform;
|
||||
container.AddComponent<CanvasRenderer>();
|
||||
|
||||
Image _image = container.AddComponent<Image>();
|
||||
//_image.sprite = UnityEditor.AssetDatabase.GetBuiltinExtraResource<Sprite>("UI/Skin/UISprite.psd");
|
||||
_image.type = Image.Type.Sliced;
|
||||
_image.color = inputBoxColor;
|
||||
|
||||
Font font = (Font)Resources.Load("font/Cabin");
|
||||
|
||||
GameObject textContainer = new GameObject();
|
||||
textContainer.name = "Text";
|
||||
textContainer.transform.parent = container.transform;
|
||||
container.transform.localScale = new Vector3(1, 1, 1);
|
||||
Text _text = textContainer.AddComponent<Text>();
|
||||
RectTransform _textTransform = _text.GetComponent<RectTransform>();
|
||||
_textTransform.sizeDelta = new Vector2(width, height);
|
||||
_text.supportRichText = false;
|
||||
_text.color = fontColor;
|
||||
_text.font = font;
|
||||
_text.fontSize = fontSize;
|
||||
_text.horizontalOverflow = HorizontalWrapMode.Overflow;
|
||||
_text.alignment = TextAnchor.MiddleCenter;
|
||||
|
||||
GameObject placeholderContainer = new GameObject();
|
||||
placeholderContainer.name = "Placeholder";
|
||||
placeholderContainer.transform.parent = container.transform;
|
||||
Text _placeholder = placeholderContainer.AddComponent<Text>();
|
||||
RectTransform _placeholderTransform = _placeholder.GetComponent<RectTransform>();
|
||||
_placeholderTransform.sizeDelta = new Vector2(width, height);
|
||||
_placeholder.color = fontColor;
|
||||
_placeholder.font = font;
|
||||
_placeholder.fontSize = fontSize;
|
||||
_placeholder.fontStyle = FontStyle.Italic;
|
||||
_placeholder.supportRichText = false;
|
||||
_placeholder.horizontalOverflow = HorizontalWrapMode.Overflow;
|
||||
_placeholder.text = placeholderString;
|
||||
_placeholder.alignment = TextAnchor.MiddleCenter;
|
||||
|
||||
InputField _inputField = container.AddComponent<InputField>();
|
||||
_inputField.targetGraphic = _image;
|
||||
_inputField.textComponent = _text;
|
||||
_inputField.placeholder = _placeholder;
|
||||
RectTransform _inputFieldTransform = _inputField.GetComponent<RectTransform>();
|
||||
_inputFieldTransform.localPosition = position;
|
||||
_inputFieldTransform.sizeDelta = new Vector2(width, height);
|
||||
_inputField.characterLimit = 7;
|
||||
_inputField.characterValidation = InputField.CharacterValidation.Name;
|
||||
_inputField.text = defaultString;
|
||||
return _inputField;
|
||||
}
|
||||
|
||||
public static void createButton(Canvas canvas, string objectName, Vector3 position)
|
||||
{
|
||||
int width = 150;
|
||||
int height = 50;
|
||||
int fontSize = 24;
|
||||
Color fontColor = Color.white;
|
||||
Color inputBoxColor = new Color(242f / 255f, 151f / 255f, 161f / 255f, 255f / 255f);
|
||||
|
||||
GameObject container = new GameObject();
|
||||
container.name = objectName;
|
||||
container.transform.parent = canvas.transform;
|
||||
container.transform.localPosition = position;
|
||||
container.AddComponent<CanvasRenderer>();
|
||||
|
||||
|
||||
Image _image = container.AddComponent<Image>();
|
||||
_image.type = Image.Type.Sliced;
|
||||
_image.color = inputBoxColor;
|
||||
Button _button = container.AddComponent<Button>();
|
||||
_button.onClick.AddListener(delegate { OnButtonClick(container.transform.parent.GetChild(0).gameObject.GetComponent<InputField>(), container.transform.parent.GetChild(1).gameObject.GetComponent<InputField>(), canvas); });
|
||||
|
||||
RectTransform _containerTransform = container.GetComponent<RectTransform>();
|
||||
_containerTransform.sizeDelta = new Vector2(width, height);
|
||||
|
||||
Font font = (Font)Resources.Load("font/Cabin");
|
||||
|
||||
GameObject textContainer = new GameObject();
|
||||
textContainer.name = "Text";
|
||||
textContainer.transform.parent = container.transform;
|
||||
textContainer.transform.localPosition = new Vector3(0,0,0);
|
||||
container.transform.localScale = new Vector3(1, 1, 1);
|
||||
Text _text = textContainer.AddComponent<Text>();
|
||||
RectTransform _textTransform = _text.GetComponent<RectTransform>();
|
||||
_textTransform.sizeDelta = new Vector2(width, height);
|
||||
_text.supportRichText = false;
|
||||
_text.color = fontColor;
|
||||
_text.font = font;
|
||||
_text.fontSize = fontSize;
|
||||
_text.horizontalOverflow = HorizontalWrapMode.Overflow;
|
||||
_text.alignment = TextAnchor.MiddleCenter;
|
||||
_text.text = "Confirm";
|
||||
}
|
||||
|
||||
public static void createEqualsBox(Canvas canvas, string objectName, Vector3 position)
|
||||
{
|
||||
int width = 50;
|
||||
int height = 50;
|
||||
int fontSize = 40;
|
||||
Color fontColor = Color.white;
|
||||
|
||||
GameObject container = new GameObject();
|
||||
container.name = objectName;
|
||||
container.transform.parent = canvas.transform;
|
||||
|
||||
container.AddComponent<CanvasRenderer>();
|
||||
|
||||
Font font = (Font)Resources.Load("font/Cabin");
|
||||
|
||||
container.transform.localScale = new Vector3(1, 1, 1);
|
||||
Text _text = container.AddComponent<Text>();
|
||||
RectTransform _textTransform = _text.GetComponent<RectTransform>();
|
||||
_textTransform.localPosition = position;
|
||||
_textTransform.sizeDelta = new Vector2(width, height);
|
||||
_text.supportRichText = false;
|
||||
_text.color = fontColor;
|
||||
_text.font = font;
|
||||
_text.fontSize = fontSize;
|
||||
_text.horizontalOverflow = HorizontalWrapMode.Overflow;
|
||||
_text.alignment = TextAnchor.MiddleCenter;
|
||||
_text.text = "=";
|
||||
}
|
||||
|
||||
public static void OnButtonClick(InputField firstname, InputField lastname, Canvas canvas )
|
||||
{
|
||||
String firstNameString = firstname.text;
|
||||
String lastNameString = lastname.text;
|
||||
ScreenKeyboardManager.Instance.m_inputText = firstNameString;
|
||||
ScreenKeyboardManager.Instance.m_inputTextLastName = lastNameString;
|
||||
Debug.LogWarning("Name: " + firstNameString + " = " + lastNameString);
|
||||
ScreenKeyboardManager.m_instance.isKeyboardActive = false;
|
||||
GameObject.Destroy(canvas.gameObject);
|
||||
}
|
||||
|
||||
// Token: 0x06000A98 RID: 2712 RVA: 0x0002EAEC File Offset: 0x0002CCEC
|
||||
public static void Close()
|
||||
{
|
||||
if (ScreenKeyboardManager.m_instance != null)
|
||||
{
|
||||
@@ -177,4 +286,9 @@ public class ScreenKeyboardManager : MonoBehaviour
|
||||
|
||||
// Token: 0x04000887 RID: 2183
|
||||
private string m_inputText;
|
||||
|
||||
// Token: 0x04000887 RID: 2183
|
||||
private string m_inputTextLastName;
|
||||
|
||||
private bool isKeyboardActive;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ public class ScreenMovieSample : MonoBehaviour
|
||||
{
|
||||
//TODO fix movie playing. either make platform specific versions OR make platform agnostic
|
||||
//yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/high/op_movie.mp4", FullScreenMovieControlMode.CancelOnInput));
|
||||
yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/high/op_movie.mp4", this.gameObject));
|
||||
yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/high/op_movie.webm", this.gameObject));
|
||||
Debug.Log(" #DEBUGLOG::MOVIE OWATA ");
|
||||
yield break;
|
||||
}
|
||||
|
||||
@@ -115,8 +115,10 @@ public class UIValue
|
||||
// Token: 0x0400064F RID: 1615
|
||||
public static string GalleryInputNameDialog_Name;
|
||||
|
||||
// Token: 0x04000650 RID: 1616
|
||||
public static GalleryInputNameDialogExitType GalleryInputNameDialog_Exit;
|
||||
public static string GalleryInputNameDialog_LastName;
|
||||
|
||||
// Token: 0x04000650 RID: 1616
|
||||
public static GalleryInputNameDialogExitType GalleryInputNameDialog_Exit;
|
||||
|
||||
// Token: 0x04000651 RID: 1617
|
||||
public static SaveLoadType SaveLoadType;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Collections;
|
||||
using Qoo;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
|
||||
// Token: 0x02000148 RID: 328
|
||||
public class UnityFile
|
||||
@@ -130,7 +131,7 @@ public class UnityFile
|
||||
name = Pathing.ToPlatformAssetBundleName(name);
|
||||
}
|
||||
string text = Pathing.appContentDataPath + localpath + name;
|
||||
Qoo.Debug.Print("FileLoad:" + text);
|
||||
Qoo.Debug.Print("first possible spot:");
|
||||
return text;
|
||||
}
|
||||
|
||||
@@ -187,10 +188,50 @@ public class UnityFile
|
||||
}
|
||||
else if (this.m_IsAssetBandle)
|
||||
{
|
||||
UnityEngine.Debug.Log (Application.streamingAssetsPath + m_szPath + m_szName + ".png");
|
||||
if (Application.platform == RuntimePlatform.Android)
|
||||
{
|
||||
string url;
|
||||
if (Application.platform == RuntimePlatform.Android)
|
||||
{
|
||||
// On Android, use "jar:file://" URL to load file from StreamingAssets
|
||||
url = ("jar:file://" + Application.dataPath + "!/assets" + m_szPath + m_szName + ".png").TrimStart('/');
|
||||
UnityEngine.Debug.LogWarning(url);
|
||||
}
|
||||
else
|
||||
{
|
||||
// On other platforms, use file:// URL to load file from StreamingAssets
|
||||
url = Application.streamingAssetsPath + m_szPath + m_szName + ".png";
|
||||
}
|
||||
|
||||
//UnityEngine.Debug.LogWarning(url);
|
||||
UnityWebRequest request = UnityWebRequest.Get(url);
|
||||
yield return request.SendWebRequest();
|
||||
|
||||
if (request.result == UnityWebRequest.Result.Success)
|
||||
{
|
||||
byte[] data = request.downloadHandler.data;
|
||||
this.m_ReadData = data;
|
||||
// Use the loaded image data here
|
||||
}
|
||||
else
|
||||
{
|
||||
UnityEngine.Debug.LogError("Failed to load image: " + request.error);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
UnityEngine.Debug.Log(Application.streamingAssetsPath + m_szPath + m_szName + ".png");
|
||||
byte[] data = System.IO.File.ReadAllBytes(Application.streamingAssetsPath + m_szPath + m_szName + ".png");
|
||||
this.m_ReadData = data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*UnityEngine.Debug.Log (Application.streamingAssetsPath + m_szPath + m_szName + ".png");
|
||||
byte[] data = System.IO.File.ReadAllBytes(Application.streamingAssetsPath + m_szPath + m_szName + ".png");
|
||||
this.m_ReadData = data;
|
||||
}
|
||||
this.m_ReadData = data;*/
|
||||
}
|
||||
else
|
||||
{
|
||||
this.m_ReadData = loader.bytes;
|
||||
|
||||
@@ -41,6 +41,7 @@ public class UnityFileLoader : Singleton<UnityFileLoader>
|
||||
// Token: 0x06000914 RID: 2324 RVA: 0x00027884 File Offset: 0x00025A84
|
||||
public UnityFile LoadFile(string name, string localpath, bool IsAssetBandle = false)
|
||||
{
|
||||
UnityEngine.Debug.LogWarning("in Load File");
|
||||
if (this.IsLoadedAssetBundle())
|
||||
{
|
||||
string name2 = this.NormalizeImageName(name);
|
||||
@@ -72,7 +73,7 @@ public class UnityFileLoader : Singleton<UnityFileLoader>
|
||||
name = Pathing.ToPlatformAssetBundleName(name);
|
||||
}
|
||||
string text = Pathing.appContentDataPath + localpath + name;
|
||||
Qoo.Debug.Print("FileLoad:" + text);
|
||||
Qoo.Debug.Print("FileLoad:" + text);
|
||||
return new WWW(text);
|
||||
}
|
||||
|
||||
|
||||
@@ -361,7 +361,7 @@ public class UnityGraph : Singleton<UnityGraph>
|
||||
VideoPlayer m_tex = movieFrame.obj.transform.gameObject.AddComponent<VideoPlayer>();
|
||||
m_tex.playOnAwake = false;
|
||||
Material newMat = new Material(Shader.Find("QO/Sprite Add") as Shader);
|
||||
m_tex.url = Application.streamingAssetsPath + "/" + path + ".mp4";
|
||||
m_tex.url = Application.streamingAssetsPath + "/" + path + ".webm";
|
||||
m_tex.isLooping = false;
|
||||
movieFrame.SetMaterial(newMat, 960, 544);
|
||||
m_tex.renderMode = UnityEngine.Video.VideoRenderMode.MaterialOverride;
|
||||
|
||||
@@ -15,7 +15,7 @@ public class keyboard_sample_main : MonoBehaviour
|
||||
// Token: 0x0600000A RID: 10 RVA: 0x00002194 File Offset: 0x00000394
|
||||
private IEnumerator UserInput()
|
||||
{
|
||||
yield return base.StartCoroutine(ScreenKeyboardManager.Open(ScreenKeyboardManager.InputText));
|
||||
yield return base.StartCoroutine(ScreenKeyboardManager.Open(ScreenKeyboardManager.InputText, ScreenKeyboardManager.InputTextLastName));
|
||||
TextMesh tMesh = base.GetComponent<TextMesh>();
|
||||
tMesh.text = ScreenKeyboardManager.InputText;
|
||||
yield break;
|
||||
|
||||
Reference in New Issue
Block a user