----------------------------------------------------------------
-- Checkboxes to switch Policy-views.
----------------------------------------------------------------
function OnTerra( bIsChecked )
-- Simulate radio-button
if (bIsChecked ~= true) then
Controls.TerraInfo:SetCheck( true );
return;
end
Controls.MilitaryInfo:SetCheck( false );
Controls.ChaosInfo:SetCheck( false );
-- Resize the main window
Controls.EntirePolicyGrid:SetSize( { x = 1005; y = 768; } );
-- Show the selected policies and hide the rest
Controls.TopTerraStack:SetHide( false );
Controls.BottomTerraStack:SetHide( false );
Controls.BottomHorizontalTrim:SetHide( false );
Controls.MilitaryStack:SetHide( true );
Controls.ChaosStack:SetHide( true );
-- Resize the trim
Controls.TopHorizontalTrim:SetSize( { x = 970; y = 5; } );
Controls.MiddleHorizontalTrim:SetSize( { x = 970; y = 5; } );
-- Offset the baubles to fit new size
Controls.PolicyInfo:SetOffsetVal( 0, 0 );
Controls.UtopiaBox:SetOffsetVal( 0, 0 );
Controls.InfoStack:SetOffsetVal( 200, 20 );
Controls.InfoStack2:SetOffsetVal( 450, 20 );
Controls.PlayerTitleLabel:SetOffsetVal( 0, 6 );
end
Controls.TerraInfo:RegisterCheckHandler( OnTerra );
function OnMilitary( bIsChecked )
-- Simulate radio-button
if (bIsChecked ~= true) then
Controls.MilitaryInfo:SetCheck( true );
return;
end
Controls.TerraInfo:SetCheck( false );
Controls.ChaosInfo:SetCheck( false );
-- Resize the main window
Controls.EntirePolicyGrid:SetSize( { x = 1005; y = 478; } );
-- Show the selected policies and hide the rest
Controls.TopTerraStack:SetHide( true );
Controls.BottomTerraStack:SetHide( true );
Controls.BottomHorizontalTrim:SetHide( true );
Controls.MilitaryStack:SetHide( false );
Controls.ChaosStack:SetHide( true );
-- Resize the trim
Controls.TopHorizontalTrim:SetSize( { x = 970; y = 5; } );
Controls.MiddleHorizontalTrim:SetSize( { x = 970; y = 5; } );
-- Offset the baubles to fit new size
Controls.PolicyInfo:SetOffsetVal( 0, 0 );
Controls.UtopiaBox:SetOffsetVal( 0, 0 );
Controls.InfoStack:SetOffsetVal( 200, 20 );
Controls.InfoStack2:SetOffsetVal( 450, 20 );
Controls.PlayerTitleLabel:SetOffsetVal( 0, 6 );
end
Controls.MilitaryInfo:RegisterCheckHandler( OnMilitary );
function OnChaos( bIsChecked )
-- Simulate radio-button
if (bIsChecked ~= true) then
Controls.ChaosInfo:SetCheck( true );
return;
end
Controls.TerraInfo:SetCheck( false );
Controls.MilitaryInfo:SetCheck( false );
-- Resize the main window
Controls.EntirePolicyGrid:SetSize( { x = 1200; y = 478; } );
-- Show the selected policies and hide the rest
Controls.TopTerraStack:SetHide( true );
Controls.BottomTerraStack:SetHide( true );
Controls.BottomHorizontalTrim:SetHide( true );
Controls.MilitaryStack:SetHide( true );
Controls.ChaosStack:SetHide( false );
-- Resize the trim
Controls.TopHorizontalTrim:SetSize( { x = 1165; y = 5; } );
Controls.MiddleHorizontalTrim:SetSize( { x = 1165; y = 5; } );
-- Offset the baubles to fit new size
Controls.PolicyInfo:SetOffsetVal( -190, 0 );
Controls.UtopiaBox:SetOffsetVal( -190, 0 );
Controls.InfoStack:SetOffsetVal( 245, 20 );
Controls.InfoStack2:SetOffsetVal( 575, 20 );
Controls.PlayerTitleLabel:SetOffsetVal( 95, 6 );
end
Controls.ChaosInfo:RegisterCheckHandler( OnChaos );