finishing up, probably one more commit after this

* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
This commit is contained in:
AstrlJelly 2024-02-21 15:08:55 -05:00
parent b31dd2af18
commit 1a1ae0135d
12 changed files with 745 additions and 156 deletions

View file

@ -408,6 +408,83 @@ MonoBehaviour:
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &863162242872348953
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 70218190515061869}
- component: {fileID: 2397546323903246789}
- component: {fileID: 270583393365375632}
m_Layer: 5
m_Name: Background
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &70218190515061869
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 863162242872348953}
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: 3626854700525452482}
m_Father: {fileID: 3713617371011422720}
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: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2397546323903246789
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 863162242872348953}
m_CullTransparentMesh: 1
--- !u!114 &270583393365375632
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 863162242872348953}
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: 10905, 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!1 &1684521149580031745
GameObject:
m_ObjectHideFlags: 0
@ -686,6 +763,82 @@ MonoBehaviour:
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &3224038483302325344
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3626854700525452482}
- component: {fileID: 39173384694347793}
- component: {fileID: 4934875251544913604}
m_Layer: 5
m_Name: Checkmark
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3626854700525452482
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3224038483302325344}
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: 70218190515061869}
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: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &39173384694347793
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3224038483302325344}
m_CullTransparentMesh: 1
--- !u!114 &4934875251544913604
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3224038483302325344}
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: 10901, guid: 0000000000000000f000000000000000, type: 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
--- !u!1 &3395407686526024338
GameObject:
m_ObjectHideFlags: 0
@ -961,6 +1114,104 @@ MonoBehaviour:
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &4351615617897515619
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3713617371011422720}
- component: {fileID: 6555551389195548591}
m_Layer: 5
m_Name: Toggle
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3713617371011422720
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4351615617897515619}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.0001401, y: 1.0001401, z: 1.0001401}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 70218190515061869}
m_Father: {fileID: 9050564098627936470}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 30, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &6555551389195548591
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4351615617897515619}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, 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: 1
m_TargetGraphic: {fileID: 270583393365375632}
toggleTransition: 1
graphic: {fileID: 4934875251544913604}
m_Group: {fileID: 0}
onValueChanged:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 9208581106079180837}
m_TargetAssemblyTypeName: HeavenStudio.Editor.EditorSettings, Assembly-CSharp
m_MethodName: OnParamTooltipsChanged
m_Mode: 1
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_IsOn: 0
--- !u!1 &4483555756327182171
GameObject:
m_ObjectHideFlags: 0
@ -1095,6 +1346,143 @@ MonoBehaviour:
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &5329154389827118254
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6260773680724321646}
- component: {fileID: 3785242586769301177}
- component: {fileID: 2185037685709737411}
m_Layer: 5
m_Name: NobodyKnowsAboutTooltips
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6260773680724321646
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5329154389827118254}
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: 6759422526285834496}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: -42}
m_SizeDelta: {x: 320, y: 30}
m_Pivot: {x: 0, y: 0.5}
--- !u!222 &3785242586769301177
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5329154389827118254}
m_CullTransparentMesh: 1
--- !u!114 &2185037685709737411
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5329154389827118254}
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: (Tooltips are also shown in the bottom left!)
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8597c35f18a008c428fc5870aec75766, type: 2}
m_sharedMaterial: {fileID: -6562250930271150993, guid: 8597c35f18a008c428fc5870aec75766, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 3372220415
m_fontColor: {r: 1, g: 1, b: 1, a: 0.78431374}
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: 16
m_fontSizeBase: 16
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 3
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 1
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_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 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: -32.879974, 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!1 &5433741745970652310
GameObject:
m_ObjectHideFlags: 0
@ -1171,6 +1559,146 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &5932184449535986015
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6759422526285834496}
- component: {fileID: 5675444074515228774}
- component: {fileID: 5450885653198953858}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6759422526285834496
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5932184449535986015}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.0000798, y: 1.0000798, z: 1.0000798}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 6260773680724321646}
m_Father: {fileID: 9050564098627936470}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 376, y: 30}
m_Pivot: {x: 0, y: 0.5}
--- !u!222 &5675444074515228774
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5932184449535986015}
m_CullTransparentMesh: 1
--- !u!114 &5450885653198953858
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5932184449535986015}
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: 'Show Param Tooltips
'
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8597c35f18a008c428fc5870aec75766, type: 2}
m_sharedMaterial: {fileID: -6562250930271150993, guid: 8597c35f18a008c428fc5870aec75766, 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: 32
m_fontSizeBase: 32
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 3
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 1
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_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 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!1 &6125627487853319211
GameObject:
m_ObjectHideFlags: 0
@ -1556,6 +2084,71 @@ MonoBehaviour:
m_BoolArgument: 0
m_CallState: 2
m_IsOn: 0
--- !u!1 &7300495050280150307
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9050564098627936470}
- component: {fileID: 7071483942832213879}
m_Layer: 5
m_Name: ParamTooltips
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &9050564098627936470
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7300495050280150307}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.99994, y: 0.99994, z: 0.99994}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 6759422526285834496}
- {fileID: 3713617371011422720}
m_Father: {fileID: 9208581106298752703}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 1165, y: 72}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &7071483942832213879
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7300495050280150307}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 10
m_Bottom: 10
m_ChildAlignment: 0
m_Spacing: 10
m_ChildForceExpandWidth: 0
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 0
m_ChildControlHeight: 0
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!1 &7720499959914799361
GameObject:
m_ObjectHideFlags: 0
@ -2041,6 +2634,7 @@ MonoBehaviour:
editorScaleDecre: {fileID: 6127870905162584076}
editorScaleIncre: {fileID: 383095155661938755}
scaleWSS: {fileID: 1122327647812458447}
paramTooltipsToggle: {fileID: 6555551389195548591}
--- !u!1 &9208581106298752702
GameObject:
m_ObjectHideFlags: 0
@ -2075,6 +2669,7 @@ RectTransform:
- {fileID: 14539832792667216}
- {fileID: 6652101627242449918}
- {fileID: 3382107506031419457}
- {fileID: 9050564098627936470}
m_Father: {fileID: 9208581106987031240}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

View file

@ -889,10 +889,10 @@ RectTransform:
m_Father: {fileID: 5256356839309956323}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 291, y: -30}
m_SizeDelta: {x: 566, y: 50}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &519242634654431636
GameObject:
@ -1547,10 +1547,10 @@ RectTransform:
m_Father: {fileID: 5256356839309956323}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 291, y: -130}
m_SizeDelta: {x: 566, y: 50}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &922889753386770700
CanvasRenderer:
@ -1786,9 +1786,9 @@ RectTransform:
m_Father: {fileID: 2767567597670246615}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 548, y: -25}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 48, y: 48}
m_Pivot: {x: 1, y: 0.5}
--- !u!222 &3651870985898615951
@ -2571,8 +2571,8 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 5724386541704624271}
m_HandleRect: {fileID: 1751651485190533021}
m_Direction: 2
m_Value: 0
m_Size: 1
m_Value: 1
m_Size: 0.9369128
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
@ -4892,10 +4892,10 @@ RectTransform:
m_Father: {fileID: 5256356839309956323}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 291, y: -80}
m_SizeDelta: {x: 566, y: 50}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3713167126177139283
CanvasRenderer:
@ -4940,9 +4940,9 @@ RectTransform:
m_Father: {fileID: 2767567597670246615}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 466, y: -25}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 48, y: 48}
m_Pivot: {x: 1, y: 0.5}
--- !u!222 &935689930248897750
@ -6790,10 +6790,10 @@ RectTransform:
m_Father: {fileID: 5256356839309956323}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 291, y: -230}
m_SizeDelta: {x: 566, y: 50}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &9010809872578740536
CanvasRenderer:
@ -10573,9 +10573,9 @@ RectTransform:
m_Father: {fileID: 2767567597670246615}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 192, y: -25}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 384, y: 48}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3760793126016089696
@ -14092,10 +14092,10 @@ RectTransform:
m_Father: {fileID: 5256356839309956323}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 291, y: -180}
m_SizeDelta: {x: 566, y: 50}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8096023217859052254
CanvasRenderer:

View file

@ -4329,7 +4329,7 @@ GameObject:
- component: {fileID: 151438064}
- component: {fileID: 151438066}
- component: {fileID: 151438065}
m_Layer: 5
m_Layer: 3
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
@ -4376,7 +4376,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: New Text
m_text: Tooltip here
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 78e7291cdeccdfc4fa61249845605144, type: 2}
m_sharedMaterial: {fileID: 5250768452915780979, guid: 78e7291cdeccdfc4fa61249845605144, type: 2}
@ -24624,7 +24624,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 1589389271}
m_Direction: 2
m_Value: 1
m_Size: 0.9971497
m_Size: 0.9897467
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
@ -29055,7 +29055,7 @@ GameObject:
- component: {fileID: 1090036110}
- component: {fileID: 1090036111}
- component: {fileID: 1090036112}
m_Layer: 5
m_Layer: 3
m_Name: Tooltip
m_TagString: Untagged
m_Icon: {fileID: 0}
@ -29081,7 +29081,7 @@ RectTransform:
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_AnchoredPosition: {x: 800, y: 120}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!114 &1090036111
@ -30367,7 +30367,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 0, y: 121.10164}
m_AnchoredPosition: {x: 0, y: 121.101654}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 1}
--- !u!222 &1154875945
@ -39325,7 +39325,7 @@ GameObject:
- component: {fileID: 1585542810}
- component: {fileID: 1585542812}
- component: {fileID: 1585542811}
m_Layer: 5
m_Layer: 3
m_Name: BG
m_TagString: Untagged
m_Icon: {fileID: 0}

View file

@ -622,6 +622,7 @@ namespace HeavenStudio
public static void PlaySFXArbitrary(double beat, string game, string name, float pitch, float offset)
{
if (string.IsNullOrEmpty(game) || string.IsNullOrEmpty(name)) return;
if (string.IsNullOrEmpty(game)) {
SoundByte.PlayOneShot(name, beat, pitch, offset: offset);
} else {

View file

@ -9,12 +9,9 @@ namespace HeavenStudio.Games
public class SoundEffects : MonoBehaviour
{
public enum CountNumbers { One, Two, Three, Four }
// public readonly static string[] countNames = { "one", "two", "one", "two", "three", "four" };
public readonly static string[] countNames = { "one", "two", "one", "two", "three", "four" };
public readonly static float[] timings = { 0f, 2f, 4f, 5f, 6f, 7f };
public static void Count(int type, bool alt)
{
SoundByte.PlayOneShot("count-ins/" + countNames[type] + (!alt ? "1" : "2"));
}
public enum CountInType { Normal, Alt, Cowbell }
public static string GetCountInSound(int type)
@ -28,7 +25,7 @@ namespace HeavenStudio.Games
public static void PreloadCounts()
{
foreach (var load in new string[] { "one", "two", "three", "four", "cowbell", "ready1", "ready2" })
foreach (string load in new string[] { "one", "two", "three", "four", "cowbell", "ready1", "ready2" })
{
SoundByte.PreloadAudioClipAsync(load);
}
@ -75,6 +72,11 @@ namespace HeavenStudio.Games
MultiSound.Play(sfx, false);
}
public static void Count(int type, bool alt)
{
SoundByte.PlayOneShot("count-ins/" + (CountNumbers)type + (!alt ? "1" : "2"));
}
public static void Cowbell()
{
SoundByte.PlayOneShot("count-ins/cowbell");

View file

@ -6,6 +6,7 @@ using Jukebox;
using System.Linq;
using System;
using static HeavenStudio.EntityTypes;
using HeavenStudio.Common;
namespace HeavenStudio.Editor
{
@ -145,7 +146,12 @@ namespace HeavenStudio.Editor
input.transform.localScale = Vector3.one;
if (tooltip != string.Empty) {
Tooltip.AddTooltip(input, tooltip);
Debug.Log(PersistentDataManager.gameSettings.showParamTooltips);
if (PersistentDataManager.gameSettings.showParamTooltips) {
Tooltip.AddTooltip(input, tooltip);
} else {
Tooltip.AddTooltip(input, "", tooltip);
}
}
EventPropertyPrefab property = input.GetComponent<EventPropertyPrefab>();

View file

@ -26,17 +26,17 @@ namespace HeavenStudio.Editor
{
base.SetProperties(propertyName, type, caption);
RiqEntity entity = parameterManager.entity;
int selected = 0;
switch (type)
{
case EntityTypes.Dropdown dropdownEntity:
// entity[propertyName].ChangeValues(dropdownEntity.Values);
selected = entity[propertyName].currentIndex;
if (dropdownEntity.Values != null) dropdown.AddOptions(entity[propertyName].Values);
dropdown.onValueChanged.AddListener(newVal => parameterManager.entity[propertyName].currentIndex = newVal);
entity[propertyName].onValueChanged = new Action<List<string>>(newValues =>
EntityTypes.DropdownObj dropdownObj = entity[propertyName];
selected = dropdownObj.currentIndex;
dropdown.AddOptions(dropdownObj.Values);
dropdown.onValueChanged.AddListener(newVal => dropdownObj.currentIndex = newVal);
dropdownObj.onValueChanged = new Action<List<string>>(newValues =>
{
if (dropdown == null) return;
dropdown.ClearOptions();
@ -50,7 +50,7 @@ namespace HeavenStudio.Editor
selected = Array.FindIndex(keys, val => val == (int)entity[propertyName]);
dropdown.AddOptions(Enum.GetNames(enumType).ToList());
dropdown.onValueChanged.AddListener(val => parameterManager.entity[propertyName] = keys[val]);
dropdown.onValueChanged.AddListener(val => entity[propertyName] = keys[val]);
break;
default:
break;

View file

@ -888,26 +888,18 @@ namespace HeavenStudio.Editor.Track
{
for (int i = 0; i < ep.Count; i++)
{
object returnVal = ep[i].parameter;
object returnVal = ep[i].parameter switch {
EntityTypes.Integer intVal => intVal.val,
EntityTypes.Float floatVal => floatVal.val,
EntityTypes.Button buttonVal => buttonVal.label,
EntityTypes.Dropdown ddVal => new EntityTypes.DropdownObj(ddVal.defaultValue, ddVal.values),
_ => ep[i].parameter,
};
if (returnVal is EntityTypes.Integer intVal)
{
returnVal = intVal.val;
}
else if (returnVal is EntityTypes.Float floatVal)
{
returnVal = floatVal.val;
}
else if (returnVal is EntityTypes.Button buttonVal)
{
returnVal = buttonVal.label;
}
else if (returnVal.GetType().IsEnum)
{
if (returnVal.GetType().IsEnum) {
returnVal = (int)ep[i].parameter;
}
//tempEntity[ep[i].propertyName] = returnVal;
tempEntity.CreateProperty(ep[i].propertyName, returnVal);
}
}

View file

@ -1128,7 +1128,7 @@ namespace HeavenStudio
new("xEnd", new EntityTypes.Float(1, 100, 1), "End Horizontal Tiles", "Set the amount of horizontal tiles at the end of the event."),
new("yStart", new EntityTypes.Float(1, 100, 1), "Start Vertical Tiles", "Set the amount of vertical tiles at the start of the event."),
new("yEnd", new EntityTypes.Float(1, 100, 1), "End Vertical Tiles", "Set the amount of vertical tiles at the end of the event."),
new Param("axis", StaticCamera.ViewAxis.All, "Axis", "Set if only a specific axis should be modified."),
new("axis", StaticCamera.ViewAxis.All, "Axis", "Set if only a specific axis should be modified."),
new("ease", Util.EasingFunction.Ease.Linear, "Ease", "Set the easing of the action.", new()
{
new((x, y) => (Util.EasingFunction.Ease)x != Util.EasingFunction.Ease.Instant, new string[] { "xStart", "yStart" })
@ -1144,7 +1144,7 @@ namespace HeavenStudio
new("xScrollEnd", new EntityTypes.Float(-100, 100, 0), "End Horizontal Scroll", "Set the horizontal scroll at the end of the event."),
new("yScrollStart", new EntityTypes.Float(-100, 100, 0), "Start Vertical Scroll", "Set the vertical scroll at the start of the event."),
new("yScrollEnd", new EntityTypes.Float(-100, 100, 0), "End Vertical Scroll", "Set the vertical scroll at the end of the event."),
new Param("axis", StaticCamera.ViewAxis.All, "Axis", "Set if only a specific axis should be modified."),
new("axis", StaticCamera.ViewAxis.All, "Axis", "Set if only a specific axis should be modified."),
new("ease", Util.EasingFunction.Ease.Linear, "Ease", "Set the easing of the action.", new()
{
new((x, y) => (Util.EasingFunction.Ease)x != Util.EasingFunction.Ease.Instant, new string[] { "xScrollStart", "yScrollStart" })
@ -1164,7 +1164,7 @@ namespace HeavenStudio
if (game != null) {
var animators = gm.minigameObj.transform.GetComponentsInChildren<Animator>();
// not in an update loop so it's fine :3
e["animator"].ChangeValues(animators.Select(anim => {
((EntityTypes.DropdownObj)e["animator"]).SetValues(animators.Select(anim => {
var obj = anim.gameObject;
List<string> path = new() { obj.name };
while (obj.transform.parent != null && obj.transform.parent.name != game.name)
@ -1181,13 +1181,17 @@ namespace HeavenStudio
new Param("getAnimations", new EntityTypes.Button("", e => {
var gm = GameManager.instance;
Minigame game = gm.GetGameInfo(gm.currentGame);
string animPath = e["animator"].CurrentValue;
string animPath = ((EntityTypes.DropdownObj)e["animator"]).CurrentValue;
Animator animator = null;
if (animPath != null) {
var animObj = gm.minigameObj.transform.Find(animPath);
if (animObj != null && animObj.TryGetComponent(out animator) && animator != null) {
var animations = animator.runtimeAnimatorController.animationClips.Select(x => x.name).ToList();
e["animation"].ChangeValues(animations);
var animations = animator
.runtimeAnimatorController
.animationClips
.Select(x => x.name)
.ToList();
((EntityTypes.DropdownObj)e["animation"]).SetValues(animations);
}
}
return animator != null ? animator.name : "N/A";
@ -1203,24 +1207,40 @@ namespace HeavenStudio
new GameAction("play sfx", "Play SFX", 0.5f, false,
new List<Param>()
{
new Param("game", new EntityTypes.Dropdown(0), "Which Game", "Specify the game's sfx to play. An empty input will play global sfx.", new() {
new Param("game", new EntityTypes.Dropdown(), "Which Game", "Specify the game's sfx to play. An empty input will play global sfx.", new() {
new((x, e) => {
e["game"].ChangeValues(EventCaller.instance.minigames.Values.Select(x => x.displayName).ToList());
// Minigame game = eventCaller.minigames[((EntityTypes.DropdownObj)x).CurrentValue];
string gameName = ((EntityTypes.DropdownObj)e["game"]).CurrentValue;
Minigame game = eventCaller.minigames[gameName];
int startFrom = "assets/resources/sfx/".Length - 1;
foreach (var thing in game.GetCommonAssetBundle().GetAllAssetNames())
{
Debug.Log(thing);
}
List<string> clips = new() { "" };
foreach (var clip in game.GetCommonAssetBundle().GetAllAssetNames().Concat(game.GetLocalizedAssetBundle().GetAllAssetNames()))
{
string[] splitClip = clip[startFrom..].Split('/');
if (splitClip[0] == "games" && splitClip[1] == gameName) {
clips.Add(splitClip[2]);
Debug.Log(splitClip[2]);
}
}
EntityTypes.DropdownObj sfxDD = e["sfxName"];
sfxDD.SetValues(clips);
return true;
}),
}),
new Param("sfxName", "", "SFX Name", "The name of the sfx to play."),
new Param("sfxName", new EntityTypes.Dropdown(), "SFX Name", "The name of the sfx to play."),
new Param("pitch", new EntityTypes.Float(0, 5, 1), "Pitch", "The sfx's pitch."),
new Param("offset", new EntityTypes.Float(-500, 500), "Offset (ms)", "The sfx's offset in milliseconds."),
},
preFunction : delegate {
var e = eventCaller.currentEntity;
var mgs = EventCaller.instance.minigames.Values;
GameManager.PlaySFXArbitrary(e.beat, mgs.ElementAt((int)e["game"].currentIndex).name, e["sfxName"], e["pitch"], e["offset"]);
GameManager.PlaySFXArbitrary(e.beat, e["game"].CurrentValue, e["sfxName"].CurrentValue, e["pitch"], e["offset"]);
}
),
}),
};
foreach (var game in defaultGames)
@ -1229,60 +1249,9 @@ namespace HeavenStudio
}
LoadMinigames(eventCaller);
eventCaller.minigames["advanced"].actions
.Find(a => a.actionName == "play sfx").parameters[0].parameter = new EntityTypes.Dropdown(0, eventCaller.minigames.Keys.Skip(defaultGames.Count).ToArray());
}
}
}
public class EnumProcessor
{
private readonly Enum enumValue;
public EnumProcessor(Enum value)
{
if (!value.GetType().IsEnum)
{
throw new ArgumentException("Value must be an enum type.");
}
this.enumValue = value;
}
public void ProcessEnumValue()
{
Type enumType = this.enumValue.GetType().DeclaringType;
if (enumType != null)
{
Console.WriteLine("EnumType: " + enumType.Name);
}
Console.WriteLine("EnumValue: " + this.enumValue);
}
}
public class EnumExamples
{
public enum EnumExample
{
EnumValue1,
EnumValue2
}
public enum EnumAnotherExample
{
DifferentValue1,
DifferentValue2
}
public static void Main()
{
EnumProcessor processor1 = new EnumProcessor(EnumExample.EnumValue1);
EnumProcessor processor2 = new EnumProcessor(EnumAnotherExample.DifferentValue1);
// Call the method for EnumExample
processor1.ProcessEnumValue();
// Call the method for EnumAnotherExample
processor2.ProcessEnumValue();
}
}

View file

@ -29,7 +29,7 @@ namespace HeavenStudio.Common
GlobalGameManager.DEFAULT_SCREEN_SIZES[1].width,
GlobalGameManager.DEFAULT_SCREEN_SIZES[1].height,
0.8f,
512,
340,
48000,
true,
true,
@ -37,6 +37,7 @@ namespace HeavenStudio.Common
true,
false,
true,
true,
true
);
@ -119,7 +120,7 @@ namespace HeavenStudio.Common
int resolutionWidth = 1280,
int resolutionHeight = 720,
float masterVolume = 0.8f,
int dspSize = 512,
int dspSize = 340,
int sampleRate = 44100,
bool editorCursorEnable = true,
bool discordRPCEnable = true,
@ -130,7 +131,8 @@ namespace HeavenStudio.Common
bool letterboxBgEnable = true,
bool letterboxFxEnable = true,
int editorScale = 0,
bool scaleWScreenSize = false
bool scaleWScreenSize = false,
bool showParamTooltips = true
)
{
this.showSplash = showSplash;
@ -151,6 +153,7 @@ namespace HeavenStudio.Common
this.discordRPCEnable = true;
this.editorScale = editorScale;
this.scaleWScreenSize = scaleWScreenSize;
this.showParamTooltips = showParamTooltips;
this.perfectChallengeType = perfectChallengeType;
this.isMedalOn = isMedalOn;
@ -190,6 +193,8 @@ namespace HeavenStudio.Common
public bool discordRPCEnable;
public int editorScale;
public bool scaleWScreenSize;
public bool showParamTooltips;
// public bool showCornerTooltips;
// Gameplay Settings
public PerfectChallengeType perfectChallengeType;

View file

@ -8,17 +8,19 @@ namespace HeavenStudio.Editor
{
public class EditorSettings : TabsContent
{
public Toggle cursorCheckbox;
public Toggle discordRPCCheckbox;
public Button editorScaleDecre, editorScaleIncre;
public Toggle scaleWSS;
[SerializeField] Toggle cursorCheckbox;
[SerializeField] Toggle discordRPCCheckbox;
[SerializeField] Button editorScaleDecre, editorScaleIncre;
[SerializeField] Toggle scaleWSS;
[SerializeField] Toggle paramTooltipsToggle;
// [SerializeField] Toggle cornerTooltipsToggle;
private void Start()
{
cursorCheckbox.isOn = PersistentDataManager.gameSettings.editorCursorEnable;
discordRPCCheckbox.isOn = PersistentDataManager.gameSettings.discordRPCEnable;
scaleWSS.isOn = PersistentDataManager.gameSettings.scaleWScreenSize;
paramTooltipsToggle.isOn = PersistentDataManager.gameSettings.showParamTooltips;
SetDecreIncreInteractable();
}
@ -41,12 +43,7 @@ namespace HeavenStudio.Editor
public override void OnOpenTab()
{
cursorCheckbox.isOn = PersistentDataManager.gameSettings.editorCursorEnable;
discordRPCCheckbox.isOn = PersistentDataManager.gameSettings.discordRPCEnable;
scaleWSS.isOn = PersistentDataManager.gameSettings.scaleWScreenSize;
SetDecreIncreInteractable();
Start();
}
public override void OnCloseTab()
@ -59,6 +56,16 @@ namespace HeavenStudio.Editor
scaleWSS.isOn = PersistentDataManager.gameSettings.scaleWScreenSize;
}
public void OnParamTooltipsChanged()
{
PersistentDataManager.gameSettings.showParamTooltips = paramTooltipsToggle.isOn;
}
// public void OnCornerTooltipsChanged()
// {
// PersistentDataManager.gameSettings.showParamTooltips = cornerTooltipsToggle.isOn;
// }
public void OnEditorScaleDecre()
{
PersistentDataManager.gameSettings.editorScale--;

View file

@ -76,21 +76,33 @@ namespace HeavenStudio
public struct Dropdown
{
public void ChangeValues(List<string> values)
{
this.Values = values ?? new();
onValueChanged?.Invoke(values);
}
public int defaultValue;
public List<string> Values { get; private set; }
public int currentIndex;
public readonly string CurrentValue => currentIndex < Values?.Count - 1 ? Values?[currentIndex] : null;
[JsonIgnore] public Action<List<string>> onValueChanged;
public List<string> values;
public Dropdown(int defaultValue = 0, params string[] values)
{
this.defaultValue = defaultValue;
this.Values = values.ToList();
this.values = values.ToList();
}
}
public class DropdownObj
{
public void SetValues(List<string> values)
{
this.Values = values ?? new();
onValueChanged?.Invoke(values);
}
public int value;
public List<string> Values { get; private set; }
public int currentIndex;
public string CurrentValue => currentIndex < Values?.Count - 1 ? Values?[currentIndex] : null;
[JsonIgnore] public Action<List<string>> onValueChanged;
public DropdownObj(int value = 0, List<string> values = null)
{
this.value = value;
this.Values = values ?? new();
currentIndex = 0;
onValueChanged = null;