"At least it builds !"

This commit is contained in:
furrtek 2016-04-21 22:12:51 +02:00
parent 1b0da68d65
commit 2fcfdba9ea
19 changed files with 46 additions and 87 deletions

View file

@ -1,2 +1 @@
const char md5_baseband[16] = {0x03,0x77,0xc0,0x0b,0x13,0x5b,0x84,0x72,0x8f,0x4b,0xbb,0x51,0x48,0x54,0x82,0xd3,};
const char md5_baseband_tx[16] = {0xa3,0xb9,0xd4,0x35,0xb5,0xe0,0x66,0x82,0xac,0x61,0x59,0xa1,0x27,0x36,0x0b,0xfe,};
const char md5_baseband[16] = {0x4a,0x99,0xbe,0xec,0x29,0x7c,0x61,0xd2,0x1d,0xc1,0xb5,0x5e,0xb4,0x16,0xae,0x5d,};

View file

@ -255,7 +255,6 @@ struct TouchEvent {
Point point;
Type type;
Point rawpoint;
};
} /* namespace ui */

View file

@ -301,7 +301,7 @@ Checkbox::Checkbox(
) : Widget { { parent_pos, { static_cast<ui::Dim>((8 * length) + 24), 24 } } },
text_ { text }
{
flags.focusable = true;
set_focusable(true);
}
void Checkbox::set_text(const std::string value) {
@ -325,7 +325,7 @@ bool Checkbox::value() const {
void Checkbox::paint(Painter& painter) {
const auto r = screen_rect();
const auto paint_style = (has_focus() || flags.highlighted) ? style().invert() : style();
const auto paint_style = (has_focus() || highlighted()) ? style().invert() : style();
painter.draw_rectangle({ r.pos.x, r.pos.y, 24, 24 }, style().foreground);
@ -377,12 +377,12 @@ bool Checkbox::on_key(const KeyEvent key) {
bool Checkbox::on_touch(const TouchEvent event) {
switch(event.type) {
case TouchEvent::Type::Start:
flags.highlighted = true;
set_highlighted(true);
set_dirty();
return true;
case TouchEvent::Type::End:
flags.highlighted = false;
set_highlighted(false);
value_ = not value_;
set_dirty();
if( on_select ) {
@ -393,37 +393,6 @@ bool Checkbox::on_touch(const TouchEvent event) {
default:
return false;
}
#if 0
switch(event.type) {
case TouchEvent::Type::Start:
flags.highlighted = true;
set_dirty();
return true;
case TouchEvent::Type::Move:
{
const bool new_highlighted = screen_rect().contains(event.point);
if( flags.highlighted != new_highlighted ) {
flags.highlighted = new_highlighted;
set_dirty();
}
}
return true;
case TouchEvent::Type::End:
if( flags.highlighted ) {
flags.highlighted = false;
set_dirty();
if( on_select ) {
on_select(*this);
}
}
return true;
default:
return false;
}
#endif
}
/* Button ****************************************************************/