* enter_char made to use gkey instead of uint
* corrected bug in input fields that caused hardware cursor to go to the end of the field after deleting characters
This commit is contained in:
@@ -197,10 +197,10 @@ public:
|
||||
void prepare_form();
|
||||
void finish_form();
|
||||
|
||||
bool handle_key(uint key);
|
||||
bool handle_key(gkey key);
|
||||
|
||||
// These are supposed to be overridden by the inheriting class
|
||||
virtual bool handle_other_keys(uint& key);
|
||||
virtual bool handle_other_keys(gkey& key);
|
||||
virtual bool validate();
|
||||
virtual void before();
|
||||
virtual void after();
|
||||
|
@@ -589,7 +589,7 @@ void gwinput::finish_form() {
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
bool gwinput::handle_other_keys(uint&) {
|
||||
bool gwinput::handle_other_keys(gkey&) {
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -597,7 +597,7 @@ bool gwinput::handle_other_keys(uint&) {
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
bool gwinput::handle_key(uint key) {
|
||||
bool gwinput::handle_key(gkey key) {
|
||||
|
||||
switch(key) {
|
||||
case Key_Esc: drop_form(); break;
|
||||
@@ -955,6 +955,7 @@ bool gwinput::field::delete_char() {
|
||||
buf_end_pos--;
|
||||
memmove(buf+buf_pos, buf+buf_pos+1, buf_len-buf_pos);
|
||||
draw(pos);
|
||||
move_cursor();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user