-
November 12th, 2019, 17:50 #1
Setting a tooltip, works one way, not another...
For this requirement I need to be able to add a CR\r (return) in the text so it looks something like this.
Code:NPC: do something there. PC: do something here.
Code:<string name="cta_hptotal_tooltip"">NPC: Double click to adjust base HP.\rPC: Open Combat details section to adjust.</string>
But all that did was set the tooltip to the literal value and showed the "\r" instead of added the return/CR. I knew I'd done this (programmatically for another situation) before so I dug around and found it and manually set it this way.
Code:function onInit() local aHPTotalTip = {}; table.insert(aHPTotalTip, Interface.getString("cta_hptotal_npc_tooltip")); table.insert(aHPTotalTip, Interface.getString("cta_hptotal_pc_tooltip")); setTooltipText(table.concat(aHPTotalTip, "\r")); end
This seems like odd behavior. Is there some translation going on for \r in the concat im missing?Last edited by celestian; November 12th, 2019 at 17:55.
---
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.
-
November 12th, 2019, 17:53 #2Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
November 12th, 2019, 18:36 #3---
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.
-
November 14th, 2019, 18:39 #4
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,564
String assets will encode "\\r" as carriage returns ("\r") on load in v3.3.9.
Regards,
JPG
-
November 14th, 2019, 19:06 #5
So, to be clear you mean if I set it to:
Code:<string name="cta_hptotal_tooltip">PC: Do something heret.\\rNPC: Do another thing here..</string>
---
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.
-
November 14th, 2019, 19:44 #6
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,564
No, just leave a \r (single slash). I literally just put it up right after posting.
Regards,
JPG
-
November 14th, 2019, 21:05 #7---
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