Ignore:
Timestamp:
May 16, 2011, 2:37:19 AM (11 years ago)
Author:
Sam Hocevar
Message:

imlib: make JCFont use vec2i classes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/imlib/input.h

    r659 r668  
    6565  int cur;
    6666  char *prompt,*data,*format;
    67   int xstart() { return m_pos.x+wm->font()->width()*(strlen(prompt)+1)+3; }
    68   int xend() { return m_pos.x+wm->font()->width()*(strlen(prompt)+1+strlen(format))+7; }
    69   int yend() { return m_pos.y+wm->font()->height()+5; }
     67  int xstart() { return m_pos.x + wm->font()->Size().x * (strlen(prompt)+1) + 3; }
     68  int xend() { return m_pos.x + wm->font()->Size().x * (strlen(prompt) + 1 + strlen(format)) + 7; }
     69  int yend() { return m_pos.y + wm->font()->Size().y + 5; }
    7070  void draw_cur(int color, image *screen);
    7171  int last_spot() { int x=strlen(data); while (x && data[x-1]==' ') x--; return x; }
     
    7474    screen->Bar(vec2i(xstart() + 1, m_pos.y + 1), vec2i(xend() - 1, yend() - 1),
    7575                wm->dark_color());
    76     wm->font()->put_string(screen,xstart()+1,m_pos.y+3,data);
     76    wm->font()->PutString(screen, vec2i(xstart() + 1, m_pos.y + 3), data);
    7777  }
    7878public :
Note: See TracChangeset for help on using the changeset viewer.