Skip to content

Commit f7556e2

Browse files
committed
Update information
1 parent 4c327ec commit f7556e2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,15 @@ with wrappers.
2929
The API attempts to be similar to SFML's, but some general changes are present:
3030

3131
- There is a clear separation between "classes" and "structs". Classes are wrapped, and structs are taken directly from `lib`s, making them limited, for example, instead of instance methods they have functions in the root of the namespace.
32+
- Everything is renamed to `snake_case`.
3233
- To construct an object (`sf::SomeType x(param)`):
3334
- `x = SF::SomeType.new(param)` for classes.
3435
- `x = SF::some_type(param)` for structs.
35-
- Member functions, such as `loadFromFile`, that are used for initialization, are just overloaded `initialize`.
36-
- Everything is renamed to `snake_case`.
36+
- Use `SF::Vector2(T)`, `SF.vector2(x, y)` instead of `Vector2(f|i)`. 2-tuples can often be used instead.
37+
- Member functions, such as `loadFromFile`, that are used for initialization, become class methods (`from_file`).
3738
- Getter, setter functions are changed:
38-
- `x.getSomeProperty()` and `x.isSomeProperty()` both become `x.some_property`.
39+
- `x.getSomeProperty()` becomes `x.some_property`.
40+
- `x.isSomeProperty()` becomes `x.some_property?`.
3941
- `x.setSomeProperty(v)` becomes `x.some_property = v`.
4042
- SFML sometimes uses `enum` values as bitmasks. You can combine them using the `|` operator.
4143
- Unicode just works.

0 commit comments

Comments
 (0)