Ejemplo n.º 1
0
PictureWidget::PictureWidget(const Surface & s, ScalingType type)
  : Widget(s.GetSize(), false)
  , disabled(false)
  , type(type)
  , spr(NULL)
{
  SetSurface(s, type);
}
Ejemplo n.º 2
0
void Font::Write(const Point2i & pos,
                 const Surface & surface) const
{
  GetMainWindow().Blit(surface, pos);

  // TODO: Remove this line! (and use GameFont instead of Font)
  GetWorld().ToRedrawOnScreen( Rectanglei(pos, surface.GetSize()) );
}
Ejemplo n.º 3
0
void PictureWidget::SetSurface(const Surface & s, ScalingType type_)
{
  if (spr)
    delete spr;

  picture_size = s.GetSize();
  spr = new Sprite(s);
  type = type_;
  loaded = true;
  // Don't call immediately ApplyScaling(type) to save on rotozooms
  NeedRedrawing();
}