如何更改文字?

发布于 2025-01-21 05:28:44 字数 278 浏览 1 评论 0原文

我目前正在使用处理进行作业,但我似乎无法弄清楚如何更改文本。

作业基本上围绕着移动的风筝,在我们做出的每个“步骤”之后,应该出现下一个“步骤”。例如,我要提供一个类似于屏幕底部的屋顶的屏幕,左侧有电线杆。当代码运行时,没有风筝,但是当我单击然后拖动时,它将出现。

因此,我猜想发生的每个动作之后,SCGREEN底部的文本应随着下一步更新。

文字从:“按下,然后拖动棕色区域(屋顶)的鼠标开始” “拖动然后在蓝色区域(天空)中释放”等等,

谢谢大家

I'm currently doing an assignment using processing, and I can't seem to figure out how to change the text.

The assignment basically revolves around a kite that moves, and after each 'step' that it we make, the next 'step' should appear. E.g. i am to provide a screen that resembles a rooftop at the bottom of the screen with an electric pole to the left. As the code runs, there is no kite, but as i click and then drag it'll appear.

So i guess after each movement that happens, the text at the bottom of the scgreen should update with the next step.

The text goes from: “Press, then drag, the mouse in the brown area (rooftop) to begin” to “Drag and then release in the blue area (sky)” and so forth

Thanks guys

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

迷离° 2025-01-28 05:28:44

我不了解第三段,但是我假设您希望在释放鼠标后出现文本,

您可以使用Mouserealease()在释放鼠标时在鼠标位置生成文本

void mouseReleased () {
  text("Press, then drag, the mouse in the brown area (rooftop) to begin” to “Press, then drag, the mouse in the brown area (rooftop) to begin", mouseX, mouseY)
}

I don't understand the third paragraph, but I'm assuming you want text to appear after the mouse is released

You can use mouseReleased() to generate the text at mouse position when the mouse is released

void mouseReleased () {
  text("Press, then drag, the mouse in the brown area (rooftop) to begin” to “Press, then drag, the mouse in the brown area (rooftop) to begin", mouseX, mouseY)
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文