本文整理汇总了C++中Frame::GetOrientationStatus方法的典型用法代码示例。如果您正苦于以下问题:C++ Frame::GetOrientationStatus方法的具体用法?C++ Frame::GetOrientationStatus怎么用?C++ Frame::GetOrientationStatus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Frame
的用法示例。
在下文中一共展示了Frame::GetOrientationStatus方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Frame
//.........这里部分代码省略.........
pFrame->SetOrientation(orientation);
pForm->SetOrientation(orientation);
pFrame->SetMultipointTouchEnabled(true);
AddFrame(*pFrame);
{
__player = new Tizen::Graphics::Opengl::GlPlayer;
__player->Construct(Tizen::Graphics::Opengl::EGL_CONTEXT_CLIENT_VERSION_2_X, pForm);
__player->SetFps(settings->frameRate);
__player->SetEglAttributePreset(Tizen::Graphics::Opengl::EGL_ATTRIBUTES_PRESET_ARGB8888);
EGLint eglConfigList[] =
{
EGL_RED_SIZE, 8,
EGL_GREEN_SIZE, 8,
EGL_BLUE_SIZE, 8,
EGL_ALPHA_SIZE, 8,
EGL_DEPTH_SIZE, 16,
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
EGL_NONE
};
__player->SetEglAttributeList(eglConfigList);
__player->Start();
}
__renderer = new GlRendererTemplate();
__player->SetIGlRenderer(__renderer);
int w = __renderer->GetTargetControlWidth();
int h = __renderer->GetTargetControlHeight();
if (settings->debugButtonPos > 0) {
// デバッグボタン作成
// TODO: XMLで作成
int dy = 0;
if (settings->showStatusBar) {
dy = 60;
}
Button* pDebugButton = new Button();
if (settings->debugButtonPos == 1) {
pDebugButton->Construct(Rectangle(w-80, h-80-dy, 70, 70), L"D");
} else if (settings->debugButtonPos == 2) {
pDebugButton->Construct(Rectangle(10, h-80-dy, 70, 70), L"D");
} else if (settings->debugButtonPos == 3) {
pDebugButton->Construct(Rectangle(w-80, 10, 70, 70), L"D");
} else {
pDebugButton->Construct(Rectangle(10, 10, 70, 70), L"D");
}
pDebugButton->SetActionId(ID_DEBUG_BUTTON);
pDebugButton->AddActionEventListener(*this);
pForm->AddControl(pDebugButton);
// ポップアップ作成
__pPopup = new Popup();
__pPopup->Construct(true, Dimension(600, 800));
__pPopup->SetTitleText(L"DebugConsole");
// ポップアップを閉じるボタン作成
Button* pCloseButton = new Button();
pCloseButton->Construct(Rectangle(30, 600, 250, 80), L"Cancel");
pCloseButton->SetActionId(ID_BUTTON_CLOSE_POPUP);
pCloseButton->AddActionEventListener(*this);
__pPopup->AddControl(pCloseButton);
// OKボタン作成
Button* pOKButton = new Button();
pOKButton->Construct(Rectangle(320, 600, 250, 80), L"OK");
pOKButton->SetActionId(ID_BUTTON_OK_POPUP);
pOKButton->AddActionEventListener(*this);
__pPopup->AddControl(pOKButton);
// テキスト入力
__pEditField = new EditField();
__pEditField->Construct(Rectangle(30, 500, 540, 80));
__pPopup->AddControl(__pEditField);
// 説明テキスト
std::vector<char> textBuff;
GCGetResourceData("etc/debug.txt", textBuff);
textBuff.push_back('\n');
String text = String(&textBuff[0]);
TextBox *pTextBox = new TextBox();
pTextBox->Construct(Rectangle(30, 50, 540, 430));
pTextBox->SetTextSize(18);
pTextBox->SetText(text);
__pPopup->AddControl(pTextBox);
}
// サイズを通知
DeviceOrientation o = this->ConvertOrientState(pFrame->GetOrientationStatus());
gcube->onSizeChanged(w, h, o);
if (settings->useOrientationSensor) {
__sensorManager.Construct();
this->CreateSensor();
}
return true;
}