git @ Cat's Eye Technologies linapple / 935e839
Use Apple II font for file selection dialog; re-make the font into something more readable. ghedger 7 years ago
5 changed file(s) with 26 addition(s) and 23 deletion(s). Raw diff Collapse all Expand all
Binary diff not shown
Binary diff not shown
155155 }
156156 #else
157157 /* Windows specific functions of reading directory structure */
158 /* Find subdirs: */
158 /* Find subdirs: */
159159 if(strcmp(incoming_dir, "/")) {
160160 // we are not in upper direcory
161161 tmp = new char[3];
167167 B = 1;
168168 }
169169 else B = 0; // for sorting dirs
170
170
171171
172172 WIN32_FIND_DATA finfo;
173173 HANDLE h;
174174
175
176
175
176
177177 h=FindFirstFile(incoming_dir,&finfo);
178178
179179 if (h!=INVALID_HANDLE_VALUE) {
197197 strcpy(tmp, "<DIR>");
198198 sizes.Add(tmp); // add sign of directory
199199 }
200 } /* while */
201 } /* if */
200 } /* while */
201 } /* if */
202202
203203 #endif
204204 // sort directories. Please, don't laugh at my bubble sorting - it the simplest thing I've ever seen --bb
240240 (void) closedir (dp);
241241 #else
242242 /* Windows specific functions of reading directory structure */
243 /* Find files: */
243 /* Find files: */
244244
245245 h=FindFirstFile(incoming_dir,&finfo);
246246
252252 strcpy(tmp,finfo.cFileName);
253253 files.Add(tmp);
254254 tmp = new char[10]; // 1400000KB
255 snprintf(tmp, 9, "%dKB",
255 snprintf(tmp, 9, "%dKB",
256256 ((finfo.nFileSizeHigh * (MAXDWORD+1)) + finfo.nFileSizeLow));
257257 sizes.Add(tmp); // add this size to list
258258 }
263263 strcpy(tmp,finfo.cFileName);
264264 files.Add(tmp);
265265 tmp = new char[10]; // 1400000KB
266 snprintf(tmp, 9, "%dKB",
266 snprintf(tmp, 9, "%dKB",
267267 ((finfo.nFileSizeHigh * (MAXDWORD+1)) + finfo.nFileSizeLow));
268268 sizes.Add(tmp); // add this size to list
269269 }
270 } /* while */
271 } /* if */
270 } /* while */
271 } /* if */
272272
273273 #endif
274274 // do sorting for files
308308 }
309309 else tempSurface = g_origscreen;
310310
311 if(tempSurface == NULL)
311 if(tempSurface == NULL)
312312 tempSurface = screen; // use screen, if none available
313
313
314314 my_screen = SDL_CreateRGBSurface(SDL_SWSURFACE, tempSurface->w, tempSurface->h, tempSurface->format->BitsPerPixel, 0, 0, 0, 0);
315315 if(tempSurface->format->palette && my_screen->format->palette)
316316 SDL_SetColors(my_screen, tempSurface->format->palette->colors,
358358 SDL_Rect r;
359359 r.x= 2;
360360 r.y= TOPX + (i-first_file) * 15 * facy - 1;
361 if(strlen(tmp) > 46) r.w = 46 * 6 * 1.7 * facx + 2;
362 else r.w= strlen(tmp) * 6 * 1.7 * facx + 2; // 6- FONT_SIZE_X
361 if(strlen(tmp) > 46) r.w = 46 * FONT_SIZE_X /* 6 */ * 1.7 * facx + 2;
362 else r.w= strlen(tmp) * FONT_SIZE_X /* 6 */ * 1.7 * facx + 2; // 6- FONT_SIZE_X
363363 r.h= 9 * 1.5 * facy;
364364 SDL_FillRect(screen, &r, SDL_MapRGB(screen->format,255,0,0));// in RED
365365 } /* if */
398398
399399 // control cursor
400400 keyboard = SDL_GetKeyState(NULL); // get current state of pressed (and not pressed) keys
401
401402 if (keyboard[SDLK_UP] || keyboard[SDLK_LEFT]) {
402403 if (act_file>0) act_file--; // up one position
403404 if (act_file<first_file) first_file=act_file;
966966 case BTN_DRIVE1:
967967 case BTN_DRIVE2:
968968 if (mod & KMOD_SHIFT) {
969 if(mod & KMOD_ALT)
970 HD_FTP_Select(button - BTN_DRIVE1);// select HDV image through FTP
971 else
972 HD_Select(button - BTN_DRIVE1); // select HDV image from local disk
973 } else {
969974 if(mod & KMOD_ALT)
970 HD_FTP_Select(button - BTN_DRIVE1);// select HDV image through FTP
971 else HD_Select(button - BTN_DRIVE1); // select HDV image from local disk
972 }
973 else {
974 if(mod & KMOD_ALT) Disk_FTP_SelectImage(button - BTN_DRIVE1);//select through FTP
975 else DiskSelect(button - BTN_DRIVE1); // select image file for appropriate disk drive(#1 or #2)
975 Disk_FTP_SelectImage(button - BTN_DRIVE1);//select through FTP
976 else
977 DiskSelect(button - BTN_DRIVE1); // select image file for appropriate disk drive(#1 or #2)
976978 }
977979 /* if (!fullscreen)
978980 DrawButton((HDC)0,button);*/
8585 /* ---------------------- FONT routines ---------------------------*/
8686 /* ----------------------------------------------------------------*/
8787
88 #define FONT_SIZE_X 6
88 #define FONT_SIZE_X 7
8989 #define FONT_SIZE_Y 8
9090 // chars in row in font bitmap
91 #define CHARS_IN_ROW 45
91 #define CHARS_IN_ROW 39
9292 extern SDL_Surface *font_sfc;
9393
9494 bool fonts_initialization(void);