test43.nim 423 B

123456789101112131415161718192021222324252627
  1. # --- Test 43. Use Drawable and Control. --- #
  2. import nodesnim
  3. Window("drawable oops")
  4. build:
  5. - Scene scene:
  6. - Control ctrl
  7. ctrl.resize(256, 96)
  8. ctrl.move(64, 64)
  9. ctrl.setStyle(style(
  10. {
  11. background-color: rgb(33, 65, 87),
  12. border-radius: 8,
  13. border-width: 1,
  14. border-color: rgb(0, 0, 0),
  15. shadow: true,
  16. shadow-offset: 3,
  17. size-anchor: "0.5 0.7"
  18. }
  19. ))
  20. addMainScene(scene)
  21. windowLaunch()