用于创建更好的菜单和 UI 的 TI-BASIC 库

发布于 2025-01-11 04:59:11 字数 527 浏览 0 评论 0原文

我一直在为我的计算器创建 TI-BASIC 应用程序,但希望将菜单和界面从这种默认样式升级:

到我在其他应用程序中看到的更像这样的东西:

在此处输入图像描述

除了按像素对这些屏幕进行编码之外使用 Pxl-On() 来渲染像素,这会很困难并且渲染速度也很慢,有哪些选项可以在 TI-BASIC 中执行此操作?

我已经看到,通过安装 DoorsCS 库,您可以访问 UI 库,这正是我所追求的,但这似乎主要是鼠标光标驱动的,我觉得这对用户来说很麻烦。我很想知道是否有更接近上面图片的东西。理想情况下,库是用汇编语言编写的,但可以从 TI-BASIC 访问。

它存在吗?或者我需要写一篇吗?

I've been creating TI-BASIC apps for my calculator, but would love to upgrade the menu and interface from this default style:

To something more like this, that I've seen in other apps:

enter image description here

Other than coding those screens pixel by pixel using Pxl-On(), which will be difficult and also slow to render, what options are available to do this from within TI-BASIC?

I've seen that by installing the DoorsCS library, you get access to a UI library, which is sort of what I'm after, but that seems to be mostly mouse-cursor driven which I find cumbersome for the user. I would be keen to know if there's something closer to the images above. Ideally a library written in assembly but accessible from TI-BASIC.

Does it exist? Or will I need to write one?

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

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

发布评论

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

评论(1

生生不灭 2025-01-18 04:59:11

简短回答:

除非存在我不知道的现有库...不,没有函数,但您可以比设置单个像素更快更容易地绘制它们。

长答案:

我知道没有类似 Menu() 的纯基本函数可以做到这一点,并且我相信如果它们存在的话我会知道它们。也许存在您可以安装的外部库,但我对这些一无所知。

但是,这些函数可以让您比设置单个像素更快更容易地绘制菜单:

  • 2nd->Draw->0:Text( 将以相同的小字体在图表上为您绘制一串文本就像在你的图片中一样。
  • 你可以使用 2nd->Draw->2:Line( 来绘制盒子。让它们看起来像你的图片中一样,后面有“阴影”会更费力,但也是可行的。
  • 2nd->Draw->7:Shade 将以黑色像素对区域进行阴影处理,但请注意,运行时

黑色背景上的白色文本会花费很长时间,因此我建议仅使用黑色文本。但如果你真的想要:我能想到的最简单的方法是绘制文本,然后为矩形区域中的每个像素运行 Pxl-Change 另一种可能性是允许更快的汇编程序。 Text(; I 的颜色反转选项不记得在哪里,但我相信我以前见过一个汇编程序可以做到这一点。

Short answer:

Unless there's an existing library out there that I don't know of... no, there's no functions, but you can draw them faster and easier than setting individual pixels.

Long answer:

I know of no functions in pure basic analogous to Menu() that would do this, and I'm confident I would know about them if they existed. Maybe external libraries exist that you could install, but I don't know anything about those.

However, there are these functions would let you draw the menus much faster and easier than setting individual pixels:

  • 2nd->Draw->0:Text( will draw a string of text on the graph for you, in the same small font as in your pictures.
  • You can use 2nd->Draw->2:Line( to draw the boxes. Making them look as in your pictures with the "shade" behind them would be more work but doable.
  • 2nd->Draw->7:Shade will shade an area in black pixels, though be warned, this takes a long time when running.

The white text on a black background is harder, so I'd recommend just using black text on a white background. But if you really want to: The easiest way in pure basic I can think of is drawing the text, then running Pxl-Change for every pixel in the rectangular area. Another possibility is assembly programs that allow for a faster color inversion option for Text(; I can't remember where but I believe I have seen an assembly program that does this before.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文