Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 
Share Thread:
Reddit Facebook Twitter
Micheus ... Selection Groups scroll vs Geometry Graph Scroll
12-03-2014, 11:06 PM (This post was last modified: 12-04-2014 12:06 AM by ggaliens.)
Post: #1
Micheus ... Selection Groups scroll vs Geometry Graph Scroll
Here's my silly hack to make Selection Groups scrolling a bit more delicate when neeed. It would be better to add the thumb-region handling that is supported by geometry graph.

Would you know how to do it right Micheus ? Or more important ... would you have a go at finding right solution ?

Code:
event(PAGE_UP_DOWN, Ost) when PAGE_UP_DOWN == scroll_page_up orelse PAGE_UP_DOWN == scroll_page_down->
    Mod = sdl_keyboard:getModState(),
    case {PAGE_UP_DOWN, Mod} of
         {scroll_page_up, 0}   ->  zoom_step(-lines(Ost), Ost);
         {scroll_page_down, 0} ->  zoom_step(lines(Ost), Ost);
         {scroll_page_up, _}   ->  zoom_step(-1, Ost);
         {scroll_page_down, _} ->  zoom_step(1, Ost)
    end;

I was too lazy to do a better compare of the wpc_sel_win events to wings_shape events.

Maybe slightly better idea ...

Code:
event(#keyboard{scancode=72},Ost) ->
    zoom_step(-1, Ost);
event(#keyboard{scancode=80},Ost) ->
    zoom_step(1, Ost);
Reply


Messages In This Thread
Micheus ... Selection Groups scroll vs Geometry Graph Scroll - ggaliens - 12-03-2014 11:06 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)