Ejemplo n.º 1
0
// Called from main thread
static void GE_fill_in_shared_variables(SharedVariables *sv){

  struct Tracker_Windows *window = root->song->tracker_windows;
  struct WBlocks *wblock = window->wblock;
  struct Blocks *block = wblock->block;

  sv->top_realline  = wblock->top_realline;
  sv->num_reallines = wblock->num_reallines;
  sv->curr_realline = wblock->curr_realline;
  sv->fontheight    = window->fontheight;
  
  sv->reltempo       = block->reltempo;
  sv->block_duration = getBlockSTimeLength(block);

  sv->scrollbar_height          = get_scrollbar_y2(window,wblock) - get_scrollbar_y1(window,wblock);
  sv->scrollbar_scroller_height = get_scrollbar_scroller_height(window,wblock);

  sv->block          = block;

  sv->times          = block->times;

  {
    radium::ScopedMutex locker(&vector_mutex);
    VECTOR_push_back(&g_times_storage, sv->times);
  }
  
  sv->realline_places = (Place*)V_malloc(sv->num_reallines * sizeof(Place));
  for(int i=0;i<sv->num_reallines;i++){
    sv->realline_places[i] = wblock->reallines[i]->l.p;
  }
}
Ejemplo n.º 2
0
static void create_left_slider(const struct Tracker_Windows *window, const struct WBlocks *wblock){
  GE_Context *border = GE_color_z(1, Z_STATIC);

  GE_box(border,
         0,                        get_scrollbar_y1(window, wblock),
         window->leftslider.width, get_scrollbar_y2(window, wblock),
         1.0f);


  GE_Context *scrollbar = GE_mix_color_z(GE_get_rgb(1), GE_get_rgb(0), 700, Z_SCROLLBAR);

  GE_filledBox(scrollbar,
               2,                            0,
               window->leftslider.width - 2, get_scrollbar_scroller_height(window,wblock)
               );
}