basic.bmx 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. SuperStrict
  2. Framework gfx.bgfxmax2d
  3. Graphics 800, 600, 0
  4. SetClsColor 0, 0, 0
  5. Local stats:Int = BGFX_DEBUG_TEXT
  6. Local ESC:String = Chr(27)
  7. While Not KeyDown(KEY_ESCAPE)
  8. Cls
  9. If KeyHit(key_f1) Then
  10. If stats = BGFX_DEBUG_TEXT Then
  11. stats = BGFX_DEBUG_STATS
  12. Else
  13. stats = BGFX_DEBUG_TEXT
  14. End If
  15. End If
  16. TBGFX.DebugTextClear()
  17. TBGFX.DebugTextPrint(0, 0, $0f, "Press F1 to toggle stats.")
  18. TBGFX.DebugTextPrint(0, 1, $0f, "Color can be changed with ANSI " + ESC + "[9;me" + ESC + "[10;ms" + ESC + "[11;mc" + ESC + "[12;ma" + ESC + "[13;mp" + ESC + "[14;me" + ESC + "[0m code too.")
  19. TBGFX.DebugTextPrint(65, 1, $0f, ESC + "[;0m " + ESC + "[;1m " + ESC + "[; 2m " + ESC + "[; 3m " + ESC + "[; 4m " + ESC + "[; 5m " + ESC + "[; 6m " + ESC + "[; 7m " + ESC + "[0m")
  20. TBGFX.DebugTextPrint(65, 2, $0f, ESC + "[;8m " + ESC + "[;9m " + ESC + "[;10m " + ESC + "[;11m " + ESC + "[;12m " + ESC + "[;13m " + ESC + "[;14m " + ESC + "[;15m " + ESC + "[0m")
  21. TBGFX.SetDebug(stats)
  22. Flip
  23. Wend