void ofxGuiPoints::saveToXml() { int id = saveObjectData(); mGlobals->mXml.setValue("OBJECT:MIN_X", mMinVal.x, id); mGlobals->mXml.setValue("OBJECT:MIN_Y", mMinVal.y, id); mGlobals->mXml.setValue("OBJECT:MAX_X", mMaxVal.x, id); mGlobals->mXml.setValue("OBJECT:MAX_Y", mMaxVal.y, id); mGlobals->mXml.setValue("OBJECT:VALUE_X", mValue.x, id); mGlobals->mXml.setValue("OBJECT:VALUE_Y", mValue.y, id); mGlobals->mXml.pushTag("OBJECT", id); for(int i = 0; i < mList.points.size(); i++) { ofxPoint2f p = mList.points.at(i); id = mGlobals->mXml.addTag("POINT"); mGlobals->mXml.setValue("POINT:X", p.x, id); mGlobals->mXml.setValue("POINT:Y", p.y, id); } mGlobals->mXml.popTag(); }
void ofxGuiMatrix::saveToXml() { int id = saveObjectData(); mGlobals->mXml.setValue("OBJECT:XGRID", mXGrid, id); mGlobals->mXml.setValue("OBJECT:YGRID", mYGrid, id); mGlobals->mXml.setValue("OBJECT:VALUE", mValue, id); mGlobals->mXml.setValue("OBJECT:SPACING", mSpacing, id); mGlobals->mXml.pushTag("OBJECT", id); for(int i = 0; i < mBufferLength; i++) { int v = mBuffer[i]; if(v == 0) continue; id = mGlobals->mXml.addTag("PAD"); mGlobals->mXml.setValue("PAD:INDEX", i, id); mGlobals->mXml.setValue("PAD:VALUE", v, id); } mGlobals->mXml.popTag(); }
//-------------------------------------------------------------- void ofxMuiButton::saveToXml(ofxXmlSettings& xml) { int id = saveObjectData(); bool value = (buttonType == BUTTON_TYPE_BANG) ? false : (value == true); //props->mXml.setValue("OBJECT:VALUE", value, id); }
void ofxGuiButton::saveToXml() { int id = saveObjectData(); bool value = (mDisplay == kofxGui_Button_Trigger) ? false : mValue; mGlobals->mXml.setValue("OBJECT:VALUE", value, id); }
void ofxGuiRadar::saveToXml() { int id = saveObjectData(); mGlobals->mXml.setValue("OBJECT:MIN", mMinVal, id); mGlobals->mXml.setValue("OBJECT:MAX", mMaxVal, id); mGlobals->mXml.setValue("OBJECT:VALUE", mValue, id); }
void ofxGuiFiles::saveToXml() { int id = saveObjectData(); mGlobals->mXml.setValue("OBJECT:VALUE", mValue, id); mGlobals->mXml.setValue("OBJECT:SUBPATH", mPath, id); mGlobals->mXml.setValue("OBJECT:SUFFIX", mSuffix, id); }
bool Cocos2dxView::saveDataToFile(QString filepath) { JsonX data; CCArray *object_arr = getEditorScene()->getObjectLayer()->getChildren(); CCObject *_obj; CCARRAY_FOREACH(object_arr, _obj) { BaseObject *object = (BaseObject*)_obj; saveObjectData(data, object); }
void DialogObjectEdit::on_buttonBox_accepted() { if (ui->NpcName->text().contains(".", Qt::CaseInsensitive)) { QMessageBox::warning(this, "Error", "Object name cannot contain dot character."); return; } printf(">> DialogObjectEdit::on_buttonBox_accepted\n"); saveObjectData(dataExchanger->selectedNPC); emit finishedObjectEditor(); close(); }
void ofxGuiPanel::saveToXml() { ofxGuiObject* tmpObj; int id = saveObjectData(); mGlobals->mXml.setValue("OBJECT:BORDER", mBorder, id); mGlobals->mXml.setValue("OBJECT:SPACING", mSpacing, id); mGlobals->mXml.pushTag("OBJECT", id); for(int i = 0; i < mObjects.size(); i++) { tmpObj = (ofxGuiObject*)mObjects.at(i); tmpObj->saveToXml(); } mGlobals->mXml.popTag(); }
void ofxGuiColor::saveToXml() { int id = saveObjectData(); mGlobals->mXml.setValue("OBJECT:VALUE", rgbaToString(mValue, kofxGui_Color_RGBA), id); }
void ofxGuiArrow::saveToXml() { // TODO saveObjectData(); }
void ofxGuiGrid::saveToXml() { // TODO saveObjectData(); }