promenu: simplify if-else
parent
9c6f14a63e
commit
b5ad702c3a
|
|
@ -87,13 +87,11 @@ type ActualMenuItem = Exclude<Menu["..."], MenuOptions | undefined>;
|
|||
/*???*/{
|
||||
if(name.length >= 17 - v.length && typeof item === "object"){
|
||||
g.drawString(name.substring(0, 12 - v.length) + "...", x + 3.7, iy + 2.7);
|
||||
}else{
|
||||
if(name.length >= 15){
|
||||
}else if(name.length >= 15){
|
||||
g.drawString(name.substring(0, 15) + "...", x + 3.7, iy + 2.7);
|
||||
}else{
|
||||
g.drawString(name, x + 3.7, iy + 2.7);
|
||||
}
|
||||
}
|
||||
|
||||
let xo = x2;
|
||||
if (selectEdit && idx === selected) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue