예제 #1
0
// ------------------------------------------------------------------------------------------------
//
//
void CUI_Savescreen::update()
{
  FileList *fl;
  DirList *dl;
  DriveList *dr;
  int key=0;

  UI->update();

  fl = (FileList *)UI->get_element(0);
  dl = (DirList *)UI->get_element(1);
  dr = (DriveList *)UI->get_element(2);

  if (dl->updated || dr->updated) {

    dl->OnChange();
    fl->OnChange();
  }

  if (Keys.size()) {

    key = Keys.getkey();

    switch(key)
    {
      case DIK_RETURN:

        begin_save();
        need_refresh++;

      break;
    } ;
  }
}
예제 #2
0
/*
void BTNCLK_Toggle(UserInterfaceElement *b) {
    Button *btn;
    btn = (Button *)b;
    need_refresh++; 
    btn->updown = !btn->updown;
    if (btn->updown)
        song->instruments[cur_inst]->flags |= INSTFLAGS_CHANVOL;
    else
        song->instruments[cur_inst]->flags &= (0xFF-INSTFLAGS_CHANVOL);
    need_refresh++;     
}
*/
CUI_Loadscreen::CUI_Loadscreen(void) {
    FileList *fl;
    DirList *dl;
//  TextInput *ti;
    DriveList *dr;

//  Button *b;  

    UI = new UserInterface;

    fl = new FileList;
    UI->add_element(fl,0);
    fl->x = 2;
    fl->y = 13;
    fl->xsize = 30;
    fl->ysize = 30;
//  fl->str = &load_filename[0]; 
    fl->OnChange();
    fl->onEnter = (ActFunc)filelist_onEnter;
//    strcpy(fl->filepattern,"*.zt");

    dl = new DirList;
    UI->add_element(dl,1);
    dl->x = 34;
    dl->y = 13;
    dl->xsize = 20;
    dl->ysize = 19;

    dr = new DriveList;
    UI->add_element(dr,2);
    dr->x = 56;
    dr->y = 13;
    dr->xsize=20;
    dr->ysize=19;
    



//  b->OnClick = (ActFunc)BTNCLK_ToggleNoteRetrig;
    

/*
    ti = new TextInput;
    UI->add_element(ti,3);
    ti->x = 2;
    ti->y = 45;
    ti->ysize = 1; ti->xsize=30; ti->length=30; //ti->xsize = 50; ti->length=50;
//  ti->str = (unsigned char *)&load_filename[0];
    ti->str = (unsigned char *)&szSearch[0];
*/
    clear = 1;
}
예제 #3
0
// ------------------------------------------------------------------------------------------------
//
//
void CUI_Loadscreen::enter(void) 
{
  need_refresh = 1;
  is_loading = 0;
  cur_state = STATE_LOAD;
  FileList *fl;
  DirList *dl;
  fl = (FileList *)UI->get_element(0);
  dl = (DirList *)UI->get_element(1);
  dl->OnChange();
  fl->OnChange();
  if (song->filename[0] && song->filename[0]!=' ') strcpy(load_filename, (const char *)song->filename);
//    fl->set_cursor(load_filename);
  fl->setCursor(fl->findItem(load_filename));
}