https://github.com/imbrn/cocos-strings
Cocos2d-x helping tool to work with strings files.
https://github.com/imbrn/cocos-strings
clean-code cocos2d-x strings tool
Last synced: 12 months ago
JSON representation
Cocos2d-x helping tool to work with strings files.
- Host: GitHub
- URL: https://github.com/imbrn/cocos-strings
- Owner: imbrn
- Created: 2017-03-20T17:33:31.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-20T18:42:48.000Z (over 9 years ago)
- Last Synced: 2025-03-26T16:52:59.751Z (about 1 year ago)
- Topics: clean-code, cocos2d-x, strings, tool
- Language: C++
- Size: 68.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Cocos Strings
===
[Cocos2d-x](http://cocos2d-x.org/) helping tool to work with strings files.
This tool was developed to provide an easy way to read strings from a file.
## How to use
* Add `cocos2d/external` to include directories.
* Add the project files to your include directories and path.
* Create json:
```json
{
"name": "My name",
"other_key": "Other key value",
"many_strings": ["string one", "string two", "string three"]
}
```
* In your code:
```c++
auto my_strings = strings::Strings::fromJsonFile("strings.json");
// Ready single string
auto name = my_strings.get_string("name");
// Ready many strings
auto many_strings = my_strings.get_strings("many_strings");
}
```
## Dependencies
* [Cocos2d-x](http://cocos2d-x.org/) 3.14 or higher.