コード例 #1
0
ファイル: Label.cpp プロジェクト: myrage2000/Sparky
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);
}
コード例 #2
0
ファイル: label.cpp プロジェクト: vbhartiya/customgameengine
	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);
	}
コード例 #3
0
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();
        }
    }
}