Skip to content

Commit

Permalink
Add live star rating counter
Browse files Browse the repository at this point in the history
  • Loading branch information
longnguyen2004 committed Aug 19, 2023
1 parent cc36e6c commit f10df2c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion overlays/mania_simple_overlay/public/config.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"mapBackground": false,

// Settings for the left box
// Valid values: "star", "acc", "combo"
// Valid values: "star", "star_live", "acc", "combo"
"l_b" : 0,
"l_g" : 140,
"l_r" : 255,
Expand Down
1 change: 1 addition & 0 deletions overlays/mania_simple_overlay/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"acc",
"currentMaxCombo",
"mStars",
"liveStarRating",
"unstableRate",
"ppIfMapEndsNow",
Expand Down
5 changes: 4 additions & 1 deletion overlays/mania_simple_overlay/src/cards/Normal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
$: ({
geki: c320, c300, katsu: c200, c100, c50, miss,
acc, currentMaxCombo, mStars,
acc, currentMaxCombo, mStars, liveStarRating,
unstableRate, ppIfMapEndsNow,
artistRoman, titleRoman, creator, diffName
Expand All @@ -24,6 +24,9 @@
{#if left_box === "star"}
<span>STAR RATE</span>
<span class="value">{(mStars ?? 0).toFixed(2)}</span>
{:else if left_box === "star_live"}
<span>LIVE STAR RATE</span>
<span class="value">{(liveStarRating ?? 0).toFixed(2)}</span>
{:else if left_box === "acc"}
<span>ACCURACY</span>
<span class="value">{(acc ?? 0).toFixed(2)}</span>
Expand Down
1 change: 1 addition & 0 deletions overlays/mania_simple_overlay/src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const validator = object({
l_b: rgbValue,
left_box: union([
literal("star"),
literal("star_live"),
literal("acc"),
literal("combo")
], "Invalid choice for left_box"),
Expand Down

0 comments on commit f10df2c

Please sign in to comment.