Thread: Reference Module image alignment
-
November 6th, 2020, 02:31 #1
Reference Module image alignment
Hello - I'm working on a reference module, and am trying to get a picture to line up to the right (or left) of the text, similar to the setup in the Call of Cthulhu ruleset I've linked below. The code I'm trying to do this with is here:
Code:<id-00001> <align type="string">center</align> <frame type="string">noframe</frame> <text type="formattedtext">Example text...</text> <blocktype type="string">singletext</blocktype> </id-00001> <id-00002> <align type="string">left,right</align> <size type="string">200,438</size> <image type="image"> <bitmap type="string">images\anathaym.jpg</bitmap> </image> <caption type="string" /> <imagelink type="windowreference"> <class>imagewindow</class> <recordname>reference.imagedata.img_anathaym_jpg</recordname> </imagelink> <blocktype type="string">image</blocktype> </id-00002> <id-00003> <align type="string">center</align> <frame type="string">brown</frame> <text type="formattedtext">More example text...</text> <blocktype type="string">singletext</blocktype> </id-00003>
I'm not exactly sure how to resolve this - I've tried to find a solution here on the forums (and probably missed one, I'm sure), but can't find an example to work from to ensure my XML is correct for the module. If anyone could point me in the right direction, I'd be very grateful.
This is for FGU also - not sure if that makes any difference or not.
Ultimate License Holder! Anyone can play!
Timzone: US Central (-6 GMT)
-
November 6th, 2020, 03:31 #2
<blocktype type="string">pictureright</blocktype>
-
November 6th, 2020, 03:31 #3
or possibly <blocktype type="string">imageright</blocktype>
-
November 6th, 2020, 16:41 #4
Thanks Damned - I've tried both of those. With "pictureright" the block appears but the picture does not; with "imageright" the picture appears but the text still appears above and below the image. If I use those, should the
Code:<align type="string">left,right</align>
Ultimate License Holder! Anyone can play!
Timzone: US Central (-6 GMT)
-
November 6th, 2020, 16:46 #5Private 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 6th, 2020, 16:47 #6
Some info here: https://www.fantasygrounds.com/wiki/...erence_Manuals
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!
-
November 6th, 2020, 17:30 #7
You've got a lot going on there, and a screenshot of what you're seeing would have been nice rather than the CoC book you're trying to replicate.
Code:<id-00001> <align type="string">center</align> <frame type="string">noframe</frame> <text type="formattedtext">Example text...</text> <blocktype type="string">singletext</blocktype> </id-00001>
Code:<id-00002> <align type="string">left,right</align> <size type="string">200,438</size> <image type="image"> <bitmap type="string">images\anathaym.jpg</bitmap> </image> <caption type="string" /> <imagelink type="windowreference"> <class>imagewindow</class> <recordname>reference.imagedata.img_anathaym_jpg</recordname> </imagelink> <blocktype type="string">image</blocktype> </id-00002>
Code:<id-00003> <align type="string">center</align> <frame type="string">brown</frame> <text type="formattedtext">More example text...</text> <blocktype type="string">singletext</blocktype> </id-00003>
Last edited by Talyn; November 6th, 2020 at 21:59.
-
November 6th, 2020, 19:13 #8
Not sure if this helps but here's an example from one of my retail projects:
Code:<blocks> <block_001> <blocktype type="string">picture</blocktype> <picture type="token">images/frlogo_small.png@FRQ1 Haunted Halls of Eveningstar</picture> <size type="string">535,141</size> </block_001> <block_002> <blocktype type="string">header</blocktype> <text type="string">Haunted Halls of Eveningstar</text> </block_002> <block_003> <blocktype type="string">text</blocktype> <text type="formattedtext"> <p><b>An Introductory Module for Characters of Levels 1–5</b></p> </text> </block_003> <block_004> <align type="string">left,right</align> <blocktype type="string">picture</blocktype> <picture type="token">images/dndclassiclogo.png@FRQ1 Haunted Halls of Eveningstar</picture> <size type="string">223,150</size> <text type="formattedtext"> <h>Credits</h> <p><b>Design: </b>Ed Greenwood <b>Cartography: </b>Diesel <b>Editing: </b>Anne Brown <b>Typography: </b>Tracey Zamagne <b>Cover Art: </b>Erik Olson <b>Production: </b>Erin Wilk <b>Interior Art: </b>Valerie Valusek</p> </text> </block_004> <block_005> <blocktype type="string">text</blocktype> <text type="formattedtext"> <p><b>Dedication: </b>To The Knights of Myth Drannor, whose glory-ground this first was: Andrew, Anita, Ian, Jim, Jenny, John, and Victor. A lot's missing here—not only rooms and passages and monsters that wouldn't fit, but the delight and camaraderie you brought to its exploration. Know that in memory it yet burns bright.</p> </text> </block_005> <block_006> <align type="string">left,right</align> <blocktype type="string">text</blocktype> <text type="formattedtext"> <p><b>TSR Ltd. </b> POB 756 Lake Geneva WI 53147 U.S.A.</p> </text> <text2 type="formattedtext"> <p><b>TSR, Inc. </b> 120 Church End, Cherry Hinton Cambridge CB1 3LB United Kingdom</p> </text2> </block_006>
Block 4 is where you're going to be interested. This is where we get into the two-column layout. Now, I could have chosen to have the 'Credits' header text in its own block (and if memory serves that was my first choice but this layout looked better so that the 'Credits' line is aligned with the D&D Classic logo rather than being above it. That also helped out because the credits text ended up being less height that the logo image, so having the 'Credits' line balanced the two columns. I chose the 'token' blocktype for both images on this page rather than the 'image' blocktype because FG Classic is still unable to display a PNG with alpha channel except for tokens. But aside from that, the markup would be identical for an 'image' blocktype as well.
Block 5 is once again a standard 'text' blocktype, then finally Block 6 I utilized a two-column layout for the US and UK addresses. (There are some ASCII 10's in there for force the linebreaks but the forum software doesn't like those so they're not displayed here.)
Hope that helps.Last edited by Talyn; November 6th, 2020 at 22:03.
-
November 6th, 2020, 20:52 #9
Talyn, wow - thanks for the info. That is awesome and helps immensely.
Using what you've shown here got it working for me - however, I have two related questions.
First, is there a way to have the text actually "wrap" around the image? As in the example above the text is longer than the image itself and stays aligned to the left. I'm assuming that there isn't a way, and that to get it to do that will require me to "cut up" the text so that the next block fits neatly under the image, but if there was a way to do it automatically through the XML it'd be great.
Second, is there a way to get the image and text to actually be inside a "brown" frame (i.e., <frame type="string">brown</frame>)? I've toyed with it by adding that to the block containing the text / image section, and it's showing as the image shows - in a standard text block instead (or so it appears - the brown text block below the image / text area is a second text only block with the frame set as brown).
Code:<id-00003> <align type="string">left,right</align> <frame type="string">brown</frame> <size type="string">200,350</size> <image type="image"> <bitmap type="string">images\sideimg1.jpg</bitmap> </image> <caption type="string" /> <imagelink type="windowreference"> <class>imagewindow</class> <recordname>reference.imagedata.img_sideimg1_jpg</recordname> </imagelink> <text type="formattedtext"><p> Lorem ipsum dolor sit amet....</text> <blocktype type="string">image</blocktype> </id-00003>
Ultimate License Holder! Anyone can play!
Timzone: US Central (-6 GMT)
-
November 6th, 2020, 21:09 #10
First question : No; you'll ned to fiddle about with the text so that it sort of is the same length as the image.
Second Question: No. You can't have a frame around just one column or around a text/image dual column. You can have two different borders around two columns of text or around one single text block.If there is something that you would like to see in Fantasy Grounds that isn't currently part of the software or if there is something you think would improve a ruleset then add your idea here https://www.fantasygrounds.com/featu...rerequests.php
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks