6 void F_Menu::draw_label()
11 bool bright = fg() & 0x8;
12 if (state_ != F_BUTTON_NORMAL)
13 fg((fg() & 0x7) | (bright ? 0 : 0x8));
14 put_string(p, label());
15 if (state_ != F_BUTTON_NORMAL)
16 fg((fg() & 0x7) | (bright ? 0x8 : 0));
17 damage(F_DAMAGE_FLUSH);
23 F_Point p(w() - 1, 0);
25 smb.color(parent()->fg(), parent()->bg());
27 smb.ch_ = f_text_display->recode('Œ');
29 smb.ch_ = f_text_display->recode('�');
30 for (int y = 1; y < h(); y++) {
35 smb.ch_ = f_text_display->recode('‹');
36 for (int x = 1; x < w(); x++) {
46 smb.color(fg(), bg());
47 smb.ch_ = f_text_display->recode('–');
48 for (int i = 0; i < size(); i++) {
55 put_string(p, it); // F_ALIGN_RIGHT
59 bool F_Menu::handle(F_Event_t &ev)
64 // debug("F_ENTER: bid - %d", id());
65 state_ = F_BUTTON_ON_FOCUS;
70 // debug("F_LEAVE: bid - %d", id());
71 state_ = F_BUTTON_NORMAL;
75 if (ev.kbd.key == F_Escape) {
80 if (ev.kbd.key == F_Enter) {
81 state_ = F_BUTTON_PRESSED;
83 // ÞÅÒÅÚ 50 ms ÐÏÓÌÁÔØ event ÄÁÎÎÏÍÕ ÂÁÔÔ'ÏÎÕ
84 ev.type = F_KEY_RELEASE;
85 ev.delay = 5; // 50 ms
87 f_text_display->event(ev);
92 if (ev.kbd.key == F_Enter) {
93 state_ = F_BUTTON_ON_FOCUS;
100 // debug("F_POINTER_PRESS: bid - %d", id());
101 state_ = F_BUTTON_PRESSED;
104 case F_POINTER_RELEASE:
106 // debug("F_POINTER_RELEASE: bid - %d", id());
107 state_ = F_BUTTON_ON_FOCUS;
112 debug("bid - %d, evtype - %d", id(), ev.type);