Wednesday, January 27, 2021

Glimmer Tetris High Scores & More Menus

Glimmer Tetris just got a High Score dialog (replacing the Game Over dialog) and got enhanced to save/load high scores to/from disk (tab delimited format). It uses the user directory (dumping a .glimmer-tetris/high_scores.txt file) to use the same security permissions as the current user. If writing fails for any reason, it fails gracefully, defaulting to memory storage of high scores. 

Otherwise, Glimmer Tetris got more menus:

  • View (to show/clear high scores)
  • Options (to enable/disable beeping) 
  • Help (to show about dialog)

 Seeing is believing!

Updated Model::Game logic for saving/loading high scores (relies on automatic observation support of arrays in Glimmer):

 

 New high_score_dialog custom shell (replacing game_over_dialog): 

 

Updated tetris_menu_bar custom widget: 

 

 All of this ships with Glimmer DSL for SWT v4.18.3.3 as part of the following changes:  

  • Tetris High Scores
  • Tetris Modify High Score Player Name
  • Tetris Show High Scores (Menu Item + Accelerator)
  • Tetris add a menu item with beep enablement option
  • Tetris Clear High Scores
  • Tetris Add left and right alt (option) buttons as alternative to shift for rotation. Use left ctrl as rotate left. Use a, s, d as left, down, right.
  • Fix issues relating to setting parenthood with custom widgets before building their body (instead of after)
  • Fix issues relating to not respecting arity of passed in table editing callbacks: before_write, after_write, and after_cancel

Happy Glimmering!

Check out last: Glimmer Tetris Icon via Image Shape DSL + Instant Down

This article is part of the Tetris Saga

No comments: