X-Git-Url: http://git.tdb.fi/?p=libs%2Fgltk.git;a=blobdiff_plain;f=source%2Fbutton.cpp;h=fadd00a0cafedc4dd0d1996f8be7a0ec6ae8fdaf;hp=86b73c9daa0c3f8ba9a689ebf628f102667c97f7;hb=1597579a34a8d87d4dea0a0cdc0895e6247b6126;hpb=0326f950dfb4457bf3e3044cd17aeaa46e56bdac diff --git a/source/button.cpp b/source/button.cpp index 86b73c9..fadd00a 100644 --- a/source/button.cpp +++ b/source/button.cpp @@ -13,6 +13,7 @@ Button::Button(const std::string &t): icon(0), pressed(false) { + input_type = INPUT_NAVIGATION; set_text(t); } @@ -102,6 +103,16 @@ void Button::pointer_motion(int x, int y) } } +bool Button::navigate(Navigation nav) +{ + if(nav==NAV_ACTIVATE) + signal_clicked.emit(); + else + return false; + + return true; +} + void Button::on_style_change() { text.set_style(style);