首页 > 解决方案 > 是否可以同时打开 Textwindow 和 Graphicwindow?

问题描述

我是韩国高中生。我做了一个关于韩语拼写规则的游戏。我想要的程序是.. [如果您选择正确答案,图形窗口将显示下一个问题,文本窗口将显示“干得好。”] 不可能吗?

我想添加我的代码。不幸的是,我不知道如何添加代码。

标签: smallbasic

解决方案


是的,这绝对是可能的。只需使用 TextWindow.WriteLine 随时显示 Textwindow。

showButton = Controls.AddButton("Show", 20, 20)
Controls.ButtonClicked = onButtonClicked

Sub onButtonClicked
  if Controls.LastClickedButton = showButton Then
    TextWindow.WriteLine("Button Clicked!")
    Shapes.Move(Shapes.AddText("Button Clicked!"), 20,50)
  EndIf
EndSub

推荐阅读