CivPedia custom "corrections" to XML framework.

Zyxpsilon

Running Spider
Joined
Oct 29, 2009
Messages
3,250
Location
On Earth
Alright people, i'm at the end of my rope with this.

What i'm trying to do is very simple; Put the Grid bottom area back on screen rather than the default method which hides it somehow.
Refer to the attached image for a snap of what results i currently can get by editing the necessary (i think) values & fields, The scrollbar, Info Boxes and dropdown Lists are either still attached to the bottom edge rather than inside the GridFraming (above the red lines) or keep deploying Off-Screen.

Arrrgghhhh, this situation is freaking weird.

Consult the two sections below for what i have edited so far. Note that there maybe other areas where changes need to be made but i simply can't find a way.

Default XML section(s)...
Spoiler :
Code:
<!--=======================================================================================================================-->
	<!-- The display -->
	<!--=======================================================================================================================-->
	<Box Anchor="C,C" Size="Full,Full" Color="0,0,0,160" ConsumeMouse="1" ID="BackDrop"/>
	<Box Anchor="C,C" Size="1024,Full[/B]" Color="0,0,0,0">
		<Image Anchor="C,T" Texture="FancyTrim1024.dds" Size="1024,64"/>
		<Label Anchor="C,T" Offset="0,4" Font="TwCenMT24" FontStyle="Shadow" Color0="Beige" Color1="0.0.0.160" String="TXT_KEY_CIVILOPEDIA"/>
		<Grid Size="1024,[B][COLOR="Blue"]full[/COLOR][/B]" Anchor="C,T" Offset="0,82" Padding="0,0" Style="Grid9DetailFive140">
*
* Further down...
*
		<!--Invisible box that everything is anchored to-->
		<Box Anchor="C,T" Size="1000,[B][COLOR="Blue"]980[/COLOR][/B]" Offset="0,126" Color="255,255,255,0">
			<!--glowy blue background behind list of articles-->
			<AlphaAnim Anchor="L,T" Offset="0,0" Size="270,[B]Full[/B]" Pause="0" Cycle="Bounce" Speed="1" AlphaStart=".55" AlphaEnd=".75">
				<Grid Size="270,[B][COLOR="Blue"]full[/COLOR][/B]" Anchor="L,T" Offset="0,0" Padding="0,0" Style="GridGlass16"/>
			</AlphaAnim>
			<ScrollPanel Anchor="C,T" Offset="0,0" Size="1002,[B][COLOR="Blue"]980[/COLOR][/B]" Vertical="1" ID="ScrollPanel" AutoScrollBar="1">
				<ScrollBar Offset="0,0" Style="VertSlider" Anchor="R,T" Length="[B][COLOR="Blue"]800[/COLOR][/B]" ID="ScrollBar"/>
				<UpButton Offset="0,0" Style="ScrollBarUp" Anchor="R,T" ID="UpButton"/>
				<DownButton Offset="0,0" Style="ScrollBarDown" Anchor="R,T" ID="DownButton"/>
*
* Further down...
*
			<ScrollPanel Anchor="L,T" Offset="0,0" Size="294,[B][COLOR="Blue"]980[/COLOR][/B]" Vertical="1" ID="LeftScrollPanel">
				<ScrollBar Offset="0,0" Style="VertSlider" Anchor="R,T" Length="[B][COLOR="Blue"]930[/COLOR][/B]" ID="LeftScrollBar"/>
				<UpButton Offset="0,0" Style="ScrollBarUp" Anchor="R,T" ID="LeftUpButton"/>
				<DownButton Offset="0,0" Style="ScrollBarDown" Anchor="R,T" ID="LeftDownButton"/>
				<!--list of articles in this category-->
				<Stack Anchor="L,T" Offset="7,0" Size="64,64" StackGrowth="Bottom" Padding="0" ID="ListOfArticles"/>
			</ScrollPanel>
*
(EOF)
My current editing Try-Outs...

Spoiler :
Code:
<!--=======================================================================================================================-->
	<!-- The display -->
	<!--=======================================================================================================================-->
	<Box Anchor="C,C" Size="Full,Full" Color="0,0,0,160" ConsumeMouse="1" ID="BackDrop"/>
	<Box Anchor="C,C" Size="1024,Full" Color="0,0,0,0">
		<Image Anchor="C,T" Texture="FancyTrim1024.dds" Size="1024,64"/>
		<Label Anchor="C,T" Offset="0,4" Font="TwCenMT24" FontStyle="Shadow" Color0="Beige" Color1="0.0.0.160" String="TXT_KEY_CIVILOPEDIA"/>
		<Grid Size="1024,[B][COLOR="DarkRed"]960[/COLOR][/B]" Anchor="C,T" Offset="0,82" Padding="0,0" Style="Grid9DetailFive140">
*
* ...
*
		<!--Invisible box that everything is anchored to-->
		<Box Anchor="C,T" Size="1000,[B][COLOR="DarkRed"]875[/COLOR][/B]" Offset="0,126" Color="255,255,255,0">
			<!--glowy blue background behind list of articles-->
			<AlphaAnim Anchor="L,T" Offset="0,0" Size="270,[B][COLOR="DarkRed"]875[/COLOR][/B]" Pause="0" Cycle="Bounce" Speed="1" AlphaStart=".55" AlphaEnd=".75">
				<Grid Size="270,[B][COLOR="DarkRed"]875[/COLOR][/B]" Anchor="L,T" Offset="0,0" Padding="0,0" Style="GridGlass16"/>
			</AlphaAnim>
			<ScrollPanel Anchor="C,T" Offset="0,0" Size="1002,[B][COLOR="DarkRed"]750[/COLOR][/B]" Vertical="1" ID="ScrollPanel" AutoScrollBar="1">
				<ScrollBar Offset="0,0" Style="VertSlider" Anchor="R,T" Length="[B][COLOR="DarkRed"]720[/COLOR][/B]" ID="ScrollBar"/>
				<UpButton Offset="0,0" Style="ScrollBarUp" Anchor="R,T" ID="UpButton"/>
				<DownButton Offset="0,0" Style="ScrollBarDown" Anchor="R,T" ID="DownButton"/>
*
*...
*
			<ScrollPanel Anchor="L,T" Offset="0,0" Size="294,[B][COLOR="DarkRed"]810[/COLOR][/B]" Vertical="1" ID="LeftScrollPanel">
				<ScrollBar Offset="0,0" Style="VertSlider" Anchor="R,T" Length="[B][COLOR="DarkRed"]720[/COLOR][/B]" ID="LeftScrollBar"/>
				<UpButton Offset="0,0" Style="ScrollBarUp" Anchor="R,T" ID="LeftUpButton"/>
				<DownButton Offset="0,0" Style="ScrollBarDown" Anchor="R,T" ID="LeftDownButton"/>
				<!--list of articles in this category-->
				<Stack Anchor="L,T" Offset="7,0" Size="64,64" StackGrowth="Bottom" Padding="0" ID="ListOfArticles"/>
			</ScrollPanel>
*
(EOF)
In BLUE what they were... in RED what i changed.

Please help, someone - anyone!?! :confused:
 

Attachments

  • CivPedia-Bottom_Flaw.png
    CivPedia-Bottom_Flaw.png
    42 KB · Views: 85
I thought i had already tried fiddling with the (1024,full) you mention by giving it a correct height as what my monitor allows (1050). Changed it again and still no effect on the bottom "expanding" off.

But if you're saying that grid must not be given that edited (960) value - maybe that's the actual tricky problem, or more mysterious flaws.

Oh well - it's all right back where i started. Messing with a mess of CT, Paddings, Offsets, Full or NO Fulls, relative Grids that don't really attach their anchors correctly... and what else.

This is getting on my nerves.
Have i mentioned my screen only displays 1680x1050?
Thanks for your help, anyway.
 
Yes and what happened is certainly weird. The whole display "dropped" off by some 120+ pixels... and so pushed the scrollbars and list boxes even further down.
There *must* be another value somewhere that would fix such a custom Civilopedia. Maybe an extra Padding, Anchoring could solve this, i just dunno how or where in a badly indented flow of lines.

With CT (center, top) or IO (Inside,Outside) it's easy figure out what's going on and yet... much of the framework is relative to Grid Anchors that completely baffle me.

Whichever comes first, i'll fix my problem(s) with some help here or i'll simply abandon any hopes of ever seeing a neat PopUp during games that doesn't hide partially at the bottom.
 
O-M-G... i've actually figured it out somehow!

The "flaw" was caused by Local values in the darn LUA file;
Spoiler :
Code:
-- adjust the various parts to fit the screen size
local _, screenSizeY = UIManager:GetScreenSizeVal(); -- Controls.BackDrop:GetSize();
local scrollBarWidth = Controls.ScrollBar:GetSize().x;
local scrollPanelSize = Controls.ScrollPanel:GetSize();
[B][COLOR="Blue"]local scrollBarSize = { x = scrollBarWidth; y = screenSizeY - [COLOR="DarkRed"]172[/COLOR]; };[/COLOR][/B]
Controls.ScrollBar:SetSize( scrollBarSize );
Controls.LeftScrollBar:SetSize( scrollBarSize );
Controls.ScrollBar:SetOffsetVal( 0, 18 );
Controls.LeftScrollBar:SetOffsetVal( 0, 18 );
Controls.DownButton:SetOffsetVal( 0, screenSizeY - 126 - 18 );
Controls.LeftDownButton:SetOffsetVal( 0, screenSizeY - 126 - 18 );
Controls.LeftUpButton:SetOffsetVal( 0, 0 );
[B][COLOR="Blue"]scrollPanelSize.y = screenSizeY - [COLOR="DarkRed"]126[/COLOR];[/COLOR][/B]
Controls.ScrollPanel:SetSize( scrollPanelSize );
local leftScrollPanelSize = Controls.LeftScrollPanel:GetSize();
[B][COLOR="Blue"]leftScrollPanelSize.y = screenSizeY - [COLOR="DarkRed"]126[/COLOR];[/COLOR][/B]
Controls.LeftScrollPanel:SetSize( leftScrollPanelSize );
Controls.ScrollPanel:CalculateInternalSize();
Controls.LeftScrollPanel:CalculateInternalSize();
Mostly, the Blue lines are my target for fine-tuning and the RED values are the guilty offenders. Then, all is needed is proportional settings in the XML grids - it will probably still kick the bottom scroll-arrows for both panels but this tiny gimmick can be adjusted too.

Finally, with your help Nutty and some bloody LUA hunch. I got it fixed!! Yppie. ;)
 
Back
Top Bottom