add mini uma facial
This commit is contained in:
@@ -34,9 +34,9 @@ RectTransform:
|
||||
m_Father: {fileID: 1608283224055752807}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: -90}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -155, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 25, y: 25}
|
||||
m_SizeDelta: {x: 50, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1716187308382881279
|
||||
@@ -238,20 +238,21 @@ RectTransform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2959287579813893925}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 5533725806274544247}
|
||||
- {fileID: 5101433139027027092}
|
||||
- {fileID: 3288415151925636058}
|
||||
- {fileID: 4805765083922032393}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 255, y: -515}
|
||||
m_SizeDelta: {x: 360, y: -1030}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 255, y: -220}
|
||||
m_SizeDelta: {x: 360, y: -440}
|
||||
m_Pivot: {x: 0, y: 0.5}
|
||||
--- !u!222 &1848240297845365164
|
||||
CanvasRenderer:
|
||||
@@ -305,9 +306,168 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
ScrollRect: {fileID: 0}
|
||||
PageText: {fileID: 39968507785767476}
|
||||
SearchText: {fileID: 7177440272451462137}
|
||||
ShowCount: 0
|
||||
ContainerPrefab: {fileID: 648541853701480401, guid: 1b51367a8eeaf0146b7bff4005281a2c,
|
||||
type: 3}
|
||||
--- !u!1 &3171133193326373414
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4258133547954619350}
|
||||
- component: {fileID: 88875794144374795}
|
||||
- component: {fileID: 6874637439581125274}
|
||||
m_Layer: 5
|
||||
m_Name: Placeholder
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4258133547954619350
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3171133193326373414}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4805765083922032393}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -0.5}
|
||||
m_SizeDelta: {x: -20, y: -13}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &88875794144374795
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3171133193326373414}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &6874637439581125274
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3171133193326373414}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 036631af73b15ac41a9d10f75f5bbafe, type: 3}
|
||||
m_FontSize: 25
|
||||
m_FontStyle: 2
|
||||
m_BestFit: 0
|
||||
m_MinSize: 0
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: Search...
|
||||
--- !u!1 &3364505513024354629
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5719131194181143902}
|
||||
- component: {fileID: 3705651677997869928}
|
||||
- component: {fileID: 7276345468478458714}
|
||||
m_Layer: 5
|
||||
m_Name: Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &5719131194181143902
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3364505513024354629}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4805765083922032393}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -0.5}
|
||||
m_SizeDelta: {x: -20, y: -13}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3705651677997869928
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3364505513024354629}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &7276345468478458714
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3364505513024354629}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 036631af73b15ac41a9d10f75f5bbafe, type: 3}
|
||||
m_FontSize: 25
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 0
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 0
|
||||
m_HorizontalOverflow: 1
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text:
|
||||
--- !u!1 &3690886037797559241
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -342,9 +502,9 @@ RectTransform:
|
||||
m_Father: {fileID: 1608283224055752807}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 155, y: 0}
|
||||
m_AnchorMin: {x: 1, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 0}
|
||||
m_AnchoredPosition: {x: -25, y: 25}
|
||||
m_SizeDelta: {x: 50, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2853079900082318116
|
||||
@@ -683,7 +843,7 @@ GameObject:
|
||||
- component: {fileID: 8793580940891119050}
|
||||
- component: {fileID: 39968507785767476}
|
||||
m_Layer: 5
|
||||
m_Name: InputField
|
||||
m_Name: Page
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -705,10 +865,10 @@ RectTransform:
|
||||
m_Father: {fileID: 1608283224055752807}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: -100, y: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0}
|
||||
m_AnchorMax: {x: 0.5, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 25}
|
||||
m_SizeDelta: {x: 260, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5622287192859730345
|
||||
CanvasRenderer:
|
||||
@@ -825,3 +985,158 @@ MonoBehaviour:
|
||||
m_CaretWidth: 1
|
||||
m_ReadOnly: 0
|
||||
m_ShouldActivateOnSelect: 1
|
||||
--- !u!1 &7944254173761142343
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4805765083922032393}
|
||||
- component: {fileID: 3369130883309260137}
|
||||
- component: {fileID: 6017505847885545849}
|
||||
- component: {fileID: 7177440272451462137}
|
||||
m_Layer: 5
|
||||
m_Name: Search
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4805765083922032393
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7944254173761142343}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 4258133547954619350}
|
||||
- {fileID: 5719131194181143902}
|
||||
m_Father: {fileID: 1608283224055752807}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0}
|
||||
m_AnchorMax: {x: 0.5, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 70}
|
||||
m_SizeDelta: {x: 360, y: 40}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3369130883309260137
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7944254173761142343}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &6017505847885545849
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7944254173761142343}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &7177440272451462137
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7944254173761142343}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d199490a83bb2b844b9695cbf13b01ef, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 0
|
||||
m_TargetGraphic: {fileID: 6017505847885545849}
|
||||
m_TextComponent: {fileID: 7276345468478458714}
|
||||
m_Placeholder: {fileID: 6874637439581125274}
|
||||
m_ContentType: 0
|
||||
m_InputType: 0
|
||||
m_AsteriskChar: 42
|
||||
m_KeyboardType: 0
|
||||
m_LineType: 0
|
||||
m_HideMobileInput: 0
|
||||
m_CharacterValidation: 0
|
||||
m_CharacterLimit: 0
|
||||
m_OnEndEdit:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnValueChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 2451699974473359926}
|
||||
m_TargetAssemblyTypeName: PageManager, umamusume
|
||||
m_MethodName: OnSearch
|
||||
m_Mode: 0
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_CustomCaretColor: 0
|
||||
m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412}
|
||||
m_Text:
|
||||
m_CaretBlinkRate: 0.85
|
||||
m_CaretWidth: 1
|
||||
m_ReadOnly: 0
|
||||
m_ShouldActivateOnSelect: 1
|
||||
|
||||
@@ -96,6 +96,7 @@ MonoBehaviour:
|
||||
Button: {fileID: 4701344421301256321}
|
||||
Slider: {fileID: 0}
|
||||
Image: {fileID: 0}
|
||||
ToggleImage: {fileID: 0}
|
||||
--- !u!1 &4970516181956112805
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -322,8 +323,8 @@ MonoBehaviour:
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 12
|
||||
m_fontSizeBase: 12
|
||||
m_fontSize: 14
|
||||
m_fontSizeBase: 14
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
|
||||
+866
-59
File diff suppressed because it is too large
Load Diff
@@ -15,29 +15,38 @@ public class PageManager : MonoBehaviour
|
||||
{
|
||||
public ScrollRect ScrollRect;
|
||||
public InputField PageText;
|
||||
public InputField SearchText;
|
||||
public int ShowCount;
|
||||
public GameObject ContainerPrefab;
|
||||
private int totalPage;
|
||||
private int currentPage = 0;
|
||||
private List<Entry> Entries;
|
||||
private List<Entry> SubEntries;
|
||||
public void Initialize(List<Entry> entries, ScrollRect scrollRect)
|
||||
{
|
||||
ScrollRect = scrollRect;
|
||||
Entries = entries;
|
||||
if (SearchText)
|
||||
SearchText.text = "";
|
||||
ShowCount = Mathf.FloorToInt(ScrollRect.GetComponent<RectTransform>().rect.height / ContainerPrefab.GetComponent<RectTransform>().rect.height);
|
||||
totalPage = Mathf.CeilToInt(entries.Count / (float)ShowCount);
|
||||
if (totalPage > 0)
|
||||
{
|
||||
currentPage = 0;
|
||||
LoadPage(currentPage);
|
||||
SearchText.interactable = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void ResetCtrl()
|
||||
{
|
||||
if(ScrollRect)Clear();
|
||||
totalPage = 0;
|
||||
currentPage = 0;
|
||||
PageText.text = "";
|
||||
if(SearchText)
|
||||
SearchText.text = "";
|
||||
SearchText.interactable = false;
|
||||
SubEntries = null;
|
||||
Entries = null;
|
||||
((Text)PageText.placeholder).text = $"- / -";
|
||||
}
|
||||
@@ -45,14 +54,15 @@ public class PageManager : MonoBehaviour
|
||||
private void LoadPage(int index)
|
||||
{
|
||||
if (totalPage == 0) return;
|
||||
var entries = (SearchText && SearchText.text != "" ? SubEntries : Entries);
|
||||
Clear();
|
||||
PageText.text = "";
|
||||
((Text)PageText.placeholder).text = $"{currentPage + 1} / {totalPage}";
|
||||
var start = ShowCount * index;
|
||||
for (int i = 0;i< ShowCount; i++)
|
||||
{
|
||||
if (start + i >= Entries.Count) break;
|
||||
var entry = Entries[start + i];
|
||||
if (start + i >= entries.Count) break;
|
||||
var entry = entries[start + i];
|
||||
var container = Instantiate(ContainerPrefab, ScrollRect.content).GetComponent<UmaUIContainer>();
|
||||
container.Name = container.name = entry.Name;
|
||||
if (entry.FontSize > 0)
|
||||
@@ -76,8 +86,30 @@ public class PageManager : MonoBehaviour
|
||||
LoadPage(currentPage);
|
||||
}
|
||||
|
||||
private void Clear()
|
||||
public void OnSearch(string val)
|
||||
{
|
||||
Clear();
|
||||
if (Entries == null) return;
|
||||
if(val == "")
|
||||
{
|
||||
Initialize(Entries, ScrollRect);
|
||||
}
|
||||
else
|
||||
{
|
||||
SubEntries = new List<Entry>(Entries.Where(a => a.Name.Contains(val)));
|
||||
ShowCount = Mathf.FloorToInt(ScrollRect.GetComponent<RectTransform>().rect.height / ContainerPrefab.GetComponent<RectTransform>().rect.height);
|
||||
totalPage = Mathf.CeilToInt(SubEntries.Count / (float)ShowCount);
|
||||
if (totalPage > 0)
|
||||
{
|
||||
currentPage = 0;
|
||||
LoadPage(currentPage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
if (!ScrollRect) return;
|
||||
for (int i = ScrollRect.content.childCount - 1; i >= 0; i--)
|
||||
{
|
||||
Destroy(ScrollRect.content.GetChild(i).gameObject);
|
||||
|
||||
@@ -441,6 +441,13 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
}
|
||||
|
||||
CurrentUMAContainer.MergeModel();
|
||||
var matList = new List<MeshRenderer>(CurrentUMAContainer.GetComponentsInChildren<MeshRenderer>());
|
||||
var eyemat = matList.FirstOrDefault(a => a.gameObject.name.Equals("M_Eye"));
|
||||
var mouthmat = matList.FirstOrDefault(a => a.gameObject.name.Equals("M_Mouth"));
|
||||
var eyebrowLmat = matList.FirstOrDefault(a => a.gameObject.name.Equals("M_Mayu_L"));
|
||||
var eyebrowRmat = matList.FirstOrDefault(a => a.gameObject.name.Equals("M_Mayu_R"));
|
||||
UI.LoadFacialPanelsMini(eyemat.material, eyebrowLmat.material, eyebrowRmat.material, mouthmat.material);
|
||||
LoadAsset(UmaViewerMain.Instance.AbMotions.FirstOrDefault(a => a.Name.EndsWith($"anm_min_eve_chr{id}_00_idle01_loop")));
|
||||
}
|
||||
|
||||
public void LoadProp(UmaDatabaseEntry entry)
|
||||
@@ -463,7 +470,6 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
CurrentLiveContainer = new GameObject(Path.GetFileName(asset.Name)).AddComponent<UmaContainer>();
|
||||
RecursiveLoadAsset(asset);
|
||||
RecursiveLoadAsset(BGasset);
|
||||
|
||||
}
|
||||
|
||||
//Use CriWare Library
|
||||
@@ -511,19 +517,10 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
//Use decrypt function
|
||||
public void LoadLiveSound(int songid, UmaDatabaseEntry SongAwb)
|
||||
{
|
||||
if (CurrentAudioSources.Count > 0)
|
||||
{
|
||||
var tmp = CurrentAudioSources[0];
|
||||
CurrentAudioSources.Clear();
|
||||
Destroy(tmp.gameObject);
|
||||
UI.ResetAudioPlayer();
|
||||
}
|
||||
|
||||
foreach (AudioClip clip in LoadAudio(SongAwb))
|
||||
{
|
||||
AddAudioSource(clip);
|
||||
}
|
||||
//load character voice
|
||||
PlaySound(SongAwb);
|
||||
|
||||
//load BG
|
||||
string nameVar = $"snd_bgm_live_{songid}_oke";
|
||||
UmaDatabaseEntry BGawb = Main.AbList.FirstOrDefault(a => a.Name.Contains(nameVar) && a.Name.EndsWith("awb"));
|
||||
if (BGawb != null)
|
||||
@@ -538,6 +535,29 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
LoadLiveLyrics(songid);
|
||||
}
|
||||
|
||||
public void PlaySound(UmaDatabaseEntry SongAwb, int subindex = -1)
|
||||
{
|
||||
if (CurrentAudioSources.Count > 0)
|
||||
{
|
||||
var tmp = CurrentAudioSources[0];
|
||||
CurrentAudioSources.Clear();
|
||||
Destroy(tmp.gameObject);
|
||||
UI.ResetAudioPlayer();
|
||||
}
|
||||
if(subindex == -1)
|
||||
{
|
||||
foreach (AudioClip clip in LoadAudio(SongAwb))
|
||||
{
|
||||
AddAudioSource(clip);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
AddAudioSource(LoadAudio(SongAwb)[subindex]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void AddAudioSource(AudioClip clip)
|
||||
{
|
||||
AudioSource source;
|
||||
|
||||
+129
-37
@@ -1,4 +1,5 @@
|
||||
using Gallop;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
@@ -44,6 +45,9 @@ public class UmaViewerUI : MonoBehaviour
|
||||
public ScrollRect LiveList;
|
||||
public ScrollRect LiveSoundList;
|
||||
public ScrollRect LiveCharaSoundList;
|
||||
public ScrollRect NormalSoundList;
|
||||
public ScrollRect NormalSubSoundList;
|
||||
public PageManager NormalSoundCtrl;
|
||||
|
||||
[Header("audio")]
|
||||
public Slider AudioSlider;
|
||||
@@ -158,10 +162,15 @@ public class UmaViewerUI : MonoBehaviour
|
||||
|
||||
public void LoadedAssetsAdd(UmaDatabaseEntry entry)
|
||||
{
|
||||
foreach (UmaUIContainer ui in LoadedAssetsPanel.GetComponentsInChildren<UmaUIContainer>())
|
||||
{
|
||||
if (ui.Name == Path.GetFileName(entry.Name)) return;
|
||||
}
|
||||
|
||||
LoadedAssetCount++;
|
||||
string filePath = entry.FilePath;
|
||||
var container = Instantiate(UmaContainerAssetsPrefab, LoadedAssetsPanel).GetComponent<UmaUIContainer>();
|
||||
container.Name = Path.GetFileName(entry.Name) + "\n" + entry.Url;
|
||||
container.Name = Path.GetFileName(entry.Name);
|
||||
container.Button.onClick.AddListener(() => {Process.Start("explorer.exe", "/select," + filePath);});
|
||||
LoadedAssetsPanel.sizeDelta = new Vector2(0, LoadedAssetCount * 35);
|
||||
}
|
||||
@@ -224,6 +233,46 @@ public class UmaViewerUI : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public void LoadMiniModelPanels()
|
||||
{
|
||||
var container1 = Instantiate(UmaContainerPrefab, MiniAnimationSetList.content).GetComponent<UmaUIContainer>();
|
||||
container1.Name = container1.name = "General";
|
||||
container1.Button.onClick.AddListener(() => {
|
||||
HighlightChildImage(MiniAnimationSetList.content, container1);
|
||||
ListAnimations(-1, true);
|
||||
});
|
||||
|
||||
foreach (var chara in Main.Characters.OrderBy(c => c.Id))
|
||||
{
|
||||
var charaInstance = chara;
|
||||
var container2 = Instantiate(UmaContainerPrefab, MiniCharactersList.content).GetComponent<UmaUIContainer>();
|
||||
container2.Name = container2.name = chara.Id + " " + chara.Name;
|
||||
container2.Button.onClick.AddListener(() => {
|
||||
HighlightChildImage(MiniCharactersList.content, container2);
|
||||
ListCostumes(charaInstance.Id, true);
|
||||
});
|
||||
|
||||
if (chara.Icon)
|
||||
{
|
||||
container2.Image.sprite = chara.Icon;
|
||||
container2.Image.enabled = true;
|
||||
}
|
||||
|
||||
var container3 = Instantiate(UmaContainerPrefab, MiniAnimationSetList.content).GetComponent<UmaUIContainer>();
|
||||
container3.Name = container3.name = chara.Id + " " + chara.Name;
|
||||
container3.Button.onClick.AddListener(() => {
|
||||
HighlightChildImage(MiniAnimationSetList.content, container3);
|
||||
ListAnimations(charaInstance.Id, true);
|
||||
});
|
||||
|
||||
if (chara.Icon)
|
||||
{
|
||||
container3.Image.sprite = chara.Icon;
|
||||
container3.Image.enabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void InstantiateFacialPart(GameObject UmaContainerSliderPrefab, FaceDrivenKeyTarget target, List<FacialMorph> targetMorph, ScrollRect TargetList)
|
||||
{
|
||||
foreach (FacialMorph morph in targetMorph)
|
||||
@@ -310,8 +359,53 @@ public class UmaViewerUI : MonoBehaviour
|
||||
InstantiateFacialPart(UmaContainerSliderPrefab, target, targetMorph, OtherList);
|
||||
}
|
||||
|
||||
public void LoadFacialPanelsMini(Material Eye, Material MayuL, Material MayuR, Material Mouth)
|
||||
{
|
||||
currentFaceDrivenKeyTarget = null;
|
||||
foreach (UmaUIContainer ui in FacialList.GetComponentsInChildren<UmaUIContainer>(true))
|
||||
{
|
||||
Destroy(ui.gameObject);
|
||||
}
|
||||
|
||||
var action = new Action<ScrollRect, string, Material, int>((list, name, mat, type) =>
|
||||
{
|
||||
if (mat == null) return;
|
||||
var container = Instantiate(UmaContainerSliderPrefab, list.content).GetComponent<UmaUIContainer>();
|
||||
container.Name = name;
|
||||
container.Slider.wholeNumbers = true;
|
||||
container.Slider.value = 0;
|
||||
container.Slider.maxValue = 15;
|
||||
container.Slider.minValue = 0;
|
||||
container.Slider.onValueChanged.AddListener((a) =>
|
||||
{
|
||||
var val = Convert.ToInt32(a);
|
||||
if (type == 0)
|
||||
{
|
||||
mat.mainTextureOffset = new Vector2(0.25f * (val % 4), -0.25f * (val / 4));
|
||||
}
|
||||
else if(type == 1)
|
||||
{
|
||||
var vector = mat.GetVector("_UVOffset");
|
||||
mat.SetVector("_UVOffset", new Vector4(0.25f * (val % 4), -0.25f * (val / 4), vector.z, vector.w));
|
||||
}
|
||||
else if(type == 2)
|
||||
{
|
||||
var vector = mat.GetVector("_UVOffset");
|
||||
mat.SetVector("_UVOffset", new Vector4(vector.x, vector.y, 0.25f * (val % 4), -0.25f * (val / 4)));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
action(EyeList, "Eye_L_Select", Eye, 2);
|
||||
action(EyeList, "Eye_R_Select", Eye, 1);
|
||||
action(MouthList, "Mouth_Select", Mouth, 0);
|
||||
action(EyeBrowList, "Mayu_L_Select", MayuL, 0);
|
||||
action(EyeBrowList, "Mayu_R_Select", MayuR, 0);
|
||||
}
|
||||
|
||||
public void UpdateFacialPanels()
|
||||
{
|
||||
if(currentFaceDrivenKeyTarget)
|
||||
LoadFacialPanels(currentFaceDrivenKeyTarget);
|
||||
}
|
||||
|
||||
@@ -364,46 +458,24 @@ public class UmaViewerUI : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public void LoadMiniModelPanels()
|
||||
public void LoadNormalSoundPanels()
|
||||
{
|
||||
var container1 = Instantiate(UmaContainerPrefab, MiniAnimationSetList.content).GetComponent<UmaUIContainer>();
|
||||
container1.Name = container1.name = "General";
|
||||
container1.Button.onClick.AddListener(() => {
|
||||
HighlightChildImage(MiniAnimationSetList.content, container1);
|
||||
ListAnimations(-1, true);
|
||||
});
|
||||
|
||||
foreach (var chara in Main.Characters.OrderBy(c => c.Id))
|
||||
NormalSoundCtrl.Clear();
|
||||
var pageentrys = new List<PageManager.Entry>();
|
||||
foreach (var entry in Main.AbSounds.Where(a => (!a.Name.Contains("live")) && a.Name.EndsWith("awb")))
|
||||
{
|
||||
var charaInstance = chara;
|
||||
var container2 = Instantiate(UmaContainerPrefab, MiniCharactersList.content).GetComponent<UmaUIContainer>();
|
||||
container2.Name = container2.name = chara.Id + " " + chara.Name;
|
||||
container2.Button.onClick.AddListener(() => {
|
||||
HighlightChildImage(MiniCharactersList.content, container2);
|
||||
ListCostumes(charaInstance.Id, true);
|
||||
});
|
||||
|
||||
if (chara.Icon)
|
||||
var pageentry = new PageManager.Entry();
|
||||
pageentry.Name = Path.GetFileNameWithoutExtension(entry.Name);
|
||||
pageentry.OnClick = (container) =>
|
||||
{
|
||||
container2.Image.sprite = chara.Icon;
|
||||
container2.Image.enabled = true;
|
||||
}
|
||||
|
||||
var container3 = Instantiate(UmaContainerPrefab, MiniAnimationSetList.content).GetComponent<UmaUIContainer>();
|
||||
container3.Name = container3.name = chara.Id + " " + chara.Name;
|
||||
container3.Button.onClick.AddListener(() => {
|
||||
HighlightChildImage(MiniAnimationSetList.content, container3);
|
||||
ListAnimations(charaInstance.Id, true);
|
||||
});
|
||||
|
||||
if (chara.Icon)
|
||||
{
|
||||
container3.Image.sprite = chara.Icon;
|
||||
container3.Image.enabled = true;
|
||||
}
|
||||
HighlightChildImage(NormalSoundList.content, container);
|
||||
ListNormalSubSounds(entry);
|
||||
};
|
||||
pageentrys.Add(pageentry);
|
||||
}
|
||||
NormalSoundCtrl.Initialize(pageentrys, NormalSoundList);
|
||||
}
|
||||
|
||||
|
||||
public void LoadPropPanel()
|
||||
{
|
||||
var pageentrys = new List<PageManager.Entry>();
|
||||
@@ -500,7 +572,7 @@ public class UmaViewerUI : MonoBehaviour
|
||||
Destroy(LiveCharaSoundList.content.GetChild(i).gameObject);
|
||||
}
|
||||
string nameVar = $"snd_bgm_live_{songid}_chara";
|
||||
foreach (var entry in Main.AbList.Where(a => a.Name.Contains(nameVar) && a.Name.EndsWith("awb")))
|
||||
foreach (var entry in Main.AbSounds.Where(a => a.Name.Contains(nameVar) && a.Name.EndsWith("awb")))
|
||||
{
|
||||
var container = Instantiate(UmaContainerPrefab, LiveCharaSoundList.content).GetComponent<UmaUIContainer>();
|
||||
string[] split = Path.GetFileNameWithoutExtension(entry.Name).Split('_');
|
||||
@@ -529,6 +601,26 @@ public class UmaViewerUI : MonoBehaviour
|
||||
|
||||
}
|
||||
|
||||
void ListNormalSubSounds(UmaDatabaseEntry awb)
|
||||
{
|
||||
for (int i = NormalSubSoundList.content.childCount - 1; i >= 0; i--)
|
||||
{
|
||||
Destroy(NormalSubSoundList.content.GetChild(i).gameObject);
|
||||
}
|
||||
|
||||
var subSounds = Builder.LoadAudio(awb);
|
||||
|
||||
foreach(var sound in subSounds)
|
||||
{
|
||||
var container = Instantiate(UmaContainerPrefab, NormalSubSoundList.content).GetComponent<UmaUIContainer>();
|
||||
container.Name = $"Clip_{subSounds.IndexOf(sound)}";
|
||||
container.Button.onClick.AddListener(() => {
|
||||
HighlightChildImage(NormalSubSoundList.content, container);
|
||||
Builder.PlaySound(awb, subSounds.IndexOf(sound));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void ListAnimations(int umaId, bool mini)
|
||||
{
|
||||
ScrollRect animationList = mini ? MiniAnimationList : AnimationList;
|
||||
|
||||
Reference in New Issue
Block a user