mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-09 07:02:26 -04:00
"CW generator" and "Whistle" merged in "Signal generator"
Added wave shape selection and tone frequency auto-update Converted color icons to B&W
This commit is contained in:
parent
93c5959df6
commit
58f113d153
38 changed files with 758 additions and 374 deletions
|
@ -406,18 +406,22 @@ public:
|
|||
|
||||
class ImageOptionsField : public Widget {
|
||||
public:
|
||||
using image_t = const unsigned char *;
|
||||
using value_t = int32_t;
|
||||
using option_t = std::pair<image_t, value_t>;
|
||||
using option_t = std::pair<const Bitmap*, value_t>;
|
||||
using options_t = std::vector<option_t>;
|
||||
|
||||
std::function<void(size_t, value_t)> on_change { };
|
||||
std::function<void(void)> on_show_options { };
|
||||
|
||||
ImageOptionsField(Rect parent_rect, options_t options);
|
||||
ImageOptionsField(
|
||||
const Rect parent_rect,
|
||||
const Color foreground,
|
||||
const Color background,
|
||||
const options_t options
|
||||
);
|
||||
|
||||
ImageOptionsField(
|
||||
) : ImageOptionsField { { }, { } }
|
||||
) : ImageOptionsField { { }, Color::white(), Color::black(), { } }
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -438,6 +442,8 @@ public:
|
|||
private:
|
||||
options_t options;
|
||||
size_t selected_index_ { 0 };
|
||||
Color foreground_;
|
||||
Color background_;
|
||||
};
|
||||
|
||||
class OptionsField : public Widget {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue