Created
August 9, 2012 20:50
-
-
Save Twinklebear/3307934 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Save the box's properties to a Json::Value and return it | |
| * @return Json::Value containing the box's properties | |
| */ | |
| Json::Value Save(){ | |
| Json::Value val; | |
| val["x"] = pos.x; | |
| val["y"] = pos.y; | |
| val["w"] = w; | |
| val["h"] = h; | |
| return val; | |
| } | |
| /* | |
| * Load the box's properties from a Json::Value | |
| * @param val The Json::Value containing the properties to load | |
| */ | |
| void Load(Json::Value val){ | |
| Set(val["x"].asInt(), val["y"].asInt(), | |
| val["w"].asInt(), val["h"].asInt()); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment