Compilation fixes
This commit is contained in:
-1
@@ -20,7 +20,6 @@
|
|||||||
#ifndef _CHOICE_H_
|
#ifndef _CHOICE_H_
|
||||||
#define _CHOICE_H_
|
#define _CHOICE_H_
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include "form.h"
|
#include "form.h"
|
||||||
|
|
||||||
class Choice : public FormField {
|
class Choice : public FormField {
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "coloredit.h"
|
#include "coloredit.h"
|
||||||
|
#include "libopenui_globals.h"
|
||||||
#include "numberedit.h"
|
#include "numberedit.h"
|
||||||
#include "bitfield.h"
|
#include "bitfield.h"
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
#include "keyboard_number.h"
|
#include "keyboard_number.h"
|
||||||
#include "button.h"
|
#include "button.h"
|
||||||
#include "basenumberedit.h"
|
#include "basenumberedit.h"
|
||||||
|
#include "libopenui_globals.h"
|
||||||
|
|
||||||
constexpr coord_t KEYBOARD_HEIGHT = 90;
|
constexpr coord_t KEYBOARD_HEIGHT = 90;
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,6 @@
|
|||||||
#include "libopenui_config.h"
|
#include "libopenui_config.h"
|
||||||
|
|
||||||
void lcdNextLayer();
|
void lcdNextLayer();
|
||||||
void lcdSetColor(uint16_t color);
|
|
||||||
void DMACopyBitmap(uint16_t * dest, uint16_t destw, uint16_t desth, uint16_t x, uint16_t y, const uint16_t * src, uint16_t srcw, uint16_t srch, uint16_t srcx, uint16_t srcy, uint16_t w, uint16_t h);
|
void DMACopyBitmap(uint16_t * dest, uint16_t destw, uint16_t desth, uint16_t x, uint16_t y, const uint16_t * src, uint16_t srcw, uint16_t srch, uint16_t srcx, uint16_t srcy, uint16_t w, uint16_t h);
|
||||||
void DMACopyAlphaBitmap(uint16_t * dest, uint16_t destw, uint16_t desth, uint16_t x, uint16_t y, const uint16_t * src, uint16_t srcw, uint16_t srch, uint16_t srcx, uint16_t srcy, uint16_t w, uint16_t h);
|
void DMACopyAlphaBitmap(uint16_t * dest, uint16_t destw, uint16_t desth, uint16_t x, uint16_t y, const uint16_t * src, uint16_t srcw, uint16_t srch, uint16_t srcx, uint16_t srcy, uint16_t w, uint16_t h);
|
||||||
void onKeyPress();
|
void onKeyPress();
|
||||||
|
|||||||
@@ -27,4 +27,9 @@ extern uint16_t lcdColorTable[LCD_COLOR_COUNT];
|
|||||||
extern const uint16_t * const fontspecsTable[FONT_TABLE_SIZE];
|
extern const uint16_t * const fontspecsTable[FONT_TABLE_SIZE];
|
||||||
extern const uint8_t * fontsTable[FONT_TABLE_SIZE];
|
extern const uint8_t * fontsTable[FONT_TABLE_SIZE];
|
||||||
|
|
||||||
|
inline void lcdSetColor(uint16_t color)
|
||||||
|
{
|
||||||
|
lcdColorTable[CUSTOM_COLOR_INDEX] = color;
|
||||||
|
}
|
||||||
|
|
||||||
#endif // _LIBOPEUI_GLOBALS_H_
|
#endif // _LIBOPEUI_GLOBALS_H_
|
||||||
|
|||||||
+2
-2
@@ -107,9 +107,9 @@ void Menu::addLine(const std::string & text, std::function<void()> onPress)
|
|||||||
updatePosition();
|
updatePosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Menu::addLine(std::function<void(BitmapBuffer * dc, coord_t x, coord_t y, LcdFlags flags)> drawLine, std::function<void()> onPress)
|
void Menu::addCustomLine(std::function<void(BitmapBuffer * dc, coord_t x, coord_t y, LcdFlags flags)> drawLine, std::function<void()> onPress)
|
||||||
{
|
{
|
||||||
menuWindow.addLine(drawLine, std::move(onPress));
|
menuWindow.addCustomLine(drawLine, std::move(onPress));
|
||||||
updatePosition();
|
updatePosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-3
@@ -23,7 +23,6 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <string>
|
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
class Menu;
|
class Menu;
|
||||||
@@ -78,7 +77,7 @@ class MenuWindow: public Window {
|
|||||||
invalidate();
|
invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
void addLine(std::function<void(BitmapBuffer * dc, coord_t x, coord_t y, LcdFlags flags)> drawLine, std::function<void()> onPress)
|
void addCustomLine(std::function<void(BitmapBuffer * dc, coord_t x, coord_t y, LcdFlags flags)> drawLine, std::function<void()> onPress)
|
||||||
{
|
{
|
||||||
lines.emplace_back(drawLine, onPress);
|
lines.emplace_back(drawLine, onPress);
|
||||||
invalidate();
|
invalidate();
|
||||||
@@ -162,7 +161,7 @@ class Menu : public Window {
|
|||||||
|
|
||||||
void addLine(const std::string & text, std::function<void()> onPress);
|
void addLine(const std::string & text, std::function<void()> onPress);
|
||||||
|
|
||||||
void addLine(std::function<void(BitmapBuffer * dc, coord_t x, coord_t y, LcdFlags flags)> drawLine, std::function<void()> onPress);
|
void addCustomLine(std::function<void(BitmapBuffer * dc, coord_t x, coord_t y, LcdFlags flags)> drawLine, std::function<void()> onPress);
|
||||||
|
|
||||||
void removeLines();
|
void removeLines();
|
||||||
|
|
||||||
|
|||||||
-1
@@ -20,7 +20,6 @@
|
|||||||
#ifndef _STATIC_H_
|
#ifndef _STATIC_H_
|
||||||
#define _STATIC_H_
|
#define _STATIC_H_
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include "window.h"
|
#include "window.h"
|
||||||
#include "button.h" // TODO just for BUTTON_BACKGROUND
|
#include "button.h" // TODO just for BUTTON_BACKGROUND
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user