Thread: Ruleset stuff
-
February 16th, 2019, 01:37 #1
- Join Date
- Dec 2016
- Posts
- 28
Ruleset stuff
So I'm trying to modify CoreRPG. I can't even put a string on the charsheet. In campaign/record_char_main.xml I have:
<windowclass name="charsheet_main">
<margins control="0,0,0,2" />
<sheetdata>
<frame_char name="attributesframe">
<bounds>15,0,-29,-5</bounds>
</frame_char>
<label_frametop name="attributesframetop">
<anchored to="attributesframe" />
<static textres="char_label_abilities" />
</label_frametop>
<label_fieldtop>
<anchored to="attributesframe" position="lefthigh" offset="15,5" />
<static textres="ABC" />
</label_fieldtop>
</sheetdata>
</windowclass>
strings.xml contains the string ABC and defines it as abc. Nothing show up. Just attributes text that comes with CoreRPG. What is wrong with label_fieldtop? I tried it with label too. Nothing. I've been programming for 30 years and I can't get a text field to show up.
-
February 16th, 2019, 13:40 #2
are you working in an unpacked copy of corerpg?
is fg loading your unpacked copy?
Ok label field top should be anchored to something like a numberfield not a frame...
and static textres is looking for a text resource called ABC - eg have a look in one of the strings files and you will see a bunch of text resources - so you would need to create one called ABC which contains the text you want displayed...Last edited by damned; February 16th, 2019 at 14:23.
-
February 16th, 2019, 16:16 #3
- Join Date
- Dec 2016
- Posts
- 28
[QUOTE=damned;426517]are you working in an unpacked copy of corerpg?[quote]
Yes
is fg loading your unpacked copy?
Ok label field top should be anchored to something like a numberfield not a frame...
and static textres is looking for a text resource called ABC - eg have a look in one of the strings files and you will see a bunch of text resources - so you would need to create one called ABC which contains the text you want displayed...
-
February 16th, 2019, 17:04 #4
Your code in post #1 is using an anchor position of “lefthigh” - which is outside of the frame you’re anchoring to and is also inheriting dimensions from that frame, so the control probably isn’t anywhere visible - hence why static bounds is working (I assume you’ve specified bounds within the visible areas of the window), but anchoring isn’t.
See info on anchoring here: https://www.fantasygrounds.com/wiki/...face#AnchoringPrivate 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!
-
February 16th, 2019, 18:21 #5
- Join Date
- Dec 2016
- Posts
- 28
The anchoring section you reference (that I've read six times) doesn't explain how to combine left and top. I saw lefthigh in another file and used it. Again, is that documented anywhere?
I repeat. I've been a programmer for 30 years. I understand how this should work. The documentation is very spotty.
-
February 16th, 2019, 23:22 #6
The documentation is certainly not all encompassing.
The approach I use is to look for an example of what I want to do in an existing ruleset and mimic that code.
I keep unpacked copies of CoreRPG and 5E (I unpack to CoreRPG337 and 5E337 so that I am not preventing updates from working) plus I have over time collected many other extensions and community rulesets that have different UI features.
I do find anchoring to be plenty confusing still...
-
February 17th, 2019, 00:01 #7
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
Yep me too but it is an incredibly powerful system. The relative anchoring can make a lot of Windows very easy to do. And the merge system is not even short of amazing.
-
February 17th, 2019, 22:19 #8
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,540
If you want something in the upper left interior of another object (such as a frame), use the "insidetopleft" position as the starting point. Or set the individual left and top anchors to parent from the target object.
Check out the Interface section in the Developer Guide wiki:
https://www.fantasygrounds.com/wiki/...face#Anchoring
Specifically, take a look at the graphic that's included to help you understand which anchors are set by each "position" option.
Regards,
JPG
-
February 18th, 2019, 01:38 #9Private 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!
-
February 18th, 2019, 01:45 #10
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks