2016-01-07 08:17:39 -05:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2015 Jared Boone, ShareBrained Technology, Inc.
|
2016-01-29 18:28:05 -05:00
|
|
|
* Copyright (C) 2016 Furrtek
|
2016-01-07 08:17:39 -05:00
|
|
|
*
|
|
|
|
* This file is part of PortaPack.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
* any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; see the file COPYING. If not, write to
|
|
|
|
* the Free Software Foundation, Inc., 51 Franklin Street,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __UI_ABOUT_H__
|
|
|
|
#define __UI_ABOUT_H__
|
|
|
|
|
|
|
|
#include "ui_widget.hpp"
|
|
|
|
#include "ui_menu.hpp"
|
|
|
|
#include "ui_navigation.hpp"
|
2016-12-09 12:21:47 -05:00
|
|
|
#include "ui_font_fixed_8x16.hpp"
|
2016-01-07 08:17:39 -05:00
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
|
|
|
namespace ui {
|
|
|
|
|
|
|
|
class AboutView : public View {
|
|
|
|
public:
|
2016-02-04 04:27:53 -05:00
|
|
|
AboutView(NavigationView& nav);
|
2016-01-29 18:28:05 -05:00
|
|
|
|
2016-01-07 08:17:39 -05:00
|
|
|
void focus() override;
|
2016-12-09 12:21:47 -05:00
|
|
|
|
|
|
|
std::string title() const override { return "About"; };
|
2016-01-07 08:17:39 -05:00
|
|
|
|
|
|
|
private:
|
2016-01-29 18:28:05 -05:00
|
|
|
void update();
|
|
|
|
|
|
|
|
uint8_t credits_index = 0;
|
2016-12-09 12:21:47 -05:00
|
|
|
uint32_t scroll = 0;
|
|
|
|
bool second = false;
|
|
|
|
bool line_feed = false;
|
2016-01-29 18:28:05 -05:00
|
|
|
|
2016-12-09 12:21:47 -05:00
|
|
|
Style styles[4] = { style_black, style_dark_grey, style_light_grey, style_white };
|
2016-01-29 18:28:05 -05:00
|
|
|
|
2016-12-09 12:21:47 -05:00
|
|
|
static constexpr Style style_white {
|
|
|
|
.font = font::fixed_8x16,
|
|
|
|
.background = Color::black(),
|
|
|
|
.foreground = Color(255, 255, 255)
|
|
|
|
};
|
|
|
|
static constexpr Style style_light_grey {
|
|
|
|
.font = font::fixed_8x16,
|
|
|
|
.background = Color::black(),
|
|
|
|
.foreground = Color(170, 170, 170)
|
|
|
|
};
|
|
|
|
static constexpr Style style_dark_grey {
|
|
|
|
.font = font::fixed_8x16,
|
|
|
|
.background = Color::black(),
|
|
|
|
.foreground = Color(85, 85, 85)
|
|
|
|
};
|
|
|
|
static constexpr Style style_black {
|
|
|
|
.font = font::fixed_8x16,
|
|
|
|
.background = Color::black(),
|
|
|
|
.foreground = Color(0, 0, 0)
|
|
|
|
};
|
|
|
|
|
|
|
|
enum flags {
|
|
|
|
SECTION = 0,
|
|
|
|
MEMBER = 1,
|
|
|
|
MEMBER_LF = 0x41,
|
|
|
|
TITLE = 2,
|
|
|
|
TITLE_LF = 0x42,
|
|
|
|
END = 0x80
|
|
|
|
};
|
|
|
|
|
2016-01-29 18:28:05 -05:00
|
|
|
typedef struct credits_t {
|
2016-12-09 12:21:47 -05:00
|
|
|
std::string role;
|
|
|
|
std::string name;
|
|
|
|
flags flag;
|
2016-01-29 18:28:05 -05:00
|
|
|
} credits_t;
|
|
|
|
|
2017-04-06 19:41:32 -04:00
|
|
|
const credits_t credits[14] = { {"Portapack|HAVOC", "Git hash " GIT_REVISION, SECTION},
|
2016-12-09 12:21:47 -05:00
|
|
|
{"Gurus", "J. Boone", TITLE},
|
|
|
|
{"M. Ossmann", "", MEMBER_LF},
|
|
|
|
{"Immaturity", "Furrtek", TITLE_LF},
|
|
|
|
{"POCSAG rx", "T. Sailer", TITLE},
|
|
|
|
{"E. Oenal", "", MEMBER_LF},
|
|
|
|
{"RDS waveform", "C. Jacquet", TITLE_LF},
|
|
|
|
{"Xy. infos", "cLx", TITLE_LF},
|
|
|
|
{"Thanks", "", SECTION},
|
|
|
|
{"Rainer Matla", "Keld Norman", TITLE},
|
2017-05-25 16:36:30 -04:00
|
|
|
{"Giorgio C.", "DC1RDB", TITLE},
|
2016-12-09 12:21:47 -05:00
|
|
|
{"Sigmounte", "Waax", TITLE},
|
|
|
|
{"Windyoona", "Channels", TITLE_LF},
|
2017-02-05 15:36:00 -05:00
|
|
|
{"", "MMXVII", END}
|
2016-01-29 18:28:05 -05:00
|
|
|
};
|
2016-01-07 08:17:39 -05:00
|
|
|
|
2017-01-15 22:45:44 -05:00
|
|
|
std::array<Text, 10> text_line { };
|
2016-01-07 08:17:39 -05:00
|
|
|
|
|
|
|
Text text_cpld_hackrf {
|
2016-07-26 23:54:55 -04:00
|
|
|
{ 0, 252, 11*8, 16 },
|
2016-07-26 21:03:40 -04:00
|
|
|
"HackRF CPLD",
|
2016-01-07 08:17:39 -05:00
|
|
|
};
|
|
|
|
|
2016-07-26 21:03:40 -04:00
|
|
|
Text text_cpld_hackrf_status {
|
2016-07-26 23:54:55 -04:00
|
|
|
{ 240 - 3*8, 252, 3*8, 16 },
|
2016-07-26 21:03:40 -04:00
|
|
|
"???"
|
2016-01-07 08:17:39 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
Button button_ok {
|
2016-01-29 18:28:05 -05:00
|
|
|
{ 72, 272, 96, 24 },
|
2016-01-07 08:17:39 -05:00
|
|
|
"OK"
|
|
|
|
};
|
2016-07-26 21:03:40 -04:00
|
|
|
|
|
|
|
MessageHandlerRegistration message_handler_update {
|
|
|
|
Message::ID::DisplayFrameSync,
|
|
|
|
[this](const Message* const) {
|
|
|
|
this->update();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2016-01-07 08:17:39 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
} /* namespace ui */
|
|
|
|
|
|
|
|
#endif/*__UI_ABOUT_H__*/
|