Logo Search packages:      
Sourcecode: tagua version File versions  Download package

void Board::onResize ( int  new_size,
int  border_size,
int  border_text_near,
int  border_text_far,
bool  force_reload = false 
) [virtual]

resize event (new_size is the new size of a SQUARE)

Definition at line 366 of file board.cpp.

References m_border_size, m_border_text_far, m_border_text_near, m_controls_loader, m_loader, m_square_size, m_tags_loader, PixmapLoader::setSize(), updateBackground(), updateBorder(), updateSprites(), and updateTags().

                                                                           {
  if(m_square_size == new_size && !force_reload)
    return;

  m_square_size = new_size;
  m_border_size = border_size;
  m_border_text_near = border_text_near;
  m_border_text_far = border_text_far;

  // update the size of the piece loader
  m_loader.setSize(m_square_size);

  // update the size of the tag loader
  m_tags_loader.setSize(m_square_size);

  // update the size of the controls loader
  m_controls_loader.setSize(m_border_size);

  // update canvas background
  updateBackground();

  // update the sprites
  updateSprites();

  // update piece tags
  updateTags();

  // update border
  updateBorder();
}


Generated by  Doxygen 1.6.0   Back to index