piui icon indicating copy to clipboard operation
piui copied to clipboard

[Feature Request] Sliders, start values

Open meilon opened this issue 12 years ago • 6 comments

Hi there,

I'm going to start a project with piui and for some settings I need sliders. Could you add them in the near future? Also, how do I set start values for text boxes, toggles and the (hopefully soon added) sliders?

meilon avatar Mar 31 '13 12:03 meilon

You can use sliders right now, actually. Just use an input with type set to "range", I also have a branch that I am working on that adds an extra arguments to the inputs, I will make a pull request soon and hopefully @dps will integrate it.

rgegriff avatar Apr 02 '13 19:04 rgegriff

Thanks for the "range" tip, do you have an example for me how to catch the changed value? And how to setup a start value? Or will this be in your pull request?

meilon avatar Apr 02 '13 19:04 meilon

You can capture it the same way as if it was a text input. You can test that by changing the input on line 43(?) of the demo to "range". As for the start value, what's needed is a way to set the "value", "min", "max", and "step" arguments of the input element. That is what my patch is going to address. I would work on it now, but I am hella tired.

rgegriff avatar Apr 02 '13 21:04 rgegriff

Thanks for your help, I really appreciate this! I hoped there was a way like with the toggles (directly after I change a value, the server gets notified and I could do stuff with the new value) but until this item gets an event handler I added a button to send those values. I hope your patch comes soon!

A little offtopic but I don't where else to ask: How do I make a list for just selecting a value, like a list of presets. Generating the list with an item with a chevron linking to another page is easy, but how do I make the preset list work? It should look like the list for selecting a ringtone on an iPhone.

meilon avatar Apr 05 '13 14:04 meilon

Hi, tekromancer, did you get anywhere with the patch you were doing?

groliffe avatar Jun 16 '13 06:06 groliffe

I did, but I managed to fry my pi back in may and I haven't had the funds to get a new one.

On Sun, Jun 16, 2013 at 1:35 AM, groliffe [email protected] wrote:

Hi, tekromancer, did you get anywhere with the patch you were doing?

— Reply to this email directly or view it on GitHubhttps://github.com/dps/piui/issues/4#issuecomment-19508594 .

rgegriff avatar Jun 16 '13 20:06 rgegriff