test16.nim 451 B

123456789101112131415161718192021222324
  1. # --- Test 16. Use EditText node. --- #
  2. import nodesnim
  3. Window("hello world")
  4. var
  5. mainobj: SceneObj
  6. main = Scene("Main", mainobj)
  7. edittextobj: EditTextObj
  8. edittext = EditText(edittextobj)
  9. main.addChild(edittext)
  10. edittext.color = Color(1f, 1f, 1f) # default text color.
  11. edittext.hint_color = Color(1f, 0.6, 1f)
  12. edittext.resize(512, 256)
  13. edittext.setBackgroundColor(Color(0x212121ff))
  14. addScene(main)
  15. setMainScene("Main")
  16. windowLaunch()