Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.newdawn.slick.Animation;
- import org.newdawn.slick.SlickException;
- import org.newdawn.slick.SpriteSheet;
- public class FontManager {
- static SpriteSheet font;
- static Animation[] KEY_SPACE= new Animation[8];
- static Animation[] KEY_EXCLAMATION_MARK= new Animation[8];
- static Animation[] KEY_DOUBLE_QUOTE= new Animation[8];
- static Animation[] KEY_NUMERAL_SIGN= new Animation[8];
- static Animation[] KEY_DOLLAR_SIGN= new Animation[8];
- static Animation[] KEY_PERCENT_SIGN= new Animation[8];
- static Animation[] KEY_AND= new Animation[8];
- static Animation[] KEY_END_QUOTE= new Animation[8];
- static Animation[] KEY_OPEN_BRACE= new Animation[8];
- static Animation[] KEY_CLOSE_BRACE= new Animation[8];
- static Animation[] KEY_ASTERIK= new Animation[8];
- static Animation[] KEY_PLUS_SIGN= new Animation[8];
- static Animation[] KEY_COMMA= new Animation[8];
- static Animation[] KEY_DASH= new Animation[8];
- static Animation[] KEY_PERIOD= new Animation[8];
- static Animation[] KEY_FORWARD_SLASH= new Animation[8];
- static Animation[] KEY_0= new Animation[8];
- static Animation[] KEY_1= new Animation[8];
- static Animation[] KEY_2= new Animation[8];
- static Animation[] KEY_3= new Animation[8];
- static Animation[] KEY_4= new Animation[8];
- static Animation[] KEY_5= new Animation[8];
- static Animation[] KEY_6= new Animation[8];
- static Animation[] KEY_7= new Animation[8];
- static Animation[] KEY_8= new Animation[8];
- static Animation[] KEY_9= new Animation[8];
- static Animation[] KEY_COLON= new Animation[8];
- static Animation[] KEY_SEMICOLON= new Animation[8];
- static Animation[] KEY_OPEN_CARROT= new Animation[8];
- static Animation[] KEY_EQUALS= new Animation[8];
- static Animation[] KEY_CLOSE_CARROT= new Animation[8];
- static Animation[] KEY_QUESTION_MARK= new Animation[8];
- static Animation[] KEY_AT= new Animation[8];
- static Animation[] KEY_A= new Animation[8];
- static Animation[] KEY_B= new Animation[8];
- static Animation[] KEY_C= new Animation[8];
- static Animation[] KEY_D= new Animation[8];
- static Animation[] KEY_E= new Animation[8];
- static Animation[] KEY_F= new Animation[8];
- static Animation[] KEY_G= new Animation[8];
- static Animation[] KEY_H= new Animation[8];
- static Animation[] KEY_I= new Animation[8];
- static Animation[] KEY_J= new Animation[8];
- static Animation[] KEY_K= new Animation[8];
- static Animation[] KEY_L= new Animation[8];
- static Animation[] KEY_M= new Animation[8];
- static Animation[] KEY_N= new Animation[8];
- static Animation[] KEY_O= new Animation[8];
- static Animation[] KEY_P= new Animation[8];
- static Animation[] KEY_Q= new Animation[8];
- static Animation[] KEY_R= new Animation[8];
- static Animation[] KEY_S= new Animation[8];
- static Animation[] KEY_T= new Animation[8];
- static Animation[] KEY_U= new Animation[8];
- static Animation[] KEY_V= new Animation[8];
- static Animation[] KEY_W= new Animation[8];
- static Animation[] KEY_X= new Animation[8];
- static Animation[] KEY_Y= new Animation[8];
- static Animation[] KEY_Z= new Animation[8];
- static Animation[] KEY_OPEN_BRACKET= new Animation[8];
- static Animation[] BACKWARD_SLASH= new Animation[8];
- static Animation[] KEY_CLOSE_BRACKET= new Animation[8];
- static Animation[] KEY_CIRCUMFLEX_ACCENT= new Animation[8];
- static Animation[] KEY_UNDERLINE= new Animation[8];
- static Animation[] KEY_OPEN_QUOTE= new Animation[8];
- static Animation[] KEY_a= new Animation[8];
- static Animation[] KEY_b= new Animation[8];
- static Animation[] KEY_c= new Animation[8];
- static Animation[] KEY_d= new Animation[8];
- static Animation[] KEY_e= new Animation[8];
- static Animation[] KEY_f= new Animation[8];
- static Animation[] KEY_g= new Animation[8];
- static Animation[] KEY_h= new Animation[8];
- static Animation[] KEY_i= new Animation[8];
- static Animation[] KEY_j= new Animation[8];
- static Animation[] KEY_k= new Animation[8];
- static Animation[] KEY_l= new Animation[8];
- static Animation[] KEY_m= new Animation[8];
- static Animation[] KEY_n= new Animation[8];
- static Animation[] KEY_o= new Animation[8];
- static Animation[] KEY_p= new Animation[8];
- static Animation[] KEY_q= new Animation[8];
- static Animation[] KEY_r= new Animation[8];
- static Animation[] KEY_s= new Animation[8];
- static Animation[] KEY_t= new Animation[8];
- static Animation[] KEY_u= new Animation[8];
- static Animation[] KEY_v= new Animation[8];
- static Animation[] KEY_w= new Animation[8];
- static Animation[] KEY_x= new Animation[8];
- static Animation[] KEY_y= new Animation[8];
- static Animation[] KEY_z= new Animation[8];
- static Animation[] KEY_OPEN_BRACE2= new Animation[8];
- static Animation[] KEY_PIPE= new Animation[8];
- static Animation[] KEY_CLOSE_BRACE2= new Animation[8];
- public FontManager()
- {
- }
- public void initFontManager()
- {
- try {font = new SpriteSheet(System.getenv("APPDATA") + "/SubSpaceReloaded/" + "Graphics" + "/tallfont.png",8,10);}
- catch (SlickException e) {e.printStackTrace();}
- int count = 0;
- for(int c = 0; c < 8;c++)
- {
- KEY_SPACE[c] = new Animation();
- KEY_SPACE[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_EXCLAMATION_MARK[c] = new Animation();count++;
- KEY_EXCLAMATION_MARK[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_DOUBLE_QUOTE[c] = new Animation();count++;
- KEY_DOUBLE_QUOTE[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_NUMERAL_SIGN[c] = new Animation();count++;
- KEY_NUMERAL_SIGN[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_DOLLAR_SIGN[c] = new Animation();count++;
- KEY_DOLLAR_SIGN[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_PERCENT_SIGN[c] = new Animation();count++;
- KEY_PERCENT_SIGN[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_AND[c] = new Animation();count++;
- KEY_AND[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_END_QUOTE[c] = new Animation();count++;
- KEY_END_QUOTE[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_OPEN_BRACE[c] = new Animation();count++;
- KEY_OPEN_BRACE[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_CLOSE_BRACE[c] = new Animation();count++;
- KEY_CLOSE_BRACE[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_ASTERIK[c] = new Animation();count++;
- KEY_ASTERIK[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_PLUS_SIGN[c] = new Animation();count++;
- KEY_PLUS_SIGN[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_COMMA[c] = new Animation();count++;
- KEY_COMMA[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_DASH[c] = new Animation();count++;
- KEY_DASH[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_PERIOD[c] = new Animation();count++;
- KEY_PERIOD[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_FORWARD_SLASH[c] = new Animation();count++;
- KEY_FORWARD_SLASH[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_0[c] = new Animation();count++;
- KEY_0[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_1[c] = new Animation();count++;
- KEY_1[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_2[c] = new Animation();count++;
- KEY_2[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_3[c] = new Animation();count++;
- KEY_3[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_4[c] = new Animation();count++;
- KEY_4[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_5[c] = new Animation();count++;
- KEY_5[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_6[c] = new Animation();count++;
- KEY_6[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_7[c] = new Animation();count++;
- KEY_7[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_8[c] = new Animation();count++;
- KEY_8[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_9[c] = new Animation();count++;
- KEY_9[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_COLON[c] = new Animation();count++;
- KEY_COLON[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_SEMICOLON[c] = new Animation();count++;
- KEY_SEMICOLON[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_OPEN_CARROT[c] = new Animation();count++;
- KEY_OPEN_CARROT[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_EQUALS[c] = new Animation();count++;
- KEY_EQUALS[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_CLOSE_CARROT[c] = new Animation();count++;
- KEY_CLOSE_CARROT[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_QUESTION_MARK[c] = new Animation();count++;
- KEY_QUESTION_MARK[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_AT[c] = new Animation();count++;
- KEY_AT[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_A[c] = new Animation();count++;
- KEY_A[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_B[c] = new Animation();count++;
- KEY_B[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_C[c] = new Animation();count++;
- KEY_C[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_D[c] = new Animation();count++;
- KEY_D[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_E[c] = new Animation();count++;
- KEY_E[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_F[c] = new Animation();count++;
- KEY_F[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_G[c] = new Animation();count++;
- KEY_G[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_H[c] = new Animation();count++;
- KEY_H[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_I[c] = new Animation();count++;
- KEY_I[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_J[c] = new Animation();count++;
- KEY_J[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_K[c] = new Animation();count++;
- KEY_K[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_L[c] = new Animation();count++;
- KEY_L[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_M[c] = new Animation();count++;
- KEY_M[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_N[c] = new Animation();count++;
- KEY_N[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_O[c] = new Animation();count++;
- KEY_O[c].addFrame(font.getSprite(count * 8,0 + (c * 2)), 4);
- KEY_P[c] = new Animation();count++;
- KEY_P[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_Q[c] = new Animation();count++;
- KEY_Q[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_R[c] = new Animation();count++;
- KEY_R[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_S[c] = new Animation();count++;
- KEY_S[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_T[c] = new Animation();count++;
- KEY_T[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_U[c] = new Animation();count++;
- KEY_U[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_V[c] = new Animation();count++;
- KEY_V[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_W[c] = new Animation();count++;
- KEY_W[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_X[c] = new Animation();count++;
- KEY_X[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_Y[c] = new Animation();count++;
- KEY_Y[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_Z[c] = new Animation();count++;
- KEY_Z[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_OPEN_BRACKET[c] = new Animation();count++;
- KEY_OPEN_BRACKET[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- BACKWARD_SLASH[c] = new Animation();count++;
- BACKWARD_SLASH[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_CLOSE_BRACKET[c] = new Animation();count++;
- KEY_CLOSE_BRACKET[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_CIRCUMFLEX_ACCENT[c] = new Animation();count++;
- KEY_CIRCUMFLEX_ACCENT[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_UNDERLINE[c] = new Animation();count++;
- KEY_UNDERLINE[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_OPEN_QUOTE[c] = new Animation();count++;
- KEY_OPEN_QUOTE[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_a[c] = new Animation();count++;
- KEY_a[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_b[c] = new Animation();count++;
- KEY_b[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_c[c] = new Animation();count++;
- KEY_c[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_d[c] = new Animation();count++;
- KEY_d[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_e[c] = new Animation();count++;
- KEY_e[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_f[c] = new Animation();count++;
- KEY_f[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_g[c] = new Animation();count++;
- KEY_g[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_h[c] = new Animation();count++;
- KEY_h[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_i[c] = new Animation();count++;
- KEY_i[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_j[c] = new Animation();count++;
- KEY_j[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_k[c] = new Animation();count++;
- KEY_k[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_l[c] = new Animation();count++;
- KEY_l[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_m[c] = new Animation();count++;
- KEY_m[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_n[c] = new Animation();count++;
- KEY_n[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_o[c] = new Animation();count++;
- KEY_o[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_p[c] = new Animation();count++;
- KEY_p[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_q[c] = new Animation();count++;
- KEY_q[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_r[c] = new Animation();count++;
- KEY_r[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_s[c] = new Animation();count++;
- KEY_s[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_t[c] = new Animation();count++;
- KEY_t[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_u[c] = new Animation();count++;
- KEY_u[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_v[c] = new Animation();count++;
- KEY_v[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_w[c] = new Animation();count++;
- KEY_w[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_x[c] = new Animation();count++;
- KEY_x[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_y[c] = new Animation();count++;
- KEY_y[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_z[c] = new Animation();count++;
- KEY_z[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_OPEN_BRACE2[c] = new Animation();count++;
- KEY_OPEN_BRACE2[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_PIPE[c] = new Animation();count++;
- KEY_PIPE[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- KEY_CLOSE_BRACE2[c] = new Animation();count++;
- KEY_CLOSE_BRACE2[c].addFrame(font.getSprite(count * 8,1 + (c * 2)), 4);
- }
- }
- public void drawFont(String color, String message, int x, int y, int time)
- {
- String color2 = color.toLowerCase();
- if(color2 == "gray")
- {
- }
- else if(color2 == "green")
- {
- }
- else if(color2 == "blue")
- {
- }
- else if(color2 == "red")
- {
- }
- else if(color2 == "yellow")
- {
- }
- else if(color2 == "purple")
- {
- }
- else if(color2 == "orange")
- {
- }
- else if(color2 == "pink")
- {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment