示例#1
0
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();
}
示例#3
0
//--------------------------------------------------------------
void ofxMuiButton::saveToXml(ofxXmlSettings& xml)
{
	int		id		= saveObjectData();
	bool	value	= (buttonType == BUTTON_TYPE_BANG) ? false : (value == true);

	//props->mXml.setValue("OBJECT:VALUE", value, id);
}
示例#4
0
void ofxGuiButton::saveToXml()
{
	int		id		= saveObjectData();
	bool	value	= (mDisplay == kofxGui_Button_Trigger) ? false : mValue;
	
	mGlobals->mXml.setValue("OBJECT:VALUE", value, id);
}
示例#5
0
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);
}
示例#6
0
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);
}
示例#7
0
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();
}
示例#9
0
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();
}
示例#10
0
void ofxGuiColor::saveToXml()
{
	int id = saveObjectData();
	
	mGlobals->mXml.setValue("OBJECT:VALUE", rgbaToString(mValue, kofxGui_Color_RGBA), id);
}
示例#11
0
void ofxGuiArrow::saveToXml() {
	// TODO
	saveObjectData();
}
示例#12
0
void ofxGuiGrid::saveToXml() {
	// TODO
	saveObjectData();
}