-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add macro functions to get Frame/Dialog properties by name. #584
Labels
feature
Adding functionality that adds value
macro changes
This issue adds or changes macro functions. Extra work is required (testing, wiki, code editor)
tested
This issue has been QA tested by someone other than the developer.
Comments
Merudo
added a commit
to Merudo/maptool
that referenced
this issue
Aug 19, 2019
- Add getFrameProperties(name) and getDialogProperties(name) functions - Functions returns json with "width", "height", "temporary" (dialog only), and "title" - Implements RPTools#584
Merudo
added a commit
to Merudo/maptool
that referenced
this issue
Aug 19, 2019
- Add getFrameProperties(name) and getDialogProperties(name) functions - Functions returns json with "width", "height", "temporary" (dialog only), and "title" - Implements RPTools#584
My PR implements the two functions. I am unable to return the "temporary" field for the frame, because the property is currently not supported (see #585) |
Phergus
added
macro changes
This issue adds or changes macro functions. Extra work is required (testing, wiki, code editor)
and removed
documentation needed
Missing, out-of-date or bad documentation
labels
Aug 20, 2019
Should we close this and leave the issue with the "temporary" property for later? |
Phergus
changed the title
Return Frame/Dialog properties from frameName/dialogName
Add macro functions to get Frame/Dialog properties by name.
Aug 20, 2019
Answering my own question. Issue #585 deals with the "temporary" property. Closing. |
Both functions tested okay. |
Phergus
added
the
tested
This issue has been QA tested by someone other than the developer.
label
Aug 20, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
feature
Adding functionality that adds value
macro changes
This issue adds or changes macro functions. Extra work is required (testing, wiki, code editor)
tested
This issue has been QA tested by someone other than the developer.
Is your feature request related to a problem? Please describe.
I often create frames related to a character. For example, I created a frame to list a character's equipment, another for the character's spells and another for a character's traits.
I don't want a dozen frames open for the same property, so I tend to give a set frameName to a property ('say, "Equipment" or "Spells") that is the same regardless of the character. That way, at most one frame can be opened for each property.
Problem is, it is very hard or near impossible to know which character is being displaying by the frame. This causes issues when I may need to redraw the frame, for example when a character is changed.
Describe the solution you'd like
An optional argument "value" for dialog() and frame() that can store arbitrary information into the frame/dialog. The "value" doesn't impact the html or other properties of the dialog/frame, but it can be retrieved by the following functions.
Two functions, named something like
Which return a json with the following properties: width; height; temporary; title; value.
Example JSON: {"width":300, "height":500, "temporary": 0, "title":"Equipment of Bob", "value": "Bob"}
That way it would be able to extract some information (such as the character displayed) from the title. The other properties might come handy too.
Additional context
Short discussion with aliasmask: https://forums.rptools.net/viewtopic.php?f=3&t=28194
The text was updated successfully, but these errors were encountered: