Label::Label(const String& text, float x, float y, const String& font, uint size, uint color) : Renderable2D(), text(text), position(m_Position), m_Font(FontManager::Get(font, size)) { m_Position = maths::vec3(x, y, 0.0f); m_Color = color; ValidateFont(font, size); }
Label::Label(const std::string& text, float x, float y, unsigned int color, const std::string& font, unsigned int size) : Renderable2D(), m_text(text), m_font(FontManager::Get(font, size)) { m_position = maths::Vec3(x, y, 0); SetColor(color); ValidateFont(font, size); }
void FontManagerDialog::OkButtonClicked() { Font *returnFont = NULL; QItemSelectionModel *selectionModel = ui->fontsTableView->selectionModel(); if (selectionModel->hasSelection()) { returnFont = GetSelectedFont(selectionModel); if (returnFont) { ValidateFont(returnFont); //Set dialog resulting font - it corresponds to selected font by user dialogResultFont = returnFont->Clone(); SafeRelease(returnFont); //Set dialog result as QDialog::Accepted and close it accept(); } } }