Fix script texts and base coords
This commit is contained in:
		@@ -242,12 +242,10 @@ function focusTest(x, y) {
 | 
			
		||||
function cutSpeedTest(contentXOffset, contentYOffset, powersToTest, speedsToTest) {
 | 
			
		||||
    var fontWidth = 2;
 | 
			
		||||
 | 
			
		||||
    contentYOffset += 20;
 | 
			
		||||
 | 
			
		||||
    var firstPowerRowOffset = fontWidth * 3 + squareSpacing;
 | 
			
		||||
 | 
			
		||||
    // TODO: improve
 | 
			
		||||
    var speedsText = "speeds";
 | 
			
		||||
    var speedsText = "speed";
 | 
			
		||||
    for (var i = 0; i < speedsText.length; ++i) {
 | 
			
		||||
        var currentCharYOffset = i * (fontWidth * 3) + firstPowerRowOffset;
 | 
			
		||||
        segment7write(contentXOffset, contentYOffset + currentCharYOffset, fontWidth, speedsText.slice(i, i+1));
 | 
			
		||||
@@ -259,7 +257,7 @@ function cutSpeedTest(contentXOffset, contentYOffset, powersToTest, speedsToTest
 | 
			
		||||
    // TODO: improve
 | 
			
		||||
    // this text will be aligned centrally above the X axis
 | 
			
		||||
    var firstColumnOffset = 3 * fontWidth * 1.5;
 | 
			
		||||
    var powersText = "powers";
 | 
			
		||||
    var powersText = "power";
 | 
			
		||||
    segment7write(contentXOffset + firstColumnOffset + powersToTest.length / 2 * (squareSize + squareSpacing - 0) - (powersText.length / 2) * fontWidth * 1.5, 15, fontWidth, powersText);
 | 
			
		||||
 | 
			
		||||
    // write column texts in the first ever row
 | 
			
		||||
@@ -308,7 +306,7 @@ function cutSpeedTest(contentXOffset, contentYOffset, powersToTest, speedsToTest
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// could render at (0, 0), but then again, why not add some spacing right away?
 | 
			
		||||
var xOffset = 25;
 | 
			
		||||
var xOffset = 5;
 | 
			
		||||
var yOffset = 5;
 | 
			
		||||
 | 
			
		||||
if (cutOutline) {
 | 
			
		||||
@@ -346,4 +344,6 @@ if (!promptUserForMaxMinIntervals) {
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
yOffset += 20;
 | 
			
		||||
 | 
			
		||||
cutSpeedTest(xOffset, yOffset, powersToTest, speedsToTest);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user