Skip to content

Commit

Permalink
As Made Famous by Hugh and Kadu (#341)
Browse files Browse the repository at this point in the history
* Fixed Gold Star Texture

+ Something wrong when exported, two shines didn't had proper blending mode applied

* As Made Famous by Hugh and Kadu

- Added As Made Famous message before artist name when its not a master version
- All thanks to Hugh I just added a condition that probably is not the best way
- Visual is not the same as concept, need help with it
  • Loading branch information
kaduwaengertner authored May 16, 2023
1 parent 50f170c commit 1f989be
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 5 deletions.
70 changes: 67 additions & 3 deletions Assets/Prefabs/UI/MusicLibrary/SongView.prefab
Original file line number Diff line number Diff line change
@@ -1,5 +1,69 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2833466215986277939
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3800183862035804169}
- component: {fileID: 3381585000134142349}
m_Layer: 5
m_Name: Artist
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3800183862035804169
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2833466215986277939}
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: 8281760822307067939}
m_Father: {fileID: 5939750916144769644}
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: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &3381585000134142349
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2833466215986277939}
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: 0
m_Bottom: 0
m_ChildAlignment: 0
m_Spacing: 5
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 1
m_ChildControlHeight: 1
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!1 &2940801684206373230
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -282,7 +346,7 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 6846856528720448030}
- {fileID: 8281760822307067939}
- {fileID: 3800183862035804169}
m_Father: {fileID: 6846856529861592900}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
Expand Down Expand Up @@ -349,8 +413,8 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5939750916144769644}
m_RootOrder: 1
m_Father: {fileID: 3800183862035804169}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
Expand Down
1 change: 1 addition & 0 deletions Assets/Script/Song/ScanHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public static ScanResult ParseSongIni(string iniFile, IniSongEntry entry) {
entry.Name = section.GetField("name");
entry.Artist = section.GetField("artist");
entry.Charter = section.GetField("charter");
entry.IsMaster = true; // just gonna assume every ini song is the original artist

entry.Album = section.GetField("album");
entry.AlbumTrack = section.GetField("album_track", "0").Get(IntConverter);
Expand Down
2 changes: 1 addition & 1 deletion Assets/Script/Song/Types/SongEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public abstract class SongEntry {

public string Artist { get; set; } = string.Empty;
public string Charter { get; set; } = string.Empty;
public bool IsMaster { get; set; } = true; // true if original artist, false if "as made famous by"
public bool IsMaster { get; set; }

public string Album { get; set; } = string.Empty;
public int AlbumTrack { get; set; }
Expand Down
14 changes: 13 additions & 1 deletion Assets/Script/UI/MusicLibrary/ViewTypes/SongViewType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,19 @@ public class SongViewType : ViewType {
public override BackgroundType Background => BackgroundType.Normal;

public override string PrimaryText => SongEntry.Name;
public override string SecondaryText => SongEntry.Artist;
public override string SecondaryText {
get
{
if (SongEntry.IsMaster)
{
return SongEntry.Artist;
}
else
{
return "<size=50%>AS MADE FAMOUS BY <size=100%>" + SongEntry.Artist;
}
}
}

public override string SideText {
get {
Expand Down

0 comments on commit 1f989be

Please sign in to comment.