marcoschwartz / aREST_UI

Embedded UI for the aREST framework
72 stars 34 forks source link

About Changing Button Names. #5

Open ghost opened 8 years ago

ghost commented 8 years ago

Hi, Could i change the Button Name by changing ">ON

" (I mean that "ON" in that line) in aREST_UI.h :


// Buttons UI
for (int i = 0; i < buttons_index; i++) {
  addToBuffer("<div class=\"row\">");
  addToBuffer("<div class=\"col-md-2\"><button class=\"btn btn-block btn-lg btn-primary\" id='btn_on");
  addToBuffer(buttons[i]);
  addToBuffer("'>On</button></div>");
  addToBuffer("<div class=\"col-md-2\"><button class=\"btn btn-block btn-lg btn-danger\" id='btn_off");
  addToBuffer(buttons[i]);
  addToBuffer("'>Off</button></div>");
  addToBuffer("</div>");
}

I Hope i am Correct?

marcoschwartz commented 8 years ago

Indeed, but then you'll need to make this change everytime I release a new version of the library so it's not really convenient. Marked this as an enhancement request, I'll work on this in the future version :)

leapearson commented 8 years ago

Hi Is it possible to chnge the appearance of the buttons? If so, where can I do this? Also, instead of having 2 buttons (on & off) could I use a single button and recognise Mousedown & mouseup events?

Thanks

Lea

marcoschwartz commented 8 years ago

Hi Lea, for now no but I'll keep the suggestions as well!

bill-orange commented 7 years ago

Yes, this is important for me too. My LEDs are hooked up such that 0 is on. Thus, Off is On and On is Off.

Has this been done? This is kind of an old post.

marcoschwartz commented 7 years ago

Not yet as I am mainly focused on the aREST cloud, but if anybody want to implement this I'd be happy to look at it :)

jmartens2 commented 2 years ago

hi i know this an old thread but can i change static state of (1 or 0) pushbuttons in arest_ui.h on lines 178, 183? can i reverse order (make on=0 and off-1)? i need to provide 0 to turn on esp8266 relay bord with 0