aREST_UI icon indicating copy to clipboard operation
aREST_UI copied to clipboard

About Changing Button Names.

Open ghost opened this issue 10 years ago • 6 comments

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?

ghost avatar Sep 08 '15 13:09 ghost

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 :)

marcoschwartz avatar Sep 10 '15 15:09 marcoschwartz

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

leapearson avatar Apr 04 '16 12:04 leapearson

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

marcoschwartz avatar Apr 24 '16 16:04 marcoschwartz

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.

bill-orange avatar May 13 '17 16:05 bill-orange

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 :)

marcoschwartz avatar May 15 '17 19:05 marcoschwartz

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

jmartens2 avatar May 18 '22 14:05 jmartens2