Libtesla Switch

From GameBrew
libtesla
Libteslanx.png
General
AuthorWerWolv
TypeDevelopments
Version1.3.3
LicenseGPL-2.0
Last Updated2020/04/16
Links
Download
Website
Source
Support Author

libtesla is the interface between the Tesla overlay loader and user-made Overlays. It handles all layer creation, UI creation, drawing and input management.

It's main goal is to make sure all overlays look and feel similar and don't differenciate themselves from the switch's native overlays.

User guide

An example for how to use libtesla can be found here.

To create your own Overlay, please consider creating a new repository using the official Tesla overlay template.

Please Note: While it is possible to create overlays without libtesla, it's highly recommended to not do so. libtesla handles showing and hiding of overlays, button combo detection, layer creation and a lot more. Not using it will lead to an inconsistent user experience when using multiple different overlays ultimately making it worse for the end user.

Screenshots

libteslanx2.png

libteslanx3.png

(Overlays do not show up on Screenshots. These pictures were taken using a capture card.)

Changelog

v1.3.3 2020/04/16

  • Removed access to the time service and replaced it with svcGetSystemTick to prevent crashes when too many sysmodules are running.
  • Some style fixes.

v1.3.2 2020/04/16

  • Fix compatibility with 10.0.0, please recompile your overlay with this.
    • libtesla now uses pl:s instead of pl:u for loading fonts to prevent using up qlaunch's or overlaydisp's pl:u session.
  • Fixed joy sticks not working as expected in detached mode. Thanks to @nastys.
  • Fix track bar touch calling it's callback repeatedly. Thanks to @HookedBehemoth for this and the following things.
  • Added screenshot combo which can capture overlays! It can be enabled in the config file (requires 10.0.0+).
  • Make list item texts scroll smoothly.
  • Added ability to add, insert and remove elements into/from from lists.
  • More cleanup.

v1.3.1 2020/03/30

  • Fixed HeaderOverlayFrame not getting touch input.
  • Make trackbar and list items feel better during scrolling.
  • Make back button work for touch.
  • Cleanup.

v1.3.0 2020/03/30

  • Added full touch support.
  • Added Trackbars.
  • Rewrote scrolling in lists. This means scroll animations.
  • Completely fixed all rendering artifacts and slowdowns in 3D games.
  • Fixed crashes when adding items to a list and clearing it after it has been created already.
  • Added functions to change OverlayFrame title and subtitle.
  • Added HeaderOverlayFrame that allows for custom drawn headers above the usual content.
  • Fixed joy stick input only working properly in handheld mode.
  • Make all draw functions take int32s now.
  • Lots of style fixes and fancy pants things by @HookedBehemoth.
    • Holding down directional button to scroll in lists.
    • Trackbar improvements.
    • ListItem text scrolling and truncation if it's too long.
  • libtesla now uses raw fs calls instead of stdio which reduces file size by a lot by @HookedBehemoth.
  • Lots of fixes and internal improvements by @diwo.
  • Thanks a ton to all contributors.

v1.2.0 2020/03/29

  • Fixed crash when OverlayFrame had no content.
  • Allow arguments to be passed to Guis on creation.
  • Added back ClickListener and StateChangeListener that went missing with the rewrite.
  • Made initial Gui to load not be a template argument but rather a function that gets called.
    • This allows you to load different initial Guis depending on runtime variables.
  • Added Doxygen documentation.
  • Fixed crash when loading new Guis.
  • Thanks a lot again to @diwo for many critical bugfix PRs.

v1.1.1 2020/03/29

  • Removed the makefile as it's no longer necessary now.
  • Fixed initServices, exitServices and handleInputs never got called.
  • Use default values for list item heights if the element is of a known type.

v1.1.0 2020/03/29

  • Completely reworked libtesla's structure.
    • libtesla's now a header-only library.
  • Added ability to read config values from sdmc:/config/tesla/config.ini.
    • Currently only supports changing of the key combo.
  • Lots of bug fixes on the way.
    • Fixed drawing of white space characters with drawString.
    • Improved frame rate.
    • Lots of fixes from the recent PRs by @diwo.
    • Prevent focus glitchout when pressing the home or power button.

v1.0.1 2020/03/29

  • Fixed a bug that rarely caused crashes when moving the focus around in a list.
  • Fixed inputs only be accepted from handheld mode.

v1.0.0 2020/03/29

  • Initial release.

Credits

  • switchbrew for nx-hbloader which is used as basis for overlay loading.
  • kardch for the amazing icon.
  • All the devs on AtlasNX, RetroNX and Switchbrew for their feedback.
  • All overlay devs for making something awesome out of this.

External links

Advertising: