Guest User

Untitled

a guest
Nov 24th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Vala 0.91 KB | None | 0 0
  1.    
  2.         private void page_right (int step = 1) {
  3.    
  4.    
  5.             if ((- current_position) < ((grid.n_columns - 5.8)*130)) {
  6.    
  7.                 pages.move (grid, current_position - 5*130*step, 0);
  8.    
  9.                 current_position -= 5*130*step;
  10.    
  11.             }
  12.    
  13.  
  14.         }
  15. ###########################################################################
  16.     private void page_right (int step = 1) {
  17.  
  18.             if ((- current_position) < ((grid.n_columns - 5.8)*130)) {
  19.                 int val = 0;
  20.                 Timeout.add (20, () => {
  21.                     if (val < 5*130) {
  22.                         pages.move (grid, current_position - val, 0);
  23.                         current_position -= val;
  24.                         val += 2;
  25.                         return true;
  26.                     } else {
  27.                         return false;
  28.                     }
  29.                 });
  30.             }
  31.  
  32.         }
Add Comment
Please, Sign In to add comment