Exemplo n.º 1
0
void NvUIElement::SystemResChange(int32_t w, int32_t h)
{
#if later /* !!!!TBD TODO doesn't apply well to fixed-PIXEL work. */
    if (h<w) // landscape
    {
        ms_designWidth = 800;
        ms_designHeight = 480;
    }
    else
    {
        ms_designWidth = 480;
        ms_designHeight = 800;
    }

    NVBFSetScreenRes((float)ms_designWidth, (float)ms_designHeight);
#endif
    extern void NvBFSetScreenRes(float width, float height);
    NvBFSetScreenRes((float)w, (float)h);
}
Exemplo n.º 2
0
bool Engine::resizeIfNeeded()
{
	if (m_ui->HasUIChanged())
	{
	}
	else if (!mResizePending)
	{
		return false;
	}

	int w = mEgl.getWidth();
	int h = mEgl.getHeight();
	int height = (w > h) ? (h / 16) : (w / 16);

	NVBFSetScreenRes(w, h);

	m_ui->Resize(w, h);	

	mResizePending = false;

	return true;
}
Exemplo n.º 3
0
bool Engine::resizeIfNeeded()
{
	if (!mResizePending)
		return false;

	int w = mEgl.getWidth();
	int h = mEgl.getHeight();
	mGlobeApp->resize(w, h);
	mLastX = w / 2;
	mLastY = h / 2;

	NVBFSetScreenRes(w, h); // 16:9 ws as default.
	if (m_clockText)
	{
		int height = (w > h) ? (h / 16) : (w / 16);
		NVBFTextSetSize(m_clockText, height);
		NVBFTextCursorAlign(m_clockText, NVBF_ALIGN_LEFT, NVBF_ALIGN_TOP);
		NVBFTextCursorPos(m_clockText, 10, 10);
	}
	mResizePending = false;

	return true;
}