Zenity是一个创建对话框的工具,仅此而已。Bash 中没有 3D。为此,您需要一种编码语言,而不是 shell 脚本语言。
它有以下选项:
--calendar Display calendar dialog
--entry Display text entry dialog
--error Display error dialog
--info Display info dialog
--file-selection Display file selection dialog
--list Display list dialog
--notification Display notification
--progress Display progress indication dialog
--question Display question dialog
--warning Display warning dialog
--scale Display scale dialog
--text-info Display text information dialog
Run Code Online (Sandbox Code Playgroud)
创建供用户输入的图形方法。
例子:
#!/bin/sh
if zenity --entry \
--title="Add new profile" \
--text="Enter name of new profile:" \
--entry-text "NewProfile"
then echo $?
else echo "No name entered"
fi
Run Code Online (Sandbox Code Playgroud)
会显示...
但这在很大程度上仅限于这些选项。
如果您想创建 3D 应用程序(如游戏),请使用 Python(pygame 是一个不错的选择)、Perl 或 C/C++。
howtogeek还有一些例子。
归档时间: |
|
查看次数: |
2392 次 |
最近记录: |