mirror of
https://github.com/captbaritone/webamp.git
synced 2026-08-04 16:04:55 +00:00
Pixelated rendering for modern skins
This commit is contained in:
parent
be2361906f
commit
3b09d2f8b1
2 changed files with 9 additions and 4 deletions
|
|
@ -212,6 +212,13 @@ export class UIRoot {
|
|||
assume(false, `Unknown global action: ${action}`);
|
||||
}
|
||||
}
|
||||
draw() {
|
||||
this._div.style.imageRendering = "pixelated";
|
||||
for (const container of this.getContainers()) {
|
||||
container.draw();
|
||||
this._div.appendChild(container.getDiv());
|
||||
}
|
||||
}
|
||||
|
||||
dispose() {
|
||||
this._div.remove();
|
||||
|
|
|
|||
|
|
@ -39,16 +39,14 @@ async function loadSkin(skinData: Blob) {
|
|||
setStatus("Parsing XML and initializing images...");
|
||||
const parser = new SkinParser(zip, UI_ROOT);
|
||||
|
||||
// This is always the same as the global singleton.
|
||||
const uiRoot = await parser.parse();
|
||||
|
||||
setStatus("Enabling Colors...");
|
||||
uiRoot.enableDefaultGammaSet();
|
||||
|
||||
setStatus("Rendering skin for the first time...");
|
||||
for (const container of uiRoot.getContainers()) {
|
||||
container.draw();
|
||||
UI_ROOT.getRootDiv().appendChild(container.getDiv());
|
||||
}
|
||||
uiRoot.draw();
|
||||
|
||||
setStatus("Initializing Maki...");
|
||||
for (const container of uiRoot.getContainers()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue