Lukas Dürrenberger
053ef0b483
Prefer try_emplace over emplace for maps
2024-09-27 10:10:23 -06:00
binary1248
e185f6d53e
Replace factory functions with throwing constructors
2024-08-08 09:19:32 -06:00
binary1248
698f265277
(Re-)Introduce default constructors and load/open member functions for resource objects that can be reused.
2024-08-08 09:19:32 -06:00
kimci86
fca4fa1aa2
Rename Font::loadFromFile into Font::openFromFile
...
Similar renaming for Font::loadFromMemory and Font::loadFromStream.
The goal is to better express the need to keep the source available,
similar to Music::openFromFile for example.
2024-06-25 22:53:28 +02:00
vittorioromeo
86c1a71a93
Remove default empty state of sf::Event
2024-06-23 19:11:10 +02:00
Chris Thrasher
504b850f03
Remove default empty state of sf::Font
2024-05-19 14:01:54 -06:00
trustytrojan
ca0a231b35
Add operator bool()
to sf::Event
for checking if the event type is not Empty
2024-05-03 22:50:59 +00:00
Chris Thrasher
59447dd8e5
Rewrite sf::Event
API to improve type safety
...
This new API is built on top of std::variant. This allows us to
store many different event types in a space-efficient way and access
the active event type in a type-safe manner that eliminates the
categories of UB that are possible with unions.
Co-authored-by: kimci86 <kimci86@hotmail.fr>
2024-05-01 18:00:58 +00:00
kimci86
39da2b829c
Make Keyboard::Key a scoped enumeration
2023-12-22 10:47:30 -06:00
Chris Thrasher
c3f69e5d64
Remove leading newlines
2023-11-29 15:54:38 -07:00
Chris Thrasher
2c99b3343a
Remove default sf::Text
constructor
2023-04-05 09:54:56 -06:00
Chris Thrasher
57a40c531f
Be explicit about when new keys are added to the map
2023-04-05 09:54:56 -06:00
Shiv
9bdf207818
Use std::clamp
2022-12-27 17:58:49 -06:00
Chris Thrasher
4f52793f7d
Run clang-format
2022-07-11 20:04:56 +02:00
Chris Thrasher
539483d329
Use std::array
2022-06-16 23:56:39 +02:00
Chris Thrasher
dbac180db5
Limit the scope of event object
2022-06-08 13:16:40 +02:00
Chris Thrasher
0785093ebc
Use sf::Vector2<T>
for numeric parameter pairs
2022-05-17 08:33:11 +02:00
Vittorio Romeo
18bb892625
Improve compilation times by removing some includes and avoiding heavy dependencies
2021-12-19 18:13:07 +01:00
Vittorio Romeo
e9e353a7b2
Remove redundant APIs taking '(x, y)' in favour of ones taking 'sf::Vector'
2021-12-15 11:22:46 +01:00
Vittorio Romeo
9a0cc4b7dc
Use alias declarations instead of 'typedef'
2021-12-08 17:58:13 +00:00
Vittorio Romeo
8be8a76cba
Use 'auto', range-'for', and structured bindings to improve some loops
2021-12-08 13:05:52 +01:00
Vittorio Romeo
51ebeaf383
Change most associative containers to their respective 'unordered' version
2021-12-06 14:01:56 +00:00
Lukas Dürrenberger
bc628c6b28
Fix warnings in examples
...
- Convert where necessary
- Adjust type where reasonable
- Use SYSTEM headers for gl.h, stb* and vulkan
2021-11-30 11:25:58 +01:00
MrZeusTheCoder
20238e758e
Switch example resources to public domain ones.
2021-04-02 22:16:22 +02:00
binary1248
fe1407b6b5
Added joystick example.
2018-04-05 17:29:38 +02:00