Merge pull request #1727 from Rarder44/master

[gbmusic] fix get font size
pull/1743/head^2
Gordon Williams 2022-04-25 11:47:33 +01:00 committed by GitHub
commit 90155cb8d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -86,7 +86,8 @@ function infoColor(name) {
* @param l
*/
function rScroller(l) {
g.setFont("Vector", Math.round(g.getHeight()*l.fsz.slice(0, -1)/100));
var size=l.font.split(":")[1].slice(0,-1);
g.setFont("Vector", Math.round(g.getHeight()*size/100));
const w = g.stringWidth(l.label)+40,
y = l.y+l.h/2;
l.offset = l.offset%w;