Weird behavior with editing the Religion Overview

j_mie6

Deity
Joined
Dec 20, 2009
Messages
2,963
Location
Bristol (uni)/Swindon (home)
Today I have been working on some changes to the religion overview for my mod, however I have noticed some weird behavior and I can't work out why it is happening or how to fix it (this is my first attempt at this, I usually live in the C++ domain)

I added in this code under the first box in the Your Religion Tab Content, so under where it talks about the founded religion:

Code:
<!-- State Religion Stuff -->
				<Box Size="953,100" Color="0,0,0,0">
					<Stack StackGrowth="Right" Padding="5" Offset="20,0">
						<Label Anchor="L,C" String="TXT_KEY_RO_STATE_RELIGION" Font="TwCenMT18" ColorSet="Beige_Black_Alpha" FontStyle="Shadow" ID="StateReligionLabel" />
						<Image Anchor="L,C" Size="80,80" Offset="0,0" Texture="ReligiousSymbolsWhite80_Expansion.dds" ID="StateReligionIcon"/>
						<Label Anchor="L,C" Offset="5,0" Font="TwCenMT18" WrapWidth="590" ColorSet="Beige_Black_Alpha" FontStyle="Shadow" ID="StateReligionStatus" />
						<!-- Change State Religion Button -->
						<GridButton Anchor="L,C" Style="SmallButton" Size="150,32" Offset="10, 0" ToolTip="TXT_KEY_RO_CHANGE_RELIGION_TT" ID="ChangeReligionButton">
							<Label Anchor="C,C" Offset="0,0" Font="TwCenMT18" String="TXT_KEY_RO_CHANGE_RELIGION" ColorSet="Beige_Black_Alpha" FontStyle="Shadow"/>
						</GridButton>
					</Stack>

					<Image Anchor="L,B" Offset="0,24" TextureOffset="50,0" Texture="bar900x2.dds" Size="476,1" />
					<Image Anchor="R,B" Offset="0,24" TextureOffset="368,0" Texture="bar900x2.dds" Size="477,1" />
				</Box>

where this is the code for the first box:

Spoiler :

Code:
<Box Size="953,100" Color="0,0,0,0">
					<Stack StackGrowth="Right" Padding="5">
						<Box Size="80,80" Color="0,0,0,0" Anchor="L,C">
							<Image ID="FounderIconBG" Size="80,80" Anchor="C,C" Offset="0,0" TextureOffset="32,0" Texture="CivIconBGSizes.dds"/>
							<Image ID="FounderIconShadow" Size="64,64" Anchor="C,C" Offset="1,1" Texture="CivSymbolAtlas16.dds" Color="Black.128"/>
							<Image ID="FounderIcon" Size="64,64" Offset="0,0" Anchor="C,C" Texture="CivSymbolsColor256.dds"/>
							<Image ID="FounderIconHighlight" Size="80,80" Anchor="C,C" Offset="0,0" TextureOffset="141,0" Texture="CivIconBGSizes_Highlight.dds"/>
						</Box>


						<Label Anchor="L,C" String="TXT_KEY_RO_RELIGIOUS_STATUS" Font="TwCenMT18" ColorSet="Beige_Black_Alpha" FontStyle="Shadow" ID="ReligionStatusLabel" />
						<Image Anchor="L,C" Size="80,80" Offset="0,0" Texture="ReligiousSymbolsWhite80_Expansion.dds" ID="FounderReligionIcon"/>
						<Label Anchor="L,C" Offset="5,0" Font="TwCenMT18" WrapWidth="590" ColorSet="Beige_Black_Alpha" FontStyle="Shadow" ID="ReligiousStatus"  />
					</Stack>

					<Image Anchor="L,B" Offset="0,24" TextureOffset="50,0" Texture="bar900x2.dds" Size="476,1" />
					<Image Anchor="R,B" Offset="0,24" TextureOffset="368,0" Texture="bar900x2.dds" Size="477,1" />
				</Box>


As you can see, quite similar.

After writing some lua code to set up the labels and the icon I end up with these two results:



In this image (ignore that the text hasn't been shifted to the right yet) you can clearly see that something isn't right; the labels aren't in line!!! In addition the area between the lines is bigger than the area above it and at the bottom of the screen, despite them all being 100 pixels tall

if I set the state religion via lua and refresh the interface I am left with this:



Just showing the religion icon realigns the labels?! However the area is still inconsistent with the size and the alignment appears to be below centre.

Can anybody tell me what on earth is going on here?! and how can I fix it!
 

Attachments

  • 2014-08-19_00015.jpg
    2014-08-19_00015.jpg
    194.2 KB · Views: 196
  • 2014-08-19_00016.jpg
    2014-08-19_00016.jpg
    193.2 KB · Views: 138
Top Bottom