Skip to content
/ cfGUI Public
forked from JF002/cfGUI

A simple GUI library for M5Stack (ESP32)

License

Notifications You must be signed in to change notification settings

Girgitt/cfGUI

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cfGUI

A simple GUI library for M5Stack (ESP32)

This library is intended to run on M5Stack development board (http://www.m5stack.com/), base on ESP32.

However, it should be easy to port it to any other board with an LCD screen and 3 physical buttons.

It's composed of a simple hierarchy of graphical widget that can be drawn on screen. The following widgets have been created so far:

  • Screen and AppScreen (screen with a top bar and a bottom bar)
  • Bar
  • StatusBar (Bar with uptime, clock and Wifi signal)
  • ButtonInfoBar (display the function of the physical button)
  • Button, UpDownButton
  • Mosaic of widgets

Example picture of cfGUI running on a M5Stack board

How To (Platform.io)

To use this library with your platform.io project, simply clone or download the library into the directory 'lib' of your project. Then, you just need to include the headers (e.g. #include <Screen.h>) and write some code.

Look at examples if you need some inspiration ;-)

Here is an example of platformio.ini file:

[env:m5stack-core-esp32]
platform = espressif32
board = m5stack-core-esp32
framework = arduino
lib_deps=M5Stack, NTPClient
build_flags=-std=gnu++11

Todo

  • Remove hard-coded values to make the lib more flexible
  • Add new widgets
  • Better 'focus' management

Changelog

0.3.0

  • New redraw() strategy (replace SetUpdatedFlag() by Invalidate(), performances improved and flickering reduced
  • Support new version of M5Stack lib
  • Fix crash when the center button was pushed with no widget selected

0.2.0

  • Change default font (looks better)
  • New widgets (AppScreen, StatusBar, ButtonInfoBar, UpDownButton)
  • Improved mosaic (the size and position of the widget is not hard-coded anymore)
  • Global improvements

0.1.0

  • First version of the library, with basic functionalities

About

A simple GUI library for M5Stack (ESP32)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 51.0%
  • C 49.0%