本文整理汇总了C++中UICheckBox::setPosition方法的典型用法代码示例。如果您正苦于以下问题:C++ UICheckBox::setPosition方法的具体用法?C++ UICheckBox::setPosition怎么用?C++ UICheckBox::setPosition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UICheckBox
的用法示例。
在下文中一共展示了UICheckBox::setPosition方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PolycodeEditor
PolycodeProjectEditor::PolycodeProjectEditor(PolycodeProjectManager *projectManager) : PolycodeEditor(true){
this->projectManager = projectManager;
Config *conf = CoreServices::getInstance()->getConfig();
String fontName = conf->getStringValue("Polycode", "uiDefaultFontName");
int fontSize = conf->getNumericValue("Polycode", "uiDefaultFontSize");
Number padding = conf->getNumericValue("Polycode", "uiWindowSkinPadding");
headerBg = new ScreenShape(ScreenShape::SHAPE_RECT,10,10);
addChild(headerBg);
headerBg->setPositionMode(ScreenEntity::POSITION_TOPLEFT);
headerBg->setColor(0.1, 0.1, 0.1, 1.0);
ScreenLabel *label = new ScreenLabel("PROJECT SETTINGS", 22, "section", Label::ANTIALIAS_FULL);
label->color.a = 0.4;
addChild(label);
label->setPosition(10, 0);
moduleSettingsWindow = new UIElement();
moduleSettingsWindow->setPosition(350,10);
addChild(moduleSettingsWindow);
Number lastYPos = 40;
label = new ScreenLabel("PROJECT MODULES", 22, "section", Label::ANTIALIAS_FULL);
label->color.a = 0.4;
moduleSettingsWindow->addChild(label);
label->setPosition(0, lastYPos);
lastYPos += 40;
String polycodeBasePath = CoreServices::getInstance()->getCore()->getDefaultWorkingDirectory();
std::vector<OSFileEntry> moduleFolders = OSBasics::parseFolder(polycodeBasePath+"/Standalone/Modules", false);
for(int i=0; i < moduleFolders.size(); i++) {
OSFileEntry entry = moduleFolders[i];
if(entry.type == OSFileEntry::TYPE_FOLDER) {
UICheckBox *moduleCheckBox = new UICheckBox(entry.name, false);
moduleCheckBox->setPosition(0, lastYPos);
lastYPos += moduleCheckBox->getHeight() + 5;
moduleSettingsWindow->addChild(moduleCheckBox);
moduleCheckboxes.push_back(moduleCheckBox);
}
}
lastYPos += 20;
label = new ScreenLabel("PROJECT FONTS", 22, "section", Label::ANTIALIAS_FULL);
label->color.a = 0.4;
moduleSettingsWindow->addChild(label);
label->setPosition(0, lastYPos);
lastYPos += 30;
fontEntryBase = new UIElement();
moduleSettingsWindow->addChild(fontEntryBase);
fontEntryBase->setPosition(0, lastYPos);
addFontButton = new UIButton("Add Font", 100);
fontEntryBase->addChild(addFontButton);
addFontButton->addEventListener(this, UIEvent::CLICK_EVENT);
mainSettingsWindow = new UIElement();
mainSettingsWindow->setPosition(0,10);
addChild(mainSettingsWindow);
ScreenLabel *label2 = new ScreenLabel(L"DEFAULT VIDEO OPTIONS", 22, "section", Label::ANTIALIAS_FULL);
label2->setColor(1.0, 1.0, 1.0, 0.4);
mainSettingsWindow->addChild(label2);
label2->setPosition(padding, 40);
label2 = new ScreenLabel(L"Width:", fontSize, fontName, Label::ANTIALIAS_FULL);
mainSettingsWindow->addChild(label2);
label2->setPosition(padding, 80);
defaultWidthInput = new UITextInput(false, 60, 12);
mainSettingsWindow->addChild(defaultWidthInput);
defaultWidthInput->setPosition(label2->getPosition().x, label2->getPosition().y+18);
defaultWidthInput->setNumberOnly(true);
label2 = new ScreenLabel(L"Height:", fontSize, fontName, Label::ANTIALIAS_FULL);
mainSettingsWindow->addChild(label2);
label2->setPosition(padding + 80, 80);
defaultHeightInput = new UITextInput(false, 60, 12);
mainSettingsWindow->addChild(defaultHeightInput);
defaultHeightInput->setPosition(label2->getPosition().x, label2->getPosition().y+18);
defaultHeightInput->setNumberOnly(true);
label2 = new ScreenLabel(L"Anti-aliasing:", fontSize, fontName, Label::ANTIALIAS_FULL);
mainSettingsWindow->addChild(label2);
label2->setPosition(padding + 160, 80);
//.........这里部分代码省略.........