Created
May 3, 2012 05:01
-
-
Save Double0negative/2583276 to your computer and use it in GitHub Desktop.
Center text across multiple signs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for(String[] msg:messagequeue){ | |
int x = getSignMidPoint()[1] - (msg.length / 2); | |
int lineno = x%3; | |
x = x / 4; | |
System.out.println(x); | |
for(int a = msg.length-1; a>-1;a--){ | |
int y = getSignMidPoint()[0] - (msg[a].length() / 2); | |
System.out.println(msg[a]); | |
char[] line = msg[a].toCharArray(); | |
for(int b = 0;b<line.length;b++){ | |
System.out.println(y/16+" "+x/4+" "+(3-x)%4+" "+x); | |
Sign sig = signs [x][((y)/16)]; | |
sig.setLine(lineno,sig.getLine(lineno)+line[b]); | |
System.out.println(sig.getLine(x%4)); | |
signs [x][((y)/16)].update(); | |
y++; | |
} | |
if(lineno == 0){ | |
lineno = 3; | |
x++; | |
} | |
else | |
lineno--; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment