Example #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;
    } ;
  }
}
Example #2
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));
}