Remove blocks component, it's just confusing. Remove drop shadow effect on news.

This commit is contained in:
Evan Barger
2020-07-15 21:05:42 -04:00
parent 862e967324
commit 2acf56f5f2
5 changed files with 8 additions and 26 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -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>

View File

@@ -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() {

View File

@@ -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)
}