PDA

View Full Version : Questions on Creating Custom Character Sheet (CoreRPG)



LordEntrails
June 15th, 2017, 15:54
I'm building a custom character sheet for CreoRPG for the game Star Frontiers, questions I have I will be posting in this thread (rather than the current multiple threads I have been using).

Current issue;
Some of the string_labeled controls I have placed do not have the horizontal line like expected. See;
19390

The code for this frame_char is;


<frame_char name="primaryframe">
<bounds>170,0,255,160</bounds>
</frame_char>
<string_labeled name="race">
<anchored to="primaryframe" position="insidetopleft" offset="15,10" width="75" height="20" />
<labelres>char_label_race</labelres>
</string_labeled>
<string_labeled name="gender">
<anchored to="race" position="insidetopleft" offset="0,45" width="75" />
<labelres>char_label_gender</labelres>
</string_labeled>
<string_labeled name="handedness">
<anchored to="gender" position="insidetopleft" offset="0,45" width="75" />
<labelres>char_label_handedness</labelres>
</string_labeled>
<string_labeled name="age">
<anchored to="race" position="right" offset="5,0" width="75" />
<labelres>char_label_age</labelres>
</string_labeled>
<string_labeled name="height">
<anchored to="age" position="insidetopleft" offset="0,45" width="75" />
<labelres>char_label_height</labelres>
</string_labeled>
<string_labeled name="weight">
<anchored to="height" position="insidetopleft" offset="0,45" width="75" />
<labelres>char_label_weight</labelres>
</string_labeled>


How do I resolve this? Also, if there is a better way to position these controls, please suggest (I was getting console errors about no vertical references when using bottom position.)

Trenloe
June 15th, 2017, 17:04
Try setting height="20" for the controls that aren't underlined.

LordEntrails
June 15th, 2017, 19:06
Try setting height="20" for the controls that aren't underlined.
Thanks, that did it. Should have seen it myself.

LordEntrails
June 15th, 2017, 19:36
What are the available position tags when using an anchor? I can't find it in the Dev Guides.

For instance;

<anchored to="xpframe" position="insidetopleft" offset="20,10" width="20" />
Besides insidetopleft, what else can I use?

Moon Wizard
June 15th, 2017, 20:12
https://www.fantasygrounds.com/refdoc/windowcontrol.xcp

Check out that link. Look at the definition section.

Cheers,
JPG

LordEntrails
June 15th, 2017, 20:24
Thanks John, that's what I'm looking at, but I only see left, right, bottom, top as options, but as shown, the insidetopleft is another option, but I don't see it. But, not critical, as at this time I can get something to work by playing with the offsets. Things don't move together as nicely as I want, but I can handle that. (So moving on from that.)

Right now I'm trying to figure out fonts and similar. In this image I used the "string_labeled" to get the grey/opaque label ("EARNED") in the upper part (which has the problem their is a string field associated with it that text can be accidentally entered into), and tried a simple label in the lower part using the same font as the "string_labeled" template, but it's is bright and bold, not what I want.

Any help in pointing me how to figure this pout is appreciated :)

EDIT: code

<string_labeled name="xp_earned_label">
<anchored to="xp_earned" position="insidetopleft" offset="-5,9" width="50" />
<labelres>char_xp_earned</labelres>
</string_labeled>
<number_dropadd name="xp_spent">
<anchored to="xpframe" position="insidetopleft" offset="25,75" width="30" />
<labelres>char_xp_spent</labelres>
</number_dropadd>
<label name="xp_spent_label">
<anchored to="xp_spent" position="insidetopleft" offset="-9,14" width="50" />
<center />
<font>sheettext</font>
<static>SPENT</static>
</label>

Moon Wizard
June 15th, 2017, 20:42
Here's the text from the position tag.



The shorthand notation position (above, aboveleft, aboveright, below, belowleft, belowright, left, lefthigh, leftlow, right, righthigh, rightlow, insidetop, insidetopleft, insidetopright, insidebottom, insidebottomleft, insidebottomright, insideleft, insideright, over)


Cheers,
JPG

Moon Wizard
June 15th, 2017, 20:46
String_labeled is specifically to create underlined fields with a grey text widget underneath the underline.

If you want a static label, just use a stringcontrol.
If you want an editable string, use a string field.

For the fonts, each font asset specifies a font file and a default color. String controls/fields can override the default font color by using the color tag.

Regards,
JPG