当前位置: 首页>>代码示例>>C++>>正文


C++ GuiText::SetAlignment方法代码示例

本文整理汇总了C++中GuiText::SetAlignment方法的典型用法代码示例。如果您正苦于以下问题:C++ GuiText::SetAlignment方法的具体用法?C++ GuiText::SetAlignment怎么用?C++ GuiText::SetAlignment使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GuiText的用法示例。


在下文中一共展示了GuiText::SetAlignment方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: AddButton

void IconEmuMiiBrowser::AddButton()
{
	//!File Icon
	GuiImage * BtnImg = new GuiImage(fileMii);
	BtnImg->SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
	BtnImg->SetPosition(0, 10);
	ButtonImg.push_back(BtnImg);

	//!File Name
	GuiText * BtnTxt = new GuiText((char *) NULL, 14, (GXColor){0, 0, 0, 255});
	BtnTxt->SetAlignment(ALIGN_CENTRE, ALIGN_BOTTOM);
	BtnTxt->SetPosition(0, -20);
	BtnTxt->SetLinesToDraw(2);
	BtnTxt->SetMaxWidth(75, WRAP);
	ButtonText.push_back(BtnTxt);

	//!selection img
	GuiImage * Marker = new GuiImage(bgSelectionEntry);
	Marker->SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
	Marker->SetPosition(0, -7);
	FileSelectionImg.push_back(Marker);

	//!tooltip
	GuiTooltip * tmpToolTip = new GuiTooltip((char *) NULL);
	tmpToolTip->SetPosition(0, 0);
	Tooltip.push_back(tmpToolTip);

	GuiButton * Btn = new GuiButton(90, 90);
	Btn->SetParent(this);
	Btn->SetLabel(BtnTxt);
	Btn->SetIcon(BtnImg);
	Btn->SetImageOver(Marker);
	Btn->SetTrigger(trigA);
	Btn->SetSoundClick(btnSoundClick);
	Btn->SetToolTip(tmpToolTip, 0, 0, ALIGN_CENTRE, ALIGN_TOP);
	Buttons.push_back(Btn);
}
开发者ID:djskual,项目名称:savegame-manager-gx,代码行数:37,代码来源:IconEmuMiiBrowser.cpp

示例2: InternalShowGameInfo


//.........这里部分代码省略.........
	GuiImage * dialogBoxImg33 = NULL;
	GuiImage * dialogBoxImg44 = NULL;
	GuiImage * coverImg = NULL;

	GuiImageData * classiccontrollerImgData = NULL;
	GuiImageData * nunchukImgData = NULL;
	GuiImageData * guitarImgData = NULL;
	GuiImageData * drumsImgData = NULL;
	GuiImageData * motionplusImgData = NULL;
	GuiImageData * wheelImgData = NULL;
	GuiImageData * balanceboardImgData = NULL;
	GuiImageData * dancepadImgData = NULL;
	GuiImageData * microphoneImgData = NULL;
	GuiImageData * zapperImgData = NULL;
	GuiImageData * nintendodsImgData = NULL;
	GuiImageData * wiispeakImgData = NULL;
	//GuiImageData * vitalitysensorImgData = NULL;
	GuiImageData * gamecubeImgData = NULL;
	GuiImageData * ratingImgData = NULL;
	GuiImageData * cover = NULL;

	GuiText * releasedTxt = NULL;
	GuiText * publisherTxt = NULL;
	GuiText * developerTxt = NULL;
	GuiText * titleTxt = NULL;
	Text * synopsisTxt = NULL;
	GuiText * genreTitleTxt = NULL;
	GuiText ** genreTxt = NULL;
	GuiText ** wifiTxt = NULL;
	GuiText * gametdb1Txt = NULL;
	GuiText * memTxt = NULL;

	GuiWindow gameinfoWindow(600, 308);
	gameinfoWindow.SetAlignment(ALIGN_CENTER, ALIGN_MIDDLE);
	gameinfoWindow.SetPosition(0, -50);

	GuiWindow InfoWindow(600, 308);
	InfoWindow.SetAlignment(ALIGN_LEFT, ALIGN_TOP);

	GuiWindow txtWindow(350, 270);
	txtWindow.SetAlignment(ALIGN_CENTER, ALIGN_TOP);
	txtWindow.SetPosition(95, 40);

	GuiImageData dialogBox1(Resources::GetFile("gameinfo1.png"), Resources::GetFileSize("gameinfo1.png"));
	GuiImageData dialogBox2(Resources::GetFile("gameinfo1a.png"), Resources::GetFileSize("gameinfo1a.png"));
	GuiImageData dialogBox3(Resources::GetFile("gameinfo2.png"), Resources::GetFileSize("gameinfo2.png"));
	GuiImageData dialogBox4(Resources::GetFile("gameinfo2a.png"), Resources::GetFileSize("gameinfo2a.png"));

	GuiTrigger trig1;
	trig1.SetButtonOnlyTrigger(-1, WPAD_BUTTON_1 | WPAD_CLASSIC_BUTTON_X, 0);
	GuiTrigger trigA;
	trigA.SetButtonOnlyTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
	GuiTrigger trigB;
	trigB.SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B);
	GuiTrigger trigU;
	trigU.SetButtonOnlyTrigger(-1, WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP, PAD_BUTTON_UP);
	GuiTrigger trigD;
	trigD.SetButtonOnlyTrigger(-1, WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN, PAD_BUTTON_DOWN);
	GuiTrigger trigH;
	trigH.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0);

	//buttons for changing between synopsis and other info
	GuiButton backBtn(0, 0);
	backBtn.SetPosition(-20, -20);
	backBtn.SetTrigger(&trigB);
	gameinfoWindow.Append(&backBtn);
开发者ID:Jeremy-D-Miller,项目名称:usbloader-gui,代码行数:67,代码来源:gameinfo.cpp

示例3: AddOption

void GuiArrowOption::AddOption(const char * name, int PositionX, int PositionY)
{
    int Center = PositionX;

    GuiText * OptName = new GuiText(name, 16, (GXColor) {
        0, 0, 0, 255
    });
    OptName->SetAlignment(ALIGN_LEFT | ALIGN_TOP);
    OptName->SetPosition(Center-OptName->GetTextWidth()/2, PositionY);

    GuiText * OptText = new GuiText(" ", 16, (GXColor) {
        0, 0, 0, 255
    });
    OptText->SetPosition(Center-OptText->GetTextWidth()/2, PositionY+30);
    OptText->SetAlignment(ALIGN_LEFT | ALIGN_TOP);

    GuiButton * OptBtn = new GuiButton(OptName->GetTextWidth(), 18);
    OptBtn->SetSoundOver(btnSoundOver);
    OptBtn->SetSoundClick(btnClick);
    OptBtn->SetTrigger(trigA);
    OptBtn->SetPosition(Center-OptText->GetTextWidth()/2, PositionY+30);
    OptBtn->SetAlignment(ALIGN_LEFT | ALIGN_TOP);
    OptBtn->Clicked.connect(this, &GuiArrowOption::OnButtonClick);

    GuiImage * OptImgLeft = new GuiImage(ArrowImgData);
    OptImgLeft->SetAngle(180);
    GuiButton * OptBtnLeft = new GuiButton(OptImgLeft->GetWidth(), OptImgLeft->GetHeight());
    OptBtnLeft->SetImage(OptImgLeft);
    OptBtnLeft->SetSoundOver(btnSoundOver);
    OptBtnLeft->SetSoundClick(btnClick);
    OptBtnLeft->SetTrigger(trigA);
    OptBtnLeft->SetEffectGrow();
    OptBtnLeft->SetPosition(Center-(OptText->GetTextWidth()/2+10), PositionY+30);
    OptBtnLeft->SetAlignment(ALIGN_LEFT | ALIGN_TOP);
    OptBtnLeft->Clicked.connect(this, &GuiArrowOption::OnLeftButtonClick);

    GuiImage * OptImgRight = new GuiImage(ArrowImgData);
    GuiButton * OptBtnRight = new GuiButton(OptImgRight->GetWidth(), OptImgRight->GetHeight());
    OptBtnRight->SetImage(OptImgRight);
    OptBtnRight->SetSoundOver(btnSoundOver);
    OptBtnRight->SetSoundClick(btnClick);
    OptBtnRight->SetTrigger(trigA);
    OptBtnRight->SetEffectGrow();
    OptBtnRight->SetPosition(Center+(OptText->GetTextWidth()/2+10), PositionY+30);
    OptBtnRight->SetAlignment(ALIGN_LEFT | ALIGN_TOP);
    OptBtnRight->Clicked.connect(this, &GuiArrowOption::OnRightButtonClick);

    Append(OptName);
    Append(OptText);
    Append(OptBtn);
    Append(OptBtnLeft);
    Append(OptBtnRight);

    OptionsName.push_back(OptName);
    OptionsText.push_back(OptText);
    OptionsBtn.push_back(OptBtn);
    OptionsImgLeft.push_back(OptImgLeft);
    OptionsBtnLeft.push_back(OptBtnLeft);
    OptionsImgRight.push_back(OptImgRight);
    OptionsBtnRight.push_back(OptBtnRight);
}
开发者ID:SuperrSonic,项目名称:WiiXplorer-SS,代码行数:61,代码来源:gui_arrowoption.cpp


注:本文中的GuiText::SetAlignment方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。