本文整理汇总了C++中GHOST_ISystem::getFullScreen方法的典型用法代码示例。如果您正苦于以下问题:C++ GHOST_ISystem::getFullScreen方法的具体用法?C++ GHOST_ISystem::getFullScreen怎么用?C++ GHOST_ISystem::getFullScreen使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GHOST_ISystem
的用法示例。
在下文中一共展示了GHOST_ISystem::getFullScreen方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GHOST_GetFullScreen
int GHOST_GetFullScreen(GHOST_SystemHandle systemhandle)
{
GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
return (int) system->getFullScreen();
}
示例2: processEvent
bool Application::processEvent(GHOST_IEvent* event)
{
GHOST_IWindow* window = event->getWindow();
bool handled = true;
switch (event->getType()) {
/* case GHOST_kEventUnknown:
break;
case GHOST_kEventCursorButton:
std::cout << "GHOST_kEventCursorButton"; break;
case GHOST_kEventCursorMove:
std::cout << "GHOST_kEventCursorMove"; break;
*/
case GHOST_kEventWheel:
{
GHOST_TEventWheelData* wheelData = (GHOST_TEventWheelData*) event->getData();
if (wheelData->z > 0)
{
view_rotz += 5.f;
}
else
{
view_rotz -= 5.f;
}
}
break;
case GHOST_kEventKeyUp:
break;
case GHOST_kEventKeyDown:
{
GHOST_TEventKeyData* keyData = (GHOST_TEventKeyData*) event->getData();
switch (keyData->key) {
case GHOST_kKeyC:
{
int cursor = m_cursor;
cursor++;
if (cursor >= GHOST_kStandardCursorNumCursors) {
cursor = GHOST_kStandardCursorFirstCursor;
}
m_cursor = (GHOST_TStandardCursor)cursor;
window->setCursorShape(m_cursor);
}
break;
case GHOST_kKeyE:
{
int x = 200, y= 200;
m_system->setCursorPosition(x,y);
break;
}
case GHOST_kKeyF:
if (!m_system->getFullScreen()) {
// Begin fullscreen mode
GHOST_DisplaySetting setting;
setting.bpp = 16;
setting.frequency = 50;
setting.xPixels = 640;
setting.yPixels = 480;
m_system->beginFullScreen(setting, &m_fullScreenWindow, false /* stereo flag */);
}
else {
m_system->endFullScreen();
m_fullScreenWindow = 0;
}
break;
case GHOST_kKeyH:
window->setCursorVisibility(!window->getCursorVisibility());
break;
case GHOST_kKeyM:
{
bool down = false;
m_system->getModifierKeyState(GHOST_kModifierKeyLeftShift,down);
if (down) {
std::cout << "left shift down\n";
}
m_system->getModifierKeyState(GHOST_kModifierKeyRightShift,down);
if (down) {
std::cout << "right shift down\n";
}
m_system->getModifierKeyState(GHOST_kModifierKeyLeftAlt,down);
if (down) {
std::cout << "left Alt down\n";
}
m_system->getModifierKeyState(GHOST_kModifierKeyRightAlt,down);
if (down) {
std::cout << "right Alt down\n";
}
m_system->getModifierKeyState(GHOST_kModifierKeyLeftControl,down);
if (down) {
std::cout << "left control down\n";
}
m_system->getModifierKeyState(GHOST_kModifierKeyRightControl,down);
if (down) {
std::cout << "right control down\n";
//.........这里部分代码省略.........