Código:
Dibujando menú. (botones, fondo, etc) tstartdraw() t tsetcolor 255,255,255 tdrawimageex (img_menu%,ancho_pantalla%-ancho_pantalla%+150,alto_pantalla%/2) tsetalpha.5 tdrawimageex (img_menu2%,ancho_pantalla%-ancho_pantalla%+150,alto_pantalla%/2) tsetalpha 1 t tif menú% = menu_principal%, menú inicial, botón iniciar ;-------------------------------------------- Drawimageex (boton_iniciar[bi%],ancho_pantalla-ancho_pantalla+150,alto_pantalla/2-150), bton cargar ;-------------------------------------------- Drawimageex (boton_cargar[bc%],ancho_pantalla-ancho_pantalla+150,alto_pantalla/2-85), bton guardar ;-------------------------------------------- Drawimageex (boton_guardar[bg%],ancho_pantalla-ancho_pantalla+150,alto_pantalla/2-20), botón opciones ;-------------------------------------------- Drawimageex (boton_opciones[bo%],ancho_pantalla-ancho_pantalla+150,alto_pantalla/2+45), botón salir ;-------------------------------------------- Drawimageex (boton_salir[bs%],ancho_pantalla-ancho_pantalla+150,alto_pantalla/2+150) t t, botones funcionales cambian forma. (clic) ;--------------------------------------------, botón iniciar if testimage (mx#,my#,ancho_pantalla-ancho_pantalla+150,alto_pantalla/2-150,boton_iniciar[false]) and mousedown(tm_izquierdo%) = true bi % = true t_estado% = true, botón cargar elseif testimage (mx#,my#,ancho_pantalla-ancho_pantalla+150,alto_pantalla/2-85,boton_cargar[false]) and mousedown(tm_izquierdo%) = true bc % = true t_estado% = true, botón guardar elseif testimage (mx#,my#,ancho_pantalla-ancho_pantalla+150,alto_pantalla/2-20,boton_guardar[false]) and mousedown(tm_izquierdo%) = true bg % = true t_estado% = true, botón opciones elseif testimage (mx#,my#,ancho_pantalla-ancho_pantalla+150,alto_pantalla/2+45,boton_opciones[false]) and mousedown(tm_izquierdo%) = true bo % = true t_estado% = true, botón salir elseif testimage (mx#,my#,ancho_pantalla-ancho_pantalla+150,alto_pantalla/2+150,boton_salir[false]) and mousedown(tm_izquierdo%) = true bs % = true t_estado% = true else bi% = false bc% = false bg% = false bo% = false bs% = false t end if t, botones funcionales (eventos) ;--------------------------------------------, botón iniciar if mousedown(tm_izquierdo%) = false and t_estado% = true and bi% = false and testimage (mx#,my#,ancho_pantalla-ancho_pantalla+150,alto_pantalla/2-150,boton_iniciar[false]) t goto salir, botón cargar. elseif mousedown(tm_izquierdo%) = false and t_estado% = true and bc% = false and testimage (mx#,my#,ancho_pantalla-ancho_pantalla+150,alto_pantalla/2-85,boton_cargar[false]) goto salir, botón guardar elseif mousedown(tm_izquierdo%) = false and t_estado% = true and bg% = false and testimage (mx#,my#,ancho_pantalla-ancho_pantalla+150,alto_pantalla/2-20,boton_guardar[false]) goto salir, botón opciones elseif mousedown(tm_izquierdo%) = false and t_estado% = true and bo% = false and testimage (mx#,my#,ancho_pantalla-ancho_pantalla+150,alto_pantalla/2+45,boton_opciones[false]) menú% = menu_opciones%, botón salir elseif mousedown(tm_izquierdo%) = false and t_estado% = true and bs% = false and testimage (mx#,my#,ancho_pantalla-ancho_pantalla+150,alto_pantalla/2+150,boton_opciones[false]) goto salir end if t tend if t t tif mousedown(tm_izquierdo%) = false t_estado% = false tend if.