本文整理汇总了C++中GuiText::setTextBlur方法的典型用法代码示例。如果您正苦于以下问题:C++ GuiText::setTextBlur方法的具体用法?C++ GuiText::setTextBlur怎么用?C++ GuiText::setTextBlur使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GuiText
的用法示例。
在下文中一共展示了GuiText::setTextBlur方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GuiFrame
//.........这里部分代码省略.........
okButton.setTrigger(&wpadTouchTrigger);
okButton.setSoundClick(buttonClickSound);
okButton.setEffectGrow();
append(&okButton);
titleText.setColor(glm::vec4(1.0f, 1.0f, 1.0f, 1.0f));
titleText.setFontSize(46);
titleText.setPosition(0, 230);
titleText.setBlurGlowColor(5.0f, glm::vec4(0.0, 0.0, 0.0f, 1.0f));
titleText.setText(strTitle.c_str());
append(&titleText);
deleteButton.setImage(&deleteButtonImg);
deleteButton.setImageOver(&deleteButtonImgClick);
deleteButton.setTrigger(&touchTrigger);
deleteButton.setTrigger(&wpadTouchTrigger);
deleteButton.setSoundClick(buttonClickSound);
deleteButton.setPosition(-(keyPadButtonImgData->getWidth() + 5) * (MAX_COLS - 1) * 0.5f + (keyPadButtonImgData->getWidth() + 5) * MAX_COLS, -60);
deleteButton.setEffectGrow();
deleteButton.clicked.connect(this, &KeyPadMenu::OnDeleteButtonClick);
append(&deleteButton);
for(int i = 0; i < MAX_FIELDS; i++)
{
char fieldTxt[2];
fieldTxt[0] = (i < (int)currentText.size()) ? currentText[i] : 0;
fieldTxt[1] = 0;
GuiText *text = new GuiText(fieldTxt, 46, glm::vec4(0.0f, 0.0f, 0.0f, 1.0f));
GuiImage *image = new GuiImage(fieldImageData);
GuiButton *button = new GuiButton(image->getWidth(), image->getHeight());
button->setImage(image);
button->setLabel(text);
button->setPosition(-(image->getWidth() + 8) * (MAX_FIELDS - 1) * 0.5f + (image->getWidth() + 8) * i, 120);
button->setTrigger(&touchTrigger);
button->setTrigger(&wpadTouchTrigger);
button->setSoundClick(buttonClickSound);
button->clicked.connect(this, &KeyPadMenu::OnTextPositionChange);
append(button);
textFieldText.push_back(text);
textFieldImg.push_back(image);
textFieldBtn.push_back(button);
}
fieldBlinkerImg.setAlignment(ALIGN_LEFT | ALIGN_LEFT);
fieldBlinkerImg.setPosition(5, 0);
if(textPosition < MAX_FIELDS)
textFieldBtn[textPosition]->setIcon(&fieldBlinkerImg);
int row = 0, column = 0;
for(int i = 0; cpKeyPadButtons[i]; i++)
{
char buttonTxt[2];
buttonTxt[0] = cpKeyPadButtons[i];
buttonTxt[1] = 0;
GuiImage *image = new GuiImage(keyPadButtonImgData);
GuiImage *imageClick = new GuiImage(keyPadButtonClickImgData);
GuiButton *button = new GuiButton(image->getWidth(), image->getHeight());
GuiText *text = new GuiText(buttonTxt, 46, glm::vec4(0.0f, 0.0f, 0.0f, 1.0f));
text->setTextBlur(5.0f);
button->setImage(image);
button->setImageOver(imageClick);
button->setLabel(text);
button->setPosition(-(image->getWidth() + 5) * (MAX_COLS - 1) * 0.5f + (image->getWidth() + 5) * column, -60 - (image->getHeight() + 5) * row);
button->setTrigger(&touchTrigger);
button->setTrigger(&wpadTouchTrigger);
button->setSoundClick(buttonClickSound);
button->setEffectGrow();
button->clicked.connect(this, &KeyPadMenu::OnKeyPadButtonClick);
append(button);
keyText.push_back(text);
keyButton.push_back(button);
keyImg.push_back(image);
keyImgOver.push_back(imageClick);
column++;
if(column >= MAX_COLS)
{
column = 0;
row++;
}
}
DPADButtons.setTrigger(&buttonATrigger);
DPADButtons.setTrigger(&buttonBTrigger);
DPADButtons.clicked.connect(this, &KeyPadMenu::OnDPADClick);
append(&DPADButtons);
UpdateTextFields();
}