mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
* Create README.md * Move to new folder * Migrating * Migrate Remainder * format fix (all but one) (#1889) * Update USBPDDebug_FS2711.cpp * Delete PrintVoltage.cpp * Copy in 128x32 template * Mask drawing for 96x16 * Import #1819 * Update Font.h * Homescreen * Update draw_homescreen_detailed.cpp * Fix oled normal draw for variable height * Update OLED.cpp * Draw settings icons * Update draw_homescreen_simplified.cpp * Update draw_power_source_icon.cpp * Fixup oled drawing for fill area * Update the region fill for mixed heights * Fix newline height * FIXUP! Draw icons in settings menu at correct size * Fix scrollbar * Update settingsGUI.cpp * S60(P) Disable auto display rotation * On tall oled, scroll in 2 line increments * Bugfix transition L<->R @discip I take it back, there was a bug :) * Draw every other one on transitions * . * cleanup * Bootup logo: Draw in centre * Update OLED.hpp --------- Co-authored-by: discip <53649486+discip@users.noreply.github.com>
43 lines
1.3 KiB
C++
43 lines
1.3 KiB
C++
/*
|
|
* settingsGUI.h
|
|
*
|
|
* Created on: 3Sep.,2017
|
|
* Author: Ben V. Brown
|
|
*/
|
|
|
|
#ifndef GUI_HPP_
|
|
#define GUI_HPP_
|
|
#include "BSP.h"
|
|
#include "Buttons.hpp"
|
|
#include "FreeRTOS.h"
|
|
#include "Settings.h"
|
|
#include "Translation.h"
|
|
|
|
#define PRESS_ACCEL_STEP (TICKS_100MS / 3)
|
|
#define PRESS_ACCEL_INTERVAL_MIN TICKS_100MS
|
|
#define PRESS_ACCEL_INTERVAL_MAX (TICKS_100MS * 3)
|
|
|
|
// GUI holds the menu structure and all its methods for the menu itself
|
|
|
|
// Declarations for all the methods for the settings menu (at end of this file)
|
|
|
|
// Struct for holding the function pointers and descriptions
|
|
typedef struct {
|
|
// The settings description index, please use the `SETTINGS_DESC` macro with
|
|
// the `SettingsItemIndex` enum. Use 0 for no description.
|
|
uint8_t description;
|
|
void (*const incrementHandler)(void);
|
|
void (*const draw)(void); // Must not be nullptr, as that marks end of menu
|
|
bool (*const isVisible)(void);
|
|
// If this is set, we will automatically use the settings increment handler instead, set >= num settings to disable
|
|
SettingsOptions autoSettingOption;
|
|
SettingsItemIndex shortDescriptionIndex;
|
|
uint8_t shortDescriptionSize;
|
|
} menuitem;
|
|
|
|
void enterSettingsMenu();
|
|
extern const menuitem rootSettingsMenu[];
|
|
extern const menuitem *subSettingsMenus[];
|
|
|
|
#endif /* GUI_HPP_ */
|