修改UI
This commit is contained in:
parent
afadc78cbc
commit
208af8eab9
@ -522,7 +522,7 @@ RectTransform:
|
|||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 7464141640143892343}
|
- {fileID: 7464141640143892343}
|
||||||
- {fileID: 3051202814640239909}
|
- {fileID: 4775158531114985421}
|
||||||
- {fileID: 642645979159612403}
|
- {fileID: 642645979159612403}
|
||||||
m_Father: {fileID: 8969698929162076767}
|
m_Father: {fileID: 8969698929162076767}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
@ -1055,7 +1055,7 @@ RectTransform:
|
|||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 6746250251467292074}
|
m_GameObject: {fileID: 6746250251467292074}
|
||||||
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_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
@ -1063,7 +1063,7 @@ RectTransform:
|
|||||||
- {fileID: 1684458048730538019}
|
- {fileID: 1684458048730538019}
|
||||||
- {fileID: 5860908020037853715}
|
- {fileID: 5860908020037853715}
|
||||||
- {fileID: 8568704472119011922}
|
- {fileID: 8568704472119011922}
|
||||||
m_Father: {fileID: 5675325337001315481}
|
m_Father: {fileID: 4775158531114985421}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
@ -1183,3 +1183,79 @@ MonoBehaviour:
|
|||||||
m_FillOrigin: 0
|
m_FillOrigin: 0
|
||||||
m_UseSpriteMesh: 0
|
m_UseSpriteMesh: 0
|
||||||
m_PixelsPerUnitMultiplier: 1
|
m_PixelsPerUnitMultiplier: 1
|
||||||
|
--- !u!1 &9141652036248099059
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4775158531114985421}
|
||||||
|
- component: {fileID: 5397078064978493576}
|
||||||
|
- component: {fileID: 6634696415031054332}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: IconBg
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &4775158531114985421
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 9141652036248099059}
|
||||||
|
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_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 3051202814640239909}
|
||||||
|
m_Father: {fileID: 5675325337001315481}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 76, y: 76}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &5397078064978493576
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 9141652036248099059}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &6634696415031054332
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 9141652036248099059}
|
||||||
|
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: 0.07058824, g: 0.15686275, b: 0.19607843, a: 1}
|
||||||
|
m_RaycastTarget: 0
|
||||||
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_Sprite: {fileID: 0}
|
||||||
|
m_Type: 0
|
||||||
|
m_PreserveAspect: 0
|
||||||
|
m_FillCenter: 1
|
||||||
|
m_FillMethod: 4
|
||||||
|
m_FillAmount: 1
|
||||||
|
m_FillClockwise: 1
|
||||||
|
m_FillOrigin: 0
|
||||||
|
m_UseSpriteMesh: 0
|
||||||
|
m_PixelsPerUnitMultiplier: 1
|
||||||
|
|||||||
@ -59,7 +59,7 @@ namespace QFramework.Example
|
|||||||
GameObject obj = GameObject.Instantiate(ItemPrefab.gameObject, Content);
|
GameObject obj = GameObject.Instantiate(ItemPrefab.gameObject, Content);
|
||||||
obj.name = item.Name;
|
obj.name = item.Name;
|
||||||
obj.transform.Find("Name").GetComponent<TextMeshProUGUI>().text = item.Name;
|
obj.transform.Find("Name").GetComponent<TextMeshProUGUI>().text = item.Name;
|
||||||
Image icon = obj.transform.Find("Icon").GetComponent<Image>();
|
Image icon = obj.transform.Find("IconBg/Icon").GetComponent<Image>();
|
||||||
var localImageUrl = Global.deviceIconsPath + item.Icon;
|
var localImageUrl = Global.deviceIconsPath + item.Icon;
|
||||||
GameObject right = icon.transform.Find("Right").gameObject;
|
GameObject right = icon.transform.Find("Right").gameObject;
|
||||||
GameObject wrong = icon.transform.Find("Wrong").gameObject;
|
GameObject wrong = icon.transform.Find("Wrong").gameObject;
|
||||||
@ -124,7 +124,7 @@ namespace QFramework.Example
|
|||||||
|
|
||||||
public void SetSelected(GameObject item, bool isRight)
|
public void SetSelected(GameObject item, bool isRight)
|
||||||
{
|
{
|
||||||
Transform icon = item.transform.Find("Icon");
|
Transform icon = item.transform.Find("IconBg/Icon");
|
||||||
GameObject right = icon.Find("Right").gameObject;
|
GameObject right = icon.Find("Right").gameObject;
|
||||||
GameObject wrong = icon.Find("Wrong").gameObject;
|
GameObject wrong = icon.Find("Wrong").gameObject;
|
||||||
GameObject Selected = icon.Find("Selected").gameObject;
|
GameObject Selected = icon.Find("Selected").gameObject;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user