本文整理汇总了C++中I18NCategory::GetName方法的典型用法代码示例。如果您正苦于以下问题:C++ I18NCategory::GetName方法的具体用法?C++ I18NCategory::GetName怎么用?C++ I18NCategory::GetName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类I18NCategory
的用法示例。
在下文中一共展示了I18NCategory::GetName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateViews
void DisplayLayoutScreen::CreateViews() {
if (g_Config.bStretchToDisplay) {
// Shouldn't even be able to get here as the way into this dialog should be closed.
return;
}
const Bounds &bounds = screenManager()->getUIContext()->GetBounds();
local_dp_xres = bounds.w;
local_dp_yres = bounds.h;
using namespace UI;
I18NCategory *di = GetI18NCategory("Dialog");
I18NCategory *gr = GetI18NCategory("Graphics");
root_ = new AnchorLayout(new LayoutParams(FILL_PARENT, FILL_PARENT));
// Just visual boundaries of the screen, should be easier to use than imagination
float verticalBoundaryPositionL = local_dp_xres / 4.0f;
float verticalBoundaryPositionR = local_dp_xres - verticalBoundaryPositionL;
float horizontalBoundaryPositionL = local_dp_yres / 4.0f;
float horizontalBoundaryPositionR = local_dp_yres - horizontalBoundaryPositionL;
TabHolder *verticalBoundaryL = new TabHolder(ORIENT_VERTICAL, verticalBoundaryPositionL, new AnchorLayoutParams(0, 0, 0, 0, false));
TabHolder *verticalBoundaryR = new TabHolder(ORIENT_VERTICAL, verticalBoundaryPositionR, new AnchorLayoutParams(0, 0, 0, 0, false));
TabHolder *horizontalBoundaryL = new TabHolder(ORIENT_VERTICAL, verticalBoundaryPositionL * 2.0f, new AnchorLayoutParams(verticalBoundaryPositionL * 2.0f, horizontalBoundaryPositionL - 31.0f, 0, 0, true));
TabHolder *horizontalBoundaryR = new TabHolder(ORIENT_VERTICAL, verticalBoundaryPositionL * 2.0f, new AnchorLayoutParams(verticalBoundaryPositionL * 2.0f, horizontalBoundaryPositionR + 31.0f, 0, 0, true));
AnchorLayout *topBoundary = new AnchorLayout(new LayoutParams(FILL_PARENT, FILL_PARENT));
AnchorLayout *bottomBoundary = new AnchorLayout(new LayoutParams(FILL_PARENT, FILL_PARENT));
root_->Add(verticalBoundaryL);
root_->Add(verticalBoundaryR);
root_->Add(horizontalBoundaryL);
root_->Add(horizontalBoundaryR);
horizontalBoundaryL->AddTab("", topBoundary);
horizontalBoundaryR->AddTab("", bottomBoundary);
Choice *back = new Choice(di->T("Back"), "", false, new AnchorLayoutParams(leftColumnWidth, WRAP_CONTENT, 10, NONE, NONE, 10));
static const char *zoomLevels[] = { "Auto", "1x", "2x", "3x", "4x", "5x", "6x", "7x", "8x", "9x", "10x" };
zoom_ = new PopupMultiChoice(&g_Config.iSmallDisplayZoom, gr->T("Zoom settings"), zoomLevels, 0, ARRAY_SIZE(zoomLevels), gr->GetName(), screenManager(), new AnchorLayoutParams(300, WRAP_CONTENT, verticalBoundaryPositionL * 2 - 150, NONE, NONE, 10));
zoom_->OnChoice.Handle(this, &DisplayLayoutScreen::OnZoomChange);
mode_ = new ChoiceStrip(ORIENT_VERTICAL, new AnchorLayoutParams(leftColumnWidth, WRAP_CONTENT, 10, NONE, NONE, 158 + 64 + 10));
if (g_Config.iSmallDisplayZoom == 0) {
mode_->AddChoice(gr->T("Active (Auto)"));
float autoBound = bounds.w / 480.0f * 8.0f;
g_Config.fSmallDisplayCustomZoom = autoBound;
g_Config.fSmallDisplayOffsetX = 0.5f;
g_Config.fSmallDisplayOffsetY = 0.5f;
} else {
Choice *center = new Choice(di->T("Center"), "", false, new AnchorLayoutParams(leftColumnWidth, WRAP_CONTENT, 10, NONE, NONE, 84));
center->OnClick.Handle(this, &DisplayLayoutScreen::OnCenter);
root_->Add(center);
mode_->AddChoice(di->T("Move"));
mode_->AddChoice(di->T("Resize"));
mode_->SetSelection(0);
}
back->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
root_->Add(mode_);
root_->Add(zoom_);
root_->Add(back);
displayRepresentation_ = new DragDropDisplay(g_Config.fSmallDisplayOffsetX, g_Config.fSmallDisplayOffsetY, I_PSP_DISPLAY, g_Config.fSmallDisplayCustomZoom);
if (g_Config.iInternalScreenRotation == 2 || g_Config.iInternalScreenRotation == 4) {
displayRepresentation_->SetAngle(90.0f);
}
root_->Add(displayRepresentation_);
}