If you want to keep it fully text-based, you can stick to Control-nodes (everything with a green icon). The LineEdit-node will allow the player to enter text-based commands, that you can process in a callback connected to it’s text_entered-signal. Restricting the input length is easily done by setting its max_length-property in the inspector. If you want to restrict which characters you consider as valid inputs, you’ll need to code this yourself by hooking up a callback to the text_changed-signal as well. The Label-node will probably be enough for displaying text. You’ll likely want to add the Labels as children of a VBoxContainer and wrap that up in a ScrollContainer though. If you want to he clickable text, you can use a Button with the flat-property set to true.
那种笔记本好用 Text
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至lsinopec@gmail.com举报,一经查实,本站将立刻删除。