19 Commits

Author SHA1 Message Date
RocketRobz bb846879b8 Add support for key repeats via UC_KEY_REPEAT flag 2021-09-03 21:21:37 -06:00
Pk11 a5448d1f57 Use const reference for text 2021-03-26 05:58:04 -05:00
Pk11 bb168fdab1 Add separate function to load a system font
The other fonts are smaller, so when printing they're multiplied to be about the same as the standard
2021-03-20 17:49:32 -05:00
Pk11 12759353de Let Gui::reinit have a specified font too 2021-03-19 16:47:42 -05:00
Pk11 cc53b7d72b Allow specifiying a font region 2021-03-19 16:39:48 -05:00
StackZ 0b0f88eb59 Update Copyright year to 2020-2021. 2021-01-17 22:29:49 +01:00
Pk11 155058f9a1 Use C2D flags for wrapping and centering 2020-10-25 02:44:22 -05:00
StackZ 30b04fa488 Some changes, see description for more.
- [GUI]: Add `std::string Gui::WrapText(...);`

- [GUI]: Some cleanup i guess.

- Remove HID part, cause it wasn't used anyways.
2020-10-19 11:12:20 +02:00
StackZ d47ce8842b Change to 2020 Universal-Team. 2020-07-01 08:44:06 +02:00
RocketRobz 9899de0428 Add GUI reinit 2020-06-30 23:51:31 -06:00
StackZ d0d78f2bfb Optional: Add stack of screens.
Use this if you're relying on the screens from before.
2020-05-27 13:25:38 +02:00
StackZ 95b3161f30 Remove Gui::CallConstructor();. 2020-05-26 12:17:27 +02:00
StackZ f2f7c0c868 Add Fade Effects for the Screens. 2020-05-26 07:07:55 +02:00
StackZ a5f7134d1c Major Screen changes. (If using the screen class, read the description!!)
Changes which are needed when using the screen class:

- Add `void callConstructor() override { }` to your screen's public header.
- Call `Gui::DrawScreen();` to draw the screen.
- Call `Gui::ScreenLogic(u32 hDown, u32 hHeld, touchPosition touch);` to call the Logic.
- Call `Gui::CallConstructor();` to call the used screen's constructor.
- call `Gui::setScreen(std::make_unique<ScreenName>(), <true/ false, depends if you like to transfer the screen to the usedScreen directly.>);` to set the screen.
- Call `Gui::transferScreen();` in case you like to set the tempScreen to the used one.
- Get rid of the `Gui::screenBack();` calls and use `Gui::setScreen(...)` directly for it.
2020-05-26 05:25:33 +02:00
StackZ f0dca7c784 Font & Text Changes.
`Gui::loadFont()` now needs a C2D_Font parameter & path. If you're using this, I suggest to update the function to match this. If you're using `Gui::loadFont()` to load the SystemFont, I suggest to remove that, since `Gui::init()` loads it now.

All the Text Functions can now optional use the C2D_Font parameter to use a specific font. (Uses SystemFont if nullptr.)

`Gui::unloadFont()` now needs a C2D_Font parameter to unload it.
2020-05-21 18:17:07 +02:00
StackZ 4dc2426fa5 Some more checks to avoid possible crashes. 2020-05-21 05:49:21 +02:00
StackZ a56b50c4c2 Remove tint param. 2020-03-05 05:44:50 +01:00
StackZ eceb6b884d Some changes & additions. (#2)
* Initial HID implementation.

Not everything may be right. I have to figure out some stuff tho.

* Add a tint param to `Gui::DrawSprite()`.

Also add Universal-Core logo.
2020-03-05 04:25:52 +01:00
StackZ 4ad2ee5517 Add Initial GUI core. 2020-02-05 13:32:47 +01:00