DICE PACKS BUNDLE
  1. #1

    FGU API, imagecontrol.hasGrid() .... doesn't work as expected?

    The response from imagecontrol.hasGrid() is true if you have the "visible" selected.




    It returns false if that is not set visible, even if you have a grid that is just invisible.




    I don't recall this being a issue in FGC. If you had a grid configured it would return TRUE, if you did not, FALSE.

    Is this intended? If so can we get an API call that returns TRUE if a grid is set, false if not? If not, how do you suggest this be detected?
    ---
    Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
    Documentation for AD&D 2E ruleset.
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
    Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.

  2. #2
    Curiosity makes me ask what decision you are making dependent on it. How does it affect you?

  3. #3
    Quote Originally Posted by jharp View Post
    Curiosity makes me ask what decision you are making dependent on it. How does it affect you?
    In FGC if this was "false" it wouldn't give you distances. I've not tested it in FGU but assumed it did the same. Without a grid size you dont know distance. I need distance calculations to be able to implement auras.
    ---
    Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
    Documentation for AD&D 2E ruleset.
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
    Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.

  4. #4
    All maps in FGU always have an implied grid (50x50 by default, or whatever is defined by user). In FGC, when a grid was not defined, it was essentially a nil/unknown value (thus no measurements).

    So, your code should be updated such that FGU specific code should not use hasGrid.

    Regards,
    JPG

  5. #5
    Quote Originally Posted by Moon Wizard View Post
    So, your code should be updated such that FGU specific code should not use hasGrid.
    Acknowledged.
    ---
    Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
    Documentation for AD&D 2E ruleset.
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
    Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
5E Product Walkthrough Playlist

Log in

Log in