-
June 12th, 2019, 04:18 #1
- Join Date
- Jun 2018
- Posts
- 31
Creating a text box inside a pop up window
I have created a button. This button opens a window. It has a header but now I want to create a text box that automatically multilines. How do I do this?
what I have so far
Code:<root> <windowclass name="perceptionsheet"> <placement> <size> <width>500</width> <height>300</height> </size> </placement> <nodelete /> <playercontrol /> <sheetdata> <genericcontrol name="perceptionframe"> <bounds>0,0,500,300</bounds> <frame> <name>storybox</name> </frame> </genericcontrol> <stringcontrol name="perception_header"> <anchored> <to>perceptionframe</to> <position>insidetopleft</position> <offset>200,30</offset> </anchored> <center /> <static>Perception </static> <font>narratorfont</font> </stringcontrol> <stringcontrol name="perception_desc1"> <anchored> <to>perceptionframe</to> <position>insidetopleft</position> <offset>15,50</offset> </anchored> <left /> <font>sheettextsmall</font> <what do I do for text box??> </stringcontrol> <closebutton_charsheetmini /> </sheetdata> </windowclass> </root>
Last edited by Moon Wizard; June 12th, 2019 at 06:37.
-
June 12th, 2019, 11:37 #2
-
June 12th, 2019, 20:46 #3
- Join Date
- Jun 2018
- Posts
- 31
Notes
-
June 13th, 2019, 03:45 #4
- Join Date
- Jun 2018
- Posts
- 31
So I tried duplicating notes and it didn't work.
-
June 13th, 2019, 04:30 #5
I've never done anything like what you are doing, but I've followed enough on the forums and poked around the code enough to know you are going to have to duplicate the notes code and rename the objects in multiple places. Probably not just in a few xml files, but in some lua as well. And the files you need to modify probably exist in the CoreRPG ruleset along the the ruleset you are trying to modify. The usual suggestion is to use "find in files" from something like notepad++ for all the files in both rulesets and look for a unique object name.
But, as I've never duplicated a notes window, or anything similar, I could be totally off.
I can tell you though that just saying that you tried and it didn't work is not going to get you much help. In part because you are not explicitly asking for help, and in part because you haven't provided any details so someone can help you troubleshoot. Folks will need to know what files you have modified, and what code you have modified or added. At a minimum.
Problems? See; How to Report Issues, Bugs & Problems
On Licensing & Distributing Community Content
Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
Note, I am not a SmiteWorks employee or representative, I'm just a user like you.
-
June 13th, 2019, 04:48 #6
@Druthlen What exactly are you looking for - a multi-line string control (like the notes tab in the 5E PC sheet) or a formatted text control, like in a story window? If the latter, use a formattedtextcontrol: https://www.fantasygrounds.com/refdo...extcontrol.xcp
Private 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!
-
June 13th, 2019, 23:33 #7
- Join Date
- Jun 2018
- Posts
- 31
So I copied story
<windowclass name="perceptionsheet">
<frame>storybox</frame>
<placement>
<size width="350" height="500" />
</placement>
<sizelimits>
<dynamic />
</sizelimits>
<minimize>minimized_encounter</minimize>
<playercontrol />
<sharable />
<nodelete />
<tooltip field="name" />
<sheetdata>
<sub_note_header name="header">
<class>encounter_header</class>
</sub_note_header>
<frame_story_content name="contentframe" />
<ft_record name="text">
<anchored to="contentframe" position="over" />
<footer>footer_wide</footer>
<empty textres="perc_desc" hidereadonly="true" />
</ft_record>
<scrollbar>
<anchored to="text" />
<target>text</target>
</scrollbar>
</sheetdata>
</windowclass>
<windowclass name="encounter_header">
<margins control="0,0,0,7" />
<script>
function onInit()
update();
end
function update()
local bReadOnly = WindowManager.getReadOnlyState(getDatabaseNode());
name.setReadOnly(bReadOnly);
end
</script>
<sheetdata>
<link_record_header>
<class>encounter</class>
</link_record_header>
<anchor_record_header_right name="rightanchor" />
<icon_record_locked />
<button_record_locked />
<stringfield name="name">
<anchored to="rightanchor" height="24">
<top offset="-4" />
<left parent="" offset="45" />
<right anchor="left" relation="relative" offset="-5" />
</anchored>
<font>reference-h</font>
<empty textres="perc_header" />
<nodrag />
<delaykeyupdate />
</stringfield>
</sheetdata>
</windowclass>>
</root>
So far it fills the empty space with the string I have declared. However, I cant figure out how to get a new line in a string and How would I fill that value instead of going with empty? Thanks for the help
-
June 14th, 2019, 00:00 #8
can you post an image (or three) of what you are trying to do?
-
June 14th, 2019, 00:26 #9
Yeah, let us know what you're actually trying to do.
Private 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!
-
June 14th, 2019, 00:45 #10
- Join Date
- Jun 2018
- Posts
- 31
Untitled.jpg
So you see the character sheet. I want to add buttons that have info on the attributes. So far my button pops up. It has my window with a header. It has a section where I can type text in but I want to make that text automatic so I don't have to add it per character.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks