本文整理汇总了C++中CVideo::getTvWidth方法的典型用法代码示例。如果您正苦于以下问题:C++ CVideo::getTvWidth方法的具体用法?C++ CVideo::getTvWidth怎么用?C++ CVideo::getTvWidth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CVideo
的用法示例。
在下文中一共展示了CVideo::getTvWidth方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GuiFrame
GameLauncherMenu::GameLauncherMenu(int gameIdx)
: GuiFrame(0,0)
, gameIdx(gameIdx)
, bgImage(500, 500, (GX2Color){0, 0, 0, 255})
, bgBlur(1280, 720, (GX2Color){0, 0, 0, 255})
, noCover(Resources::GetFile("noCover.png"), Resources::GetFileSize("noCover.png"))
, buttonClickSound(Resources::GetSound("settings_click_2.mp3"))
, quitImageData(Resources::GetImageData("quitButton.png"))
, quitImage(quitImageData)
, quitSelectedImageData(Resources::GetImageData("quitButtonSelected.png"))
, quitSelectedImage(quitSelectedImageData)
, quitButton(quitImage.getWidth(), quitImage.getHeight())
, okImageData(Resources::GetImageData("emptyRoundButton.png"))
, okImage(okImageData)
, okSelectedImageData(Resources::GetImageData("emptyRoundButtonSelected.png"))
, okSelectedImage(okSelectedImageData)
, okButton(okImage.getWidth(), okImage.getHeight())
, okText("O.K.", 46, glm::vec4(0.1f, 0.1f, 0.1f, 1.0f))
, titleImageData(Resources::GetImageData("settingsTitle.png"))
, titleImage(titleImageData)
, extraSaveText(tr("Extra Save:"), 40, glm::vec4(0.8f, 0.8f, 0.8f, 1.0f))
, dlcEnableText(tr("Enable DLC Support:"), 40, glm::vec4(0.8f, 0.8f, 0.8f, 1.0f))
, frameImageData(Resources::GetImageData("gameSettingsFrame.png"))
, frameImage(frameImageData)
, touchTrigger(GuiTrigger::CHANNEL_1, GuiTrigger::VPAD_TOUCH)
, wpadTouchTrigger(GuiTrigger::CHANNEL_2 | GuiTrigger::CHANNEL_3 | GuiTrigger::CHANNEL_4 | GuiTrigger::CHANNEL_5, GuiTrigger::BUTTON_A)
, buttonATrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_A, true)
, buttonBTrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_B, true)
, buttonLTrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_L, true)
, buttonRTrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_R, true)
, buttonLeftTrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_LEFT | GuiTrigger::STICK_L_LEFT, true)
, buttonRightTrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_RIGHT | GuiTrigger::STICK_L_RIGHT, true)
, buttonUpTrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_UP | GuiTrigger::STICK_L_UP, true)
, buttonDownTrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_DOWN | GuiTrigger::STICK_L_DOWN, true)
, leftArrowImageData(Resources::GetImageData("leftArrow.png"))
, rightArrowImageData(Resources::GetImageData("rightArrow.png"))
, leftArrowImage(leftArrowImageData)
, rightArrowImage(rightArrowImageData)
, leftArrowButton(leftArrowImage.getWidth(), leftArrowImage.getHeight())
, rightArrowButton(rightArrowImage.getWidth(), rightArrowImage.getHeight())
, DPADButtons(0,0)
, extraSaveBox(false)
, dlcEnableBox(false)
, progresswindow("")
, pathSelectBox(tr("Update Folder"),NULL)
, saveModeSelectBox(tr("Save Mode"),NULL)
, launchModeSelectBox(tr("Launch Mode"),NULL)
, bgUsedImageDataAsync(NULL)
, bgNewImageDataAsync(NULL)
, bgFadingImageDataAsync(NULL)
{
bFocusChanged = true;
gamelauncherelementfocus = GamelaunchermenuFocus::OK;
//Settings up the values for the selectboxes that don't change
savemode_size = sizeof(ValueGameSaveModes) / sizeof(ValueGameSaveModes[0]);
saveModeNames[tr("<Settings Default>")] = strfmt("%d", GAME_SAVES_DEFAULT);
for(int i = 0; i < savemode_size; i++){
saveModeNames[ValueGameSaveModes[i].name] = strfmt("%d",ValueGameSaveModes[i].value);
}
launchmode_size = sizeof(ValueLaunchMode) / sizeof(ValueLaunchMode[0]);
launchModeNames[tr("<Settings Default>")] = strfmt("%d", LOADIINE_MODE_DEFAULT);
for(int i = 0; i < launchmode_size; i++){
launchModeNames[ValueLaunchMode[i].name] = strfmt("%d",ValueLaunchMode[i].value);
}
progresswindow.setVisible(false);
Application::instance()->getMainWindow()->gameLauncherMenuNextClicked.connect(this,&GameLauncherMenu::OnGotHeaderFromMain);
CVideo * video = Application::instance()->getVideo();
width = video->getTvWidth()*windowScale;
height = video->getTvHeight()*windowScale;
gameLauncherMenuFrame = GuiFrame(width, height);
bgImage.setSize(width,height);
frameImage.setScale(windowScale);
bgBlur.setAlpha(0.85f);
append(&bgBlur);
append(&bgImage);
append(&frameImage);
titleImage.setScale(windowScale);
titleText.setColor(glm::vec4(1.0f, 1.0f, 1.0f, 1.0f));
titleText.setFontSize(46);
titleText.setPosition(0, 10);
titleText.setBlurGlowColor(5.0f, glm::vec4(0.0, 0.0, 0.0f, 1.0f));
append(&titleImage);
append(&titleText);
titleText.setParent(&titleImage);
titleImage.setAlignment(ALIGN_MIDDLE | ALIGN_TOP);
quitButton.setImage(&quitImage);
quitButton.setIconOver(&quitSelectedImage);
quitButton.setAlignment(ALIGN_BOTTOM | ALIGN_LEFT);
quitButton.clicked.connect(this, &GameLauncherMenu::OnQuitButtonClick);
quitButton.setTrigger(&touchTrigger);
quitButton.setTrigger(&wpadTouchTrigger);
//.........这里部分代码省略.........