mirror of
https://github.com/orangeglo/gbnp.git
synced 2026-08-22 16:44:02 -05:00
Remove blocks component, it's just confusing. Remove drop shadow effect on news.
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 4.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 KiB |
@@ -87,7 +87,6 @@
|
||||
</td>
|
||||
<td :class="{ overflow: romOverflow }">
|
||||
<span v-if="romOverflow">Limit is 7 blocks</span>
|
||||
<span v-if="!romOverflow"><blocks :used="processor.romUsedKB() / 128" /></span>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
@@ -22,25 +22,6 @@ Vue.component('bitmap-preview', {
|
||||
template: '<canvas style="vertical-align: middle" width="256" height="16" ref="canvas"></canvas>'
|
||||
});
|
||||
|
||||
Vue.component('blocks', {
|
||||
props: ['used'],
|
||||
computed: {
|
||||
blocksUsedKeys: function () {
|
||||
return [...Array(this.used).keys()].map((v) => `u${v}`);
|
||||
},
|
||||
blocksFreeKeys: function () {
|
||||
return [...Array(7 - this.used).keys()].map((v) => `f${v}`);
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<span class="blocks">
|
||||
<img src="img/free_block.png" v-for="i in blocksFreeKeys" :key="i" />
|
||||
<img src="img/used_block.png" v-for="i in blocksUsedKeys" :key="i" />
|
||||
<img src="img/used_block.png" />
|
||||
</span>
|
||||
`
|
||||
})
|
||||
|
||||
Vue.component('ticker-settings', {
|
||||
props: ['processor', 'fontsLoaded', 'fontIndex'],
|
||||
data: function() {
|
||||
|
||||
@@ -516,8 +516,9 @@ class TickerText {
|
||||
ctx.font = font;
|
||||
ctx.fillStyle = 'black';
|
||||
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
||||
ctx.fillStyle = '#888';
|
||||
ctx.fillText(text,3,14);
|
||||
|
||||
// ctx.fillStyle = '#888'; // drop shadow
|
||||
// ctx.fillText(text,3,14);
|
||||
ctx.fillStyle = 'white';
|
||||
ctx.fillText(text,1,12);
|
||||
|
||||
@@ -527,11 +528,12 @@ class TickerText {
|
||||
let byte = 0;
|
||||
for (let j = 0; j < 4; j++) {
|
||||
let red = imageData[i+j*4];
|
||||
if (red < 100) {
|
||||
if (red < 210) {
|
||||
byte = byte | 0b11 << (6 - j*2);
|
||||
} else if (red < 210) {
|
||||
byte = byte | 0b01 << (6 - j*2);
|
||||
}
|
||||
}
|
||||
// else if (red < 210) {
|
||||
// byte = byte | 0b01 << (6 - j*2);
|
||||
// }
|
||||
}
|
||||
buffer.push(byte)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user