Exemplo n.º 1
0
void shal_draw_justified_text(ALLEGRO_FONT const * font,
                              float color_r,
                              float color_g,
                              float color_b,
                              float color_a,
                              float x1,
                              float x2,
                              float y,
                              float diff,
                              int flags,
                              const char * text)
{
    ALLEGRO_COLOR color;
    color.r = color_r;
    color.g = color_g;
    color.b = color_b;
    color.a = color_a;
    return al_draw_justified_text(font,
                                  color,
                                  x1,
                                  x2,
                                  y,
                                  diff,
                                  flags,
                                  text);
}
Exemplo n.º 2
0
Arquivo: main.c Projeto: wjwwood/agame
int agame_msg(char const * msg, ALLEGRO_FONT * font) {
  int w = al_get_display_width(display);
  int h = al_get_display_height(display);
  // Draw the bounding box
  al_draw_filled_rounded_rectangle(0, h - h/3.0, w, h,
                                   10, 10, al_map_rgb(120, 120, 120));
  al_draw_filled_rounded_rectangle(5, h - h/3.0 + 5, w - 5, h - 5,
                                   10, 10, al_map_rgb(230, 230, 230));
  al_draw_rounded_rectangle(5, h - h/3.0 + 5, w - 5, h - 5,
                            10, 10, al_map_rgb(0, 0, 0), 3);
  al_draw_justified_text(font, al_map_rgb(0, 0, 0), 10, w - 10,
                         h - h/3.0 + 10, 16, 0, msg);
  return 1;
}
Exemplo n.º 3
0
Arquivo: font.c Projeto: trezker/allua
static int allua_Font_draw_justified_text(lua_State * L)
{
   ALLUA_font font = allua_check_font(L, 1);
   ALLUA_color color = allua_check_color(L, 2);
   float x1 = luaL_checknumber(L, 3);
   float x2 = luaL_checknumber(L, 4);
   float y = luaL_checknumber(L, 5);
   float diff = luaL_checknumber(L, 6);
   int flags = luaL_checkinteger(L, 7);
   const char *text = luaL_checkstring(L, 8);

   al_draw_justified_text(font, color, x1, x2, y, diff, flags, text);
   return 0;
}
Exemplo n.º 4
0
void al_draw_justified_text_w(const ALLEGRO_FONT *font, ALLEGRO_COLOR *color, float x1, float x2, float y, float diff, int flags, char const *text)
{
	al_draw_justified_text(font, *color, x1, x2, y, diff, flags, text);
}