mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-10 07:30:08 -04:00
Add Remote App & UI updates. (#1451)
* Alpha order sub-menus * WIP Getting Remote types outlined * WIP building UI * WIP adding RemoteButton control * WIP Fix build * WIP Basic editing support * Border on the active button * Make TxView2 sane * Add easier RGB color creation from uint32 * Center some button icons * WIP Remote - main UI * WIP main UI mostly working, can send * Add 'join' utility * WIP save/load * Pre-alloc buttons to prevent focus dangling * Alpha order settings/debug pages * Add UI for picking capture and set frequency * WIP Getting really close now * Fix path for init name * Some fit & finish
This commit is contained in:
parent
537cf2e79b
commit
fca373d936
27 changed files with 1205 additions and 312 deletions
|
@ -213,3 +213,25 @@ static constexpr uint32_t gcd_top(const uint32_t u, const uint32_t v) {
|
|||
uint32_t gcd(const uint32_t u, const uint32_t v) {
|
||||
return gcd_top(u, v);
|
||||
}
|
||||
|
||||
std::string join(char c, std::initializer_list<std::string_view> strings) {
|
||||
std::string result;
|
||||
size_t total_size = strings.size();
|
||||
|
||||
for (auto s : strings)
|
||||
total_size += s.size();
|
||||
|
||||
result.reserve(total_size);
|
||||
bool first = true;
|
||||
|
||||
for (auto s : strings) {
|
||||
if (!first)
|
||||
result += c;
|
||||
else
|
||||
first = false;
|
||||
|
||||
result += s;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue