diff --git a/AxibugEmuOnline.Client/Assets/Plugins/PSVita/CommonDialog.meta b/AxibugEmuOnline.Client/Assets/Plugins/PSVita/CommonDialog.meta deleted file mode 100644 index 9afcedf..0000000 --- a/AxibugEmuOnline.Client/Assets/Plugins/PSVita/CommonDialog.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 338f56c77fdd1c6498ba8b57baadd618 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/AxibugEmuOnline.Client/Assets/Plugins/PSVita/CommonDialog/SonyVitaCommonDialog.unity b/AxibugEmuOnline.Client/Assets/Plugins/PSVita/CommonDialog/SonyVitaCommonDialog.unity deleted file mode 100644 index 491720b..0000000 --- a/AxibugEmuOnline.Client/Assets/Plugins/PSVita/CommonDialog/SonyVitaCommonDialog.unity +++ /dev/null @@ -1,253 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 1 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 10 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} - m_AmbientEquatorColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} - m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 3 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &4 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 13 - m_BakeOnSceneLoad: 0 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 0 - m_LightmapEditorSettings: - serializedVersion: 12 - m_Resolution: 1 - m_BakeResolution: 50 - m_AtlasSize: 1024 - m_AO: 1 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_ExtractAmbientOcclusion: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 0 - m_ReflectionCompression: 2 - m_MixedBakeMode: 1 - m_BakeBackend: 0 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 512 - m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 0 - m_PVRDenoiserTypeDirect: 0 - m_PVRDenoiserTypeIndirect: 0 - m_PVRDenoiserTypeAO: 0 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVREnvironmentMIS: 0 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 1 - m_PVRFilteringGaussRadiusAO: 1 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ExportTrainingData: 0 - m_TrainingDataDestination: TrainingData - m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0} - m_LightingSettings: {fileID: 4890085278179872738, guid: 134c351b3dc8395478a02c168bed5e72, type: 2} ---- !u!196 &5 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 3 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666666 - manualTileSize: 0 - tileSize: 256 - buildHeightMesh: 0 - maxJobWorkers: 0 - preserveTilesOutsideBounds: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &718010440 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 718010445} - - component: {fileID: 718010444} - - component: {fileID: 718010442} - - component: {fileID: 718010441} - - component: {fileID: 718010448} - - component: {fileID: 718010446} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &718010441 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 718010440} - m_Enabled: 1 ---- !u!124 &718010442 -Behaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 718010440} - m_Enabled: 1 ---- !u!20 &718010444 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 718010440} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_Iso: 200 - m_ShutterSpeed: 0.005 - m_Aperture: 16 - m_FocusDistance: 10 - m_FocalLength: 50 - m_BladeCount: 5 - m_Curvature: {x: 2, y: 11} - m_BarrelClipping: 0.25 - m_Anamorphism: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 60 - orthographic: 0 - orthographic size: 100 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 0 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &718010445 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 718010440} - serializedVersion: 2 - m_LocalRotation: {x: 0.13219804, y: 0, z: 0, w: 0.99122334} - m_LocalPosition: {x: 0, y: 3, z: -10} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &718010446 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 718010440} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 7bc72e9d59cc9134d8855521049ad788, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &718010448 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 718010440} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f451418d53ab95442b9cd42f836f7553, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1660057539 &9223372036854775807 -SceneRoots: - m_ObjectHideFlags: 0 - m_Roots: - - {fileID: 718010445} diff --git a/AxibugEmuOnline.Client/Assets/Plugins/PSVita/CommonDialog/SonyVitaCommonDialog.unity.meta b/AxibugEmuOnline.Client/Assets/Plugins/PSVita/CommonDialog/SonyVitaCommonDialog.unity.meta deleted file mode 100644 index 36d4467..0000000 --- a/AxibugEmuOnline.Client/Assets/Plugins/PSVita/CommonDialog/SonyVitaCommonDialog.unity.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 75a40431d8fb8324b92629c82f271192 -DefaultImporter: - userData: diff --git a/AxibugEmuOnline.Client/Assets/Plugins/PSVita/CommonDialog/SonyVitaCommonDialogReadme.txt b/AxibugEmuOnline.Client/Assets/Plugins/PSVita/CommonDialog/SonyVitaCommonDialogReadme.txt deleted file mode 100644 index fdba07a..0000000 --- a/AxibugEmuOnline.Client/Assets/Plugins/PSVita/CommonDialog/SonyVitaCommonDialogReadme.txt +++ /dev/null @@ -1,211 +0,0 @@ - -Unity SCE Common Dialog Example Project. - -This example project demonstrates how to use the Unity SCE Common Dialog API for displaying and retrieving results from user, system, progress, error and text entry (IME) dialogs. - -Project Folder Structure - - Plugins/PSVita - Contains the CommonDialog native plugin. - SonyAssemblies - Contains the SonyVitaCommonDialog managed interface to the CommonDialog plugin. - SonyExample/CommonDialog - Contains a Unity scene which runs the scripts. - SonyExample/CommonDialog/Scripts - Contains the Sony NP example scripts. - SonyExample/Utils - Contains various utility scripts for use by the example. - -The SonyVitaCommonDialog managed assembly defines the following namespaces... - -Sony.Vita.Dialog.Main Contains methods for initialising and updating the plugin. -Sony.Vita.Dialog.Common Contains methods for working with the SCE Common Dialog for user, system, progress, and error messages. -Sony.Vita.Dialog.Common.Ime Contains methods for working with the SCE IME Dialog for text entry. - -Sony.Vita.Dialog.Main - - Methods. - - public static void Initialise() - Initialises the plugin, call once. - - public static void Update() - Updates the plugin, call once each frame. - -Sony.Vita.Dialog.Common - - Enumerations. - - System message dialog types, these are a one-one match with the values defined by SceMsgDialogSystemMessageType. - public enum EnumSystemMessageType - { - MSG_DIALOG_SYSMSG_TYPE_WAIT = 1, - MSG_DIALOG_SYSMSG_TYPE_NOSPACE = 2, - MSG_DIALOG_SYSMSG_TYPE_MAGNETIC_CALIBRATION = 3, - MSG_DIALOG_SYSMSG_TYPE_WAIT_SMALL = 5, - MSG_DIALOG_SYSMSG_TYPE_WAIT_CANCEL = 6, - MSG_DIALOG_SYSMSG_TYPE_NOSPACE_CONTINUABLE = 9, - MSG_DIALOG_SYSMSG_TYPE_LOCATION_DATA_OBTAINING = 10, - MSG_DIALOG_SYSMSG_TYPE_LOCATION_DATA_FAILURE = 11, - MSG_DIALOG_SYSMSG_TYPE_LOCATION_DATA_FAILURE_RETRY = 12, - MSG_DIALOG_SYSMSG_TYPE_PATCH_FOUND = 13, - } - - User message dialog types, these are a one-one match with the values defined by SceMsgDialogButtonType. - public enum EnumUserMessageType - { - MSG_DIALOG_BUTTON_TYPE_OK = 0, - MSG_DIALOG_BUTTON_TYPE_YESNO = 1, - MSG_DIALOG_BUTTON_TYPE_NONE = 2, - MSG_DIALOG_BUTTON_TYPE_OK_CANCEL = 3, - MSG_DIALOG_BUTTON_TYPE_CANCEL = 4, - MSG_DIALOG_BUTTON_TYPE_3BUTTONS = 5, - } - - Dialog result, the button or action that resulted in the dialog closing. - public enum EnumCommonDialogResult - { - RESULT_BUTTON_NOT_SET, - RESULT_BUTTON_OK, - RESULT_BUTTON_CANCEL, - RESULT_BUTTON_YES, - RESULT_BUTTON_NO, - RESULT_BUTTON_1, - RESULT_BUTTON_2, - RESULT_BUTTON_3, - RESULT_CANCELED, - RESULT_ABORTED, - RESULT_CLOSED, - } - - - Events. - - OnGotDialogResult Triggered when a dialog has closed and the result is available. - - Properties. - - public static bool IsDialogOpen - Is a dialog open? - - Methods. - - public static bool ShowErrorMessage(UInt32 errorCode) - Display an error message. - - public static bool ShowSystemMessage(EnumSystemMessageType type, bool infoBar, int value) - Display a system message. - - public static bool ShowProgressBar(string message) - Display a progress bar. - - public static bool SetProgressBarPercent(int percent) - Set progress bar percentage (0-100). - - public static bool SetProgressBarMessage(string message) - Set progress bar message string. - - public static bool ShowUserMessage(EnumUserMessageType type, bool infoBar, string str) - Show a user message. - - public static bool ShowUserMessage3Button(bool infoBar, string str, string button1, string button2, string button3) - Show a user message with 3 custom buttons. - - public static bool Close() - Close the dialog. - - public static EnumCommonDialogResult GetResult() - Get the result from the dialog that's just closed. - -Sony.Vita.Dialog.Common.Ime - - Enumerations. - - ImeParam enterLabel - public enum EnumImeDialogEnterLabel - { - ENTER_LABEL_DEFAULT, - ENTER_LABEL_SEND, - ENTER_LABEL_SEARCH, - ENTER_LABEL_GO, - } - - ImeParam type - public enum EnumImeDialogType - { - TYPE_DEFAULT, UI for regular text input - TYPE_BASIC_LATIN, UI for alphanumeric character input - TYPE_NUMBER, UI for number input - TYPE_EXTENDED_NUMBER, UI for extended number input - TYPE_URL, UI for entering URL - TYPE_MAIL, UI for entering an email address - } - - Dialog result. - public enum EnumImeDialogResult - { - RESULT_OK, User selected either close button or Enter button - RESULT_USER_CANCELED, User performed cancel operation. - RESULT_ABORTED, IME Dialog operation has been aborted. - } - - Dialog result button. - public enum EnumImeDialogResultButton - { - BUTTON_NONE, IME Dialog operation has been aborted or canceled. - BUTTON_CLOSE, User selected close button - BUTTON_ENTER, User selected Enter button - } - - Flags. - - ImeParam textBoxMode, can be OR'd together. - [Flags] public enum FlagsTextBoxMode - { - TEXTBOX_MODE_DEFAULT = 0x00, Text box for regular sentence input - TEXTBOX_MODE_PASSWORD = 0x01, Text box for password input - TEXTBOX_MODE_WITH_CLEAR = 0x02, Text box with clear button - }; - - ImeParam option, can be OR'd together. - [Flags] public enum FlagsTextBoxOption - { - OPTION_DEFAULT = 0x00, - OPTION_MULTILINE = 0x01, Multiline input option. This option is not available for libime. This can be used only for the IME Dialog library. - OPTION_NO_AUTO_CAPITALIZATION = 0x02, Prohibits automatic capitalization - OPTION_NO_ASSISTANCE = 0x04, Prohibits input assistance UIs, such as predictive text and conversion candidate - } - - Structures. - - public class ImeDialogParams - { - public EnumImeDialogType type; Dialog type. - public FlagsTextBoxOption option; Option flags. - public bool canCancel; Whether or not to add the cancel button. - public FlagsTextBoxMode textBoxMode; Text box mode. - public EnumImeDialogEnterLabel enterLabel; Type of enter label. - public int maxTextLength; Maximum text length. - public string title; Dialog title. - public string initialText; Initial text for the text entry field. - }; - - public struct ImeDialogResult - { - public EnumImeDialogResult result; Dialog result. - public EnumImeDialogResultButton button; Dialog result button. - public string text; The text as entered by the user. - }; - - Events. - - OnGotIMEDialogResult Triggered when the dialog has closed and the result is ready. - - Properties. - - public static bool IsDialogOpen - Is the IME dialog open? - - Methods. - - public static bool Open(ImeDialogParams info) - Opens the IME dialog. - - public static ImeDialogResult GetResult() - Gets the IME dialog result. - diff --git a/AxibugEmuOnline.Client/Assets/Plugins/PSVita/CommonDialog/SonyVitaCommonDialogReadme.txt.meta b/AxibugEmuOnline.Client/Assets/Plugins/PSVita/CommonDialog/SonyVitaCommonDialogReadme.txt.meta deleted file mode 100644 index b9690a2..0000000 --- a/AxibugEmuOnline.Client/Assets/Plugins/PSVita/CommonDialog/SonyVitaCommonDialogReadme.txt.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 645d232ed154b0443b42d44bdfa597b1 -TextScriptImporter: - userData: diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/PSVita/SonyVitaCommonDialog.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/PSVita/SonyVitaCommonDialog.cs new file mode 100644 index 0000000..7c4b771 --- /dev/null +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/PSVita/SonyVitaCommonDialog.cs @@ -0,0 +1,60 @@ +using System; +using UnityEngine; +public class SonyVitaCommonDialog : MonoBehaviour +{ + static Action resultAct = null; + void Awake() + { +#if UNITY_PSP2 + Sony.Vita.Dialog.Ime.OnGotIMEDialogResult += OnGotIMEDialogResult; + Sony.Vita.Dialog.Main.Initialise(); +#endif + } + + public void ShowPSVitaIME(Action callback, string placeHolder, string defaultText) + { + resultAct = callback; +#if UNITY_PSP2 + Sony.Vita.Dialog.Ime.ImeDialogParams info = new Sony.Vita.Dialog.Ime.ImeDialogParams(); + + // Set supported languages, 'or' flags together or set to 0 to support all languages. + info.supportedLanguages = Sony.Vita.Dialog.Ime.FlagsSupportedLanguages.LANGUAGE_JAPANESE | + Sony.Vita.Dialog.Ime.FlagsSupportedLanguages.LANGUAGE_ENGLISH_GB | + Sony.Vita.Dialog.Ime.FlagsSupportedLanguages.LANGUAGE_DANISH; + info.languagesForced = true; + + info.type = Sony.Vita.Dialog.Ime.EnumImeDialogType.TYPE_DEFAULT; + info.option = 0; + info.canCancel = true; + info.textBoxMode = Sony.Vita.Dialog.Ime.FlagsTextBoxMode.TEXTBOX_MODE_WITH_CLEAR; + info.enterLabel = Sony.Vita.Dialog.Ime.EnumImeDialogEnterLabel.ENTER_LABEL_DEFAULT; + info.maxTextLength = 128; + info.title = placeHolder; + info.initialText = defaultText; + Sony.Vita.Dialog.Ime.Open(info); +#endif + } + +#if UNITY_PSP2 + void OnGotIMEDialogResult(Sony.Vita.Dialog.Messages.PluginMessage msg) + { + Sony.Vita.Dialog.Ime.ImeDialogResult result = Sony.Vita.Dialog.Ime.GetResult(); + Debug.Log("IME result: " + result.result); + Debug.Log("IME button: " + result.button); + Debug.Log("IME text: " + result.text); + if (result.result == Sony.Vita.Dialog.Ime.EnumImeDialogResult.RESULT_OK) + { + resultAct.Invoke(result); + } + } +#endif + + +#if UNITY_PSP2 + void Update () + { + Sony.Vita.Dialog.Main.Update(); + } +#endif + +} diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/PSVita/SonyVitaCommonDialog.cs.meta b/AxibugEmuOnline.Client/Assets/Script/AppMain/PSVita/SonyVitaCommonDialog.cs.meta new file mode 100644 index 0000000..6794921 --- /dev/null +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/PSVita/SonyVitaCommonDialog.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7bc72e9d59cc9134d8855521049ad788 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: