Skip to content

Commit

Permalink
Compose: Fix various UI bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
0thElement committed Mar 31, 2024
1 parent d3ad123 commit 3b5b47e
Show file tree
Hide file tree
Showing 5 changed files with 195 additions and 48 deletions.
128 changes: 99 additions & 29 deletions Assets/Fonts/NotoSans-Regular SDF.asset

Large diffs are not rendered by default.

104 changes: 87 additions & 17 deletions Assets/Scenes/Compose.unity
Original file line number Diff line number Diff line change
Expand Up @@ -47884,6 +47884,9 @@ GameObject:
m_Component:
- component: {fileID: 901596585}
- component: {fileID: 901596586}
- component: {fileID: 901596587}
- component: {fileID: 901596589}
- component: {fileID: 901596588}
m_Layer: 11
m_Name: Ticks
m_TagString: Untagged
Expand Down Expand Up @@ -47929,6 +47932,56 @@ MonoBehaviour:
tickParent: {fileID: 901596585}
tickCapacity: 30
minDistBetweenTicks: 40
--- !u!114 &901596587
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 901596584}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 31a19414c41e5ae4aae2af33fee712f6, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ShowMaskGraphic: 1
--- !u!114 &901596588
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 901596584}
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, g: 0, b: 0, a: 0.011764706}
m_RaycastTarget: 1
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
--- !u!222 &901596589
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 901596584}
m_CullTransparentMesh: 0
--- !u!1 &914608940
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -49492,6 +49545,7 @@ MonoBehaviour:
type: 3}
keystrokePrefab: {fileID: 2975438318904304656, guid: a1a86b77b8407f84f8b6e7cc3807369b,
type: 3}
hintDisplay: {fileID: 1217571761}
mainDisplayRect: {fileID: 197360603}
mainDisplayOffset: 40
baseScrollSensitivity: 0.5
Expand Down Expand Up @@ -74631,8 +74685,8 @@ RectTransform:
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: 0, y: 0}
m_AnchoredPosition: {x: 181.85712, y: 0}
m_SizeDelta: {x: 363.71423, y: 0}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &1505927680
MonoBehaviour:
Expand Down Expand Up @@ -76739,8 +76793,8 @@ RectTransform:
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: 0, y: 0}
m_AnchoredPosition: {x: 215.26575, y: 0}
m_SizeDelta: {x: 276.89697, y: 0}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &1554505476
MonoBehaviour:
Expand Down Expand Up @@ -106518,7 +106572,7 @@ RectTransform:
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_SizeDelta: {x: -10, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &3061022597114176277
MonoBehaviour:
Expand All @@ -106533,14 +106587,14 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.25490198, g: 0.25490198, b: 0.25490198, a: 1}
m_Color: {r: 0.41176474, g: 0.41176474, b: 0.41176474, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 0
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
Expand Down Expand Up @@ -106888,7 +106942,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
m_AnchoredPosition: {x: 15, y: 0}
m_AnchoredPosition: {x: 20, y: 0}
m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &3061022597465563109
Expand Down Expand Up @@ -107019,7 +107073,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0.00002861023}
m_AnchoredPosition: {x: 0, y: 0.000017166138}
m_SizeDelta: {x: 0, y: 28}
m_Pivot: {x: 0.5, y: 1}
--- !u!224 &3061022598171845188
Expand Down Expand Up @@ -107291,8 +107345,8 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 10
m_fontSizeBase: 10
m_fontSize: 12
m_fontSizeBase: 12
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
Expand Down Expand Up @@ -107375,8 +107429,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 10, y: -0.5}
m_SizeDelta: {x: -40, y: -3}
m_AnchoredPosition: {x: 12.5, y: -0.5}
m_SizeDelta: {x: -45, y: -3}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &3061022598346468719 stripped
MonoBehaviour:
Expand Down Expand Up @@ -107478,7 +107532,7 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 3061022597368583082}
m_HandleRect: {fileID: 3061022597368583077}
m_Direction: 2
m_Value: 0
m_Value: 1
m_Size: 1
m_NumberOfSteps: 0
m_OnValueChanged:
Expand Down Expand Up @@ -107555,6 +107609,7 @@ GameObject:
- component: {fileID: 3061022598951181210}
- component: {fileID: 3061022598951181205}
- component: {fileID: 3061022598951181204}
- component: {fileID: 3061022598951181208}
m_Layer: 11
m_Name: Template
m_TagString: Untagged
Expand All @@ -107581,8 +107636,23 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 0, y: -15}
m_SizeDelta: {x: 40, y: 150}
m_SizeDelta: {x: 60, y: 175}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &3061022598951181208
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3061022598951181206}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e19747de3f5aca642ab2be37e372fb86, type: 3}
m_Name:
m_EditorClassIdentifier:
m_EffectColor: {r: 0.11372549, g: 0.11372549, b: 0.11372549, a: 1}
m_EffectDistance: {x: 2, y: 2}
m_UseGraphicAlpha: 1
--- !u!222 &3061022598951181210
CanvasRenderer:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -107675,7 +107745,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 20}
m_SizeDelta: {x: 0, y: 25}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1001 &4397024789603696084
PrefabInstance:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private void OpenWindow(Vector2 position, string title)
{
if (Services.Gameplay?.IsLoaded ?? false)
{
window = Services.Popups.OpenTimingGroupPicker(position, value.GroupNumber, title, this);
window = Services.Popups.OpenTimingGroupPicker(position, value?.GroupNumber, title, this);
window.OnEndEdit = OnWindow;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public class KeybindHintList : MonoBehaviour, IScrollHandler
[SerializeField] private Pool<KeybindDisplay> keybindPool;
[SerializeField] private GameObject keybindPrefab;
[SerializeField] private GameObject keystrokePrefab;
[SerializeField] private GameObject hintDisplay;
[SerializeField] private RectTransform mainDisplayRect;
[SerializeField] private float mainDisplayOffset;
[SerializeField] private float baseScrollSensitivity = 1;
Expand All @@ -27,7 +28,7 @@ public bool EnableDisplay
get => enableDisplay;
set
{
gameObject.SetActive(Settings.EnableKeybindHintDisplay.Value && value);
hintDisplay.SetActive(Settings.EnableKeybindHintDisplay.Value && value);
enableDisplay = value;
}
}
Expand Down
6 changes: 6 additions & 0 deletions Assets/Scripts/Compose/Timeline/TimelineService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@ public void DecreasePlaybackSpeed()
[KeybindHint(Exclude = false, Priority = KeybindPriorities.Playback)]
public void IncreasePlaybackSpeed()
{
if (gameplayData.PlaybackSpeed.Value < 0.25f)
{
gameplayData.PlaybackSpeed.Value = 0.25f;
return;
}

gameplayData.PlaybackSpeed.Value
= Mathf.Min(gameplayData.PlaybackSpeed.Value + 0.25f, 5f);
}
Expand Down

0 comments on commit 3b5b47e

Please sign in to comment.