Skip to content

Commit

Permalink
UPDATE TIME
Browse files Browse the repository at this point in the history
  • Loading branch information
EliteAsian123 committed May 10, 2023
1 parent b1dc6cd commit 20736b6
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 2 deletions.
59 changes: 58 additions & 1 deletion Assets/Prefabs/UI/MusicLibrary/SongView.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@ GameObject:
- component: {fileID: 4559178976173773975}
- component: {fileID: 9038120507072457938}
- component: {fileID: 91003172277932724}
- component: {fileID: 937450767208845564}
m_Layer: 5
m_Name: Icon
m_TagString: Untagged
Expand Down Expand Up @@ -742,7 +743,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.33333334}
m_Color: {r: 1, g: 1, b: 1, a: 0.8}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
Expand All @@ -759,6 +760,62 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &937450767208845564
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5383822100959049230}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 0
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: 91003172277932724}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 6622513572522471069}
m_TargetAssemblyTypeName: YARG.UI.MusicLibrary.SongView, Assembly-CSharp
m_MethodName: IconClick
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
--- !u!1 &6846856528720448001
GameObject:
m_ObjectHideFlags: 0
Expand Down
2 changes: 1 addition & 1 deletion Assets/Script/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace YARG {
public static class Constants {
public static readonly YargVersion VERSION_TAG = YargVersion.Parse("v0.10.0");
public static readonly YargVersion VERSION_TAG = YargVersion.Parse("v0.10.1");

// General
public const float HIT_MARGIN = 0.095f;
Expand Down
7 changes: 7 additions & 0 deletions Assets/Script/UI/MusicLibrary/SongView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,12 @@ public void SecondaryTextClick() {

viewType.SecondaryTextClick();
}

public void IconClick() {
int realIndex = SongSelection.Instance.SelectedIndex + _relativeSongIndex;
var viewType = SongSelection.Instance.Songs[realIndex];

viewType.IconClick();
}
}
}
6 changes: 6 additions & 0 deletions Assets/Script/UI/MusicLibrary/ViewTypes/SongViewType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,11 @@ public override void PrimaryButtonClick() {
MainMenu.Instance.chosenSong = SongEntry;
MainMenu.Instance.ShowPreSong();
}

public override void IconClick() {
base.IconClick();

SongSelection.Instance.searchField.text = $"source:{SongEntry.Source}";
}
}
}
4 changes: 4 additions & 0 deletions Assets/Script/UI/MusicLibrary/ViewTypes/ViewType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,9 @@ public virtual void SecondaryTextClick() {
public virtual void PrimaryButtonClick() {

}

public virtual void IconClick() {

}
}
}

0 comments on commit 20736b6

Please sign in to comment.