I have a set of edited code that creates half sized building instances in the CityView.lua screen. However, I cannot seem to hide the building icon border texture:
XML Instance:
Whenever I attempt to hide the border, it gives the error that it is NIL value.
Any thoughts?
Code:
if bBuildingAddition == false and IconHookup( building.PortraitIndex, 64, building.IconAtlas, controlTable.BuildingImage ) then
controlTable.BuildingImage:SetHide( false );
controlTable.BuildingImageBorder:SetHide( false );
--controlTable.BuildingImageBorder:SetTexture( "64x64FrameButtons.dds" );
--controlTable.BuildingName:SetOffsetX( 64 );
else
controlTable.BuildingImage:SetHide( true );
controlTable.BuildingImageBorder:SetHide( true );
--controlTable.BuildingImageFrame:SetTexture( "blankbutton64.dds" );
controlTable.BuildingName:SetOffsetX( 2 );
end
XML Instance:
Code:
<Instance Name="BuildingInstance">
<Button NoStateChange="1" Anchor="L,C" Color="White.0" Offset="0,0" Size="254,64" ID="BuildingButton" ToolTip="Placeholder Tooltip">
<Label Anchor="R,T" Offset="64,8" Font="TwCenMT18" ColorSet="Beige_Black_Alpha" FontStyle="Shadow" String="Building Name" ID="BuildingName"/>
<Image Anchor="R,C" Size="64,64" Offset="0,-2" Texture="64x64FrameButtons.dds" ID="BuildingImageBorder" Hidden="1">
<Image Anchor="C,C" Texture="WonderAtlas512.dds" Size="64,64" ID="BuildingImage" Hidden="1"/>
<Button Anchor="L,B" AnchorSide="O.I" Size="32,32" Offset="0,6" Texture="assets\UI\Art\Icons\CitizenWorker.dds" ID="BuildingFilledSpecialistSlot1" Hidden="True"/>
<Button Anchor="L,B" AnchorSide="O.I" Size="32,32" Offset="32,6" Texture="assets\UI\Art\Icons\CitizenWorker.dds" ID="BuildingFilledSpecialistSlot2" Hidden="True"/>
<Button Anchor="L,B" AnchorSide="O.I" Size="32,32" Offset="64,6" Texture="assets\UI\Art\Icons\CitizenWorker.dds" ID="BuildingFilledSpecialistSlot3" Hidden="True"/>
<Button Anchor="L,B" AnchorSide="O.I" Size="32,32" Offset="0,6" Texture="assets\UI\Art\Icons\CitizenEmpty.dds" ID="BuildingEmptySpecialistSlot1" Hidden="True"/>
<Button Anchor="L,B" AnchorSide="O.I" Size="32,32" Offset="32,6" Texture="assets\UI\Art\Icons\CitizenEmpty.dds" ID="BuildingEmptySpecialistSlot2" Hidden="True"/>
<Button Anchor="L,B" AnchorSide="O.I" Size="32,32" Offset="64,6" Texture="assets\UI\Art\Icons\CitizenEmpty.dds" ID="BuildingEmptySpecialistSlot3" Hidden="True"/>
</Image>
<Box Anchor="L,B" Color="27.53.64.255" Offset="0,0" Size="254,2"/>
</Button>
</Instance>
Whenever I attempt to hide the border, it gives the error that it is NIL value.
Any thoughts?