I fear I already know the answer to this, but can the input dialog's graphic user interface be styled a bit?
Not looking to do fancy stuff, I'd just need a single thing.
When I have a long list of checkboxes in the input, the dialog shows a vertical list of them that, when too long, simply adds a scrollbar and continues to go down.
I'd like to put them in rows of 2 or 3, if possible, so that they are all immediately visible without scrolling, but I didn't see anything for such purpose in the wiki, and it doesn't look like it can be done with HTML, since it would break all the format of input parameters.
Is there a way?
Can an input dialog's GUI be styled a bit?
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
-
- Cave Troll
- Posts: 31
- Joined: Sat May 11, 2019 8:41 am
Re: Can an input dialog's GUI be styled a bit?
For a list of "checkboxes" I often use radio buttons instead. You can also break up selection with tabs.
- Attachments
-
- Image1.png (65.7 KiB) Viewed 570 times
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
-
- Cave Troll
- Posts: 31
- Joined: Sat May 11, 2019 8:41 am
Re: Can an input dialog's GUI be styled a bit?
I already used tabs for different categories and horizontal radio where I can, but I also have many things that are all just true/false and can cohexist with each others.
I have several macros with the same issue, but at present it's related to the macro from my other recent thread about the database of creatures and retrieving specific filters.
For example, the possible creature subtypes are a long list (good, evil, law, chaos, aquatic, angel, archon, demon, devil, and on and on), and they're all just either true or false (the creature either has or hasn't a specific subtype), you can't mix them up in single radios; at least not for the purposes of that macro. In another, maybe very few exceptions that mutually exclude each other like good/evil or law/chaos could be put into single radios, but here you may want to retrieve specifically good *and* evil creatures at the same time.
But well, if it can't be done, no big deal, I asked just to be sure.
I have several macros with the same issue, but at present it's related to the macro from my other recent thread about the database of creatures and retrieving specific filters.
For example, the possible creature subtypes are a long list (good, evil, law, chaos, aquatic, angel, archon, demon, devil, and on and on), and they're all just either true or false (the creature either has or hasn't a specific subtype), you can't mix them up in single radios; at least not for the purposes of that macro. In another, maybe very few exceptions that mutually exclude each other like good/evil or law/chaos could be put into single radios, but here you may want to retrieve specifically good *and* evil creatures at the same time.
But well, if it can't be done, no big deal, I asked just to be sure.
Re: Can an input dialog's GUI be styled a bit?
You might do better to look into frames (specifically, frame5), where you can HTML to do almost anything you want. It's a bit more complicated, but not overly so, and you get near total control.
-
- Cave Troll
- Posts: 31
- Joined: Sat May 11, 2019 8:41 am
Re: Can an input dialog's GUI be styled a bit?
Thanks, I'm looking into it.
Is it possible to have the output injected inside the frame without the form resetting/refreshing?
Following the tutorials, I made the macro that creates the frame, which then calls the macro that creates the form, which then calls the macro that processes the inputs given in the form.
As of now, it just outputs to chat, and I could just stick with that, since it was what it did using just the input() roll option anyway, but since we're at it... can I have the output be displayed within the frame, just after the form?
I can't find a proper way to pass the final result back to the form-building macro (or even worse to the frame-opening one, in case passing it to the form one might cause issues with resetting/refreshing).
Re: Can an input dialog's GUI be styled a bit?
Might be possible with Javascript, but I'm not the one to ask about that.
But you could have whatever macro is presently outputting to chat instead redraw the form with the updated data. It has to be submitted anyway, it's just a matter of where it sends it to.
But you could have whatever macro is presently outputting to chat instead redraw the form with the updated data. It has to be submitted anyway, it's just a matter of where it sends it to.