mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-13 08:55:39 -04:00
RDS Radiotext should make receiver happier (missing end char)
String-ized text entry
This commit is contained in:
parent
62b90942ac
commit
555201b780
24 changed files with 138 additions and 165 deletions
|
@ -33,9 +33,9 @@ namespace ui {
|
|||
|
||||
class HandWriteView : public View {
|
||||
public:
|
||||
std::function<void(char *)> on_changed { };
|
||||
std::function<void(std::string)> on_changed { };
|
||||
|
||||
HandWriteView(NavigationView& nav, char txt[], size_t max_length);
|
||||
HandWriteView(NavigationView& nav, std::string& txt, size_t max_length);
|
||||
|
||||
HandWriteView(const HandWriteView&) = delete;
|
||||
HandWriteView(HandWriteView&&) = delete;
|
||||
|
@ -46,7 +46,7 @@ public:
|
|||
void on_show() override;
|
||||
bool on_touch(const TouchEvent event) override;
|
||||
|
||||
char * value();
|
||||
std::string value();
|
||||
|
||||
std::string title() const override { return "Text entry"; };
|
||||
|
||||
|
@ -65,7 +65,7 @@ private:
|
|||
uint8_t stroke_list[8];
|
||||
Point start_pos { }, current_pos { }, last_pos { };
|
||||
bool _lowercase = false;
|
||||
char txtinput[29] = { 0 }; // 28 chars max
|
||||
std::string txtinput { "" }; // 28 chars max
|
||||
|
||||
void sample_pen();
|
||||
void add_stroke(uint8_t dir);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue