按钮文字根据考试模式不同而修改

This commit is contained in:
liuyu 2024-09-16 17:23:44 +08:00
parent 46eada3783
commit 46dc2b5829
6 changed files with 358 additions and 58 deletions

File diff suppressed because one or more lines are too long

View File

@ -114,12 +114,12 @@ Material:
- _UVSec: 0
- _ZWrite: 1
- __dirty: 0
- _step_p1: 1
- _step_p2: 1
- _step_p3: 1
- _step_p4: 1
- _step_p5: 1
- _step_p6: 1
- _step_p1: 0
- _step_p2: 0
- _step_p3: 0
- _step_p4: 0
- _step_p5: 0
- _step_p6: 0
m_Colors:
- _BaseCol: {r: 0.23429155, g: 0.28497556, b: 0.3679245, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 1}

View File

@ -2030,6 +2030,10 @@ PrefabInstance:
propertyPath: m_SizeDelta.y
value: -17
objectReference: {fileID: 0}
- target: {fileID: 2200948189739447973, guid: fa12b84946083d14cb4447029910be28, type: 3}
propertyPath: m_Sprite
value:
objectReference: {fileID: 21300000, guid: 51f8b55d7e3f6224a9a5651dd3a9b702, type: 3}
- target: {fileID: 2362392151907540215, guid: fa12b84946083d14cb4447029910be28, type: 3}
propertyPath: m_AnchoredPosition.x
value: -96.2
@ -2692,6 +2696,9 @@ PrefabInstance:
- targetCorrespondingSourceObject: {fileID: 3872295731099453067, guid: fa12b84946083d14cb4447029910be28, type: 3}
insertIndex: -1
addedObject: {fileID: 1382749199}
- targetCorrespondingSourceObject: {fileID: 5439446738207451450, guid: fa12b84946083d14cb4447029910be28, type: 3}
insertIndex: -1
addedObject: {fileID: 501902162}
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 6026879024415736155, guid: fa12b84946083d14cb4447029910be28, type: 3}
insertIndex: -1
@ -5405,6 +5412,140 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 474458426}
m_CullTransparentMesh: 1
--- !u!1 &501902161
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 501902162}
- component: {fileID: 501902164}
- component: {fileID: 501902163}
m_Layer: 0
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &501902162
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 501902161}
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: []
m_Father: {fileID: 1406223274}
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.6}
m_SizeDelta: {x: 60, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &501902163
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 501902161}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: "\u4EA4\u5377"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 703c5bf45144ac448a6d18fc3c044972, type: 2}
m_sharedMaterial: {fileID: -8603090892031157933, guid: 703c5bf45144ac448a6d18fc3c044972, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 15
m_fontSizeBase: 15
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &501902164
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 501902161}
m_CullTransparentMesh: 1
--- !u!1 &503426990
GameObject:
m_ObjectHideFlags: 0
@ -16184,13 +16325,19 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1406223268}
m_Enabled: 0
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 29a20ca670e09c849b79bec899abeb97, type: 3}
m_Name:
m_EditorClassIdentifier:
CompleteOverComponent: {fileID: 1847624254}
SubmitPlane: {fileID: 752036139}
submitBtnText: {fileID: 501902163}
--- !u!224 &1406223274 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 5439446738207451450, guid: fa12b84946083d14cb4447029910be28, type: 3}
m_PrefabInstance: {fileID: 191666367}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1420796210
GameObject:
m_ObjectHideFlags: 0

View File

@ -6,11 +6,14 @@ using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SocialPlatforms.Impl;
using UnityEngine.UI;
using TMPro;
public class SubmitBtn : MonoBehaviour
{
public CompleteOverComponent CompleteOverComponent;
public GameObject SubmitPlane;
public TMP_Text submitBtnText;
public void PressSubmitBtn()
{
@ -39,4 +42,13 @@ public class SubmitBtn : MonoBehaviour
{
}
private void OnEnable()
{
Button btn = GetComponent<Button>();
if (MotionEngine.GetModule<DataConfigManager>().GetProcessMode() == ProcessMode.Assessment)
submitBtnText.text = "½»¾í";
else if (MotionEngine.GetModule<DataConfigManager>().GetProcessMode() == ProcessMode.Practice)
submitBtnText.text = "Ìá½»";
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

View File

@ -0,0 +1,114 @@
fileFormatVersion: 2
guid: 51f8b55d7e3f6224a9a5651dd3a9b702
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant: