Remove duplicate code
This commit is contained in:
@@ -144,8 +144,8 @@ export function setup(ctx: ClientContext) {
|
||||
height: 166,
|
||||
on_render_background(g) {
|
||||
g.panel(0, 0, 176, 166);
|
||||
const done = menu.data.progress / menu.data.progress_max || 0;
|
||||
g.texture("bworld:arrow_full", 85, 34, 18 * done, 18, [0, 0, done, 1]);
|
||||
const { progress, progress_max } = menu.data;
|
||||
g.progress("bworld:arrow_empty", "bworld:arrow_full", 85, 34, 18, 18, progress / progress_max);
|
||||
},
|
||||
on_render_labels(g) {
|
||||
g.text(menu.title, 8, 6);
|
||||
|
||||
Reference in New Issue
Block a user