Add per-platform controller PNGs and runtime tinting, hook them into prompts, and update deploy/stage scripts. - Add many controller PNG assets under ui/Icons and copy them into browser/assets/icons on deploy/stage. - New controller-glyphs.js: image-based glyph renderer that tints white pixels to the UI color via a canvas pixel pass, caches results, and supports platform selection. - New controller-icons.js: adapter that forwards rendering to controller-glyphs. - Update controller-prompts.js to render icon glyphs (and include LB/RB tab-switch prompts) and call hydrate after rendering. - Call CO_ControllerGlyphs.onThemeApplied from theme.js so glyphs re-tint when theme changes. - Include new scripts in index.html and add CSS rules for glyph image sizing in styles.css. - Update docs/dev-log.md describing the change and testing/next steps. This change replaces previous inline/SVG glyph handling with individual PNG icons and adds deploy-time copying so the repo keeps a single source for controller icons.
13 lines
323 B
JavaScript
13 lines
323 B
JavaScript
(function () {
|
|
"use strict";
|
|
|
|
window.CO_ControllerIcons = {
|
|
render: function (key) {
|
|
if (window.CO_ControllerGlyphs && CO_ControllerGlyphs.render) {
|
|
return CO_ControllerGlyphs.render(key);
|
|
}
|
|
return '<span class="co-prompt-key co-prompt-key--fallback">' + key + "</span>";
|
|
}
|
|
};
|
|
})();
|