_quitmenu.tcl 509 B

12345678910111213141516171819202122232425
  1. namespace eval quitmenu {
  2. proc quit_menu {} {
  3. set items [list "No" "Yes"]
  4. set menu_def \
  5. { execute quitmenu::quit_menu_exec
  6. font-size 8
  7. border-size 2
  8. width 120
  9. xpos 100
  10. ypos 100
  11. header { text "Really exit openMSX?"
  12. font-size 10
  13. post-spacing 6 }}
  14. osd_menu::do_menu_open [osd_menu::prepare_menu_list $items [llength $items] $menu_def]
  15. activate_input_layer quit_menu
  16. }
  17. proc quit_menu_exec {item} {
  18. osd_menu::menu_close_all
  19. if {$item eq "Yes"} {exit}
  20. }
  21. }