Ignore:
Timestamp:
Apr 20, 2011, 12:39:27 AM (11 years ago)
Author:
Sam Hocevar
Message:

imlib: use vec2i for image::size and unroll all necessary changes
everywhere else in the code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/menu.cpp

    r496 r512  
    1212
    1313#include <math.h>
     14
     15#include "common.h"
    1416
    1517#include "dev.h"
     
    146148
    147149  int mw=(font->width())*maxw+20;
    148   int mx=screen->width()/2-mw/2,
    149       my=screen->height()/2-mh/2;
     150  int mx=screen->Size().x/2-mw/2,
     151      my=screen->Size().y/2-mh/2;
    150152
    151153
     
    155157  {
    156158    int tl=strlen(title)*font->width();
    157     int tx=screen->width()/2-tl/2;
     159    int tx=screen->Size().x/2-tl/2;
    158160    dark_widget(tx-2,my-font->height()-4,tx+tl+2,my-2,wm->medium_color(),wm->dark_color(),180);
    159161    font->put_string(screen,tx+1,my-font->height()-2,title,wm->bright_color());
     
    512514      {
    513515        image *tit=cache.img(title_screen);
    514           tit->put_image(screen,screen->width()/2-tit->width()/2,
    515                           screen->height()/2-tit->height()/2);
     516          tit->put_image(screen,screen->Size().x/2-tit->Size().x/2,
     517                          screen->Size().y/2-tit->Size().y/2);
    516518      }
    517519      inm->redraw();
     
    546548  c=cache.reg("art/icons.spe",name,SPEC_IMAGE,1);
    547549
    548   h=cache.img(a)->height();
     550  h=cache.img(a)->Size().y;
    549551
    550552  return new ico_button(x,y,id,b,b,a,c,next,-1,key);
Note: See TracChangeset for help on using the changeset viewer.