接口变量-影响滑块的滑块 [英] Interface variables - sliders affecting sliders

查看:46
本文介绍了接口变量-影响滑块的滑块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我的界面上有两个滑块.滑块1的范围为0-500,滑块2的范围为0-100.

Let's say I have two sliders on my interface. Slider one goes from 0-500 and slider two goes from 0-100.

是否仍在进行设置,以使滑块1的值影响滑块2的可能值.因此,如果我将滑块1设置为500,则滑块2只能是0到30之间的值.

Is there anyway of setting it so that the value of slider one influences the possible values for slider two. So if I set slider one to 500, slider two can only be values from 0-30, for example.

或者,它不一定必须是影响另一个滑动器的滑块,它可以是一个按钮.因此,如果我有按钮A和B,则如果选择A,则滑块可以是0-10,但是如果我选择B,则滑块只能是20-50.

Alternatively it would not necessarily have to be a slider affecting another slier, it could be a button. So if I have buttons A and B, if I select A the slider can be 0-10 but if I select B only 20-50.

我承认有一个奇怪的查询,我只是被要求为孩子们创建一个交互式的模型",以尝试不同的系统.

Bit of a strange query I admit, I've just been tasked with making an interactive "model" for kids to try out different systems.

感谢您抽出宝贵的时间阅读这篇文章.

Thanks for taking the time to read this.

推荐答案

是的,您可以执行此操作.示例:制作3个滑块:test0test1test2.设test0的最小值和最大值为test1test2.设test1的最小值和最大值为05,并将值设置为1.设test2的最小值和最大值为95100,并将值设置为99.您的test0滑块现在将按预期工作.

Yes, you can do this. Example: make 3 sliders: test0, test1, test2. Let the min and max values of test0 be test1 and test2. Let the min and max values of test1 be 0 and 5, and set a value of 1. Let the min and max values of test2 be 95 and 100, and set a value of 99. Your test0 slider will now work as hoped.

但是,如果将test0的最小值和最大值设置为test2test1,会发生什么?好的,您得到奇怪的行为,这很可能会让您的孩子"感到厌烦.所以……这种安排不是一个好办法.如果您更详细地描述您的目标,也许我们可以找到更好的解决方案.

BUT what happens if you make the min and max values of test0 to test2 and test1? OK, you get odd behavior, which is likely to look broken to your "kids". So ... this arrangement is not a good one. If you describe your goals in more details, maybe we can find a better solution.

这篇关于接口变量-影响滑块的滑块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆