Ok, so I have a GuiScrollCtrl with a GuiSwatchCtrl in it. The swatch control's name is ArcadeGui_Scroll. In the function below, when the swatch control's length is increased beyond that of the scroll control, I still cannot scroll down. I can't find out why I can't scroll down. Any ideas?
function ArcadeGui::onWake(%gui)
{
if($EditArcadeGUI)
{
return;
}
%count = ArcadeSystem.getCount();
if(%count)
{
ArcadeSystem.selectedGame = "";
ArcadeGui_Description.setText("");
}
for(%i = 0; %i < %count; %i++)
{
%obj = ArcadeSystem.getObject(%i);
if(!ArcadeGui_Scroll.getCount())
{
%position = "1 1";
}
else
{
%position = "1" SPC restWords(ArcadeGui_Scroll.getObject(ArcadeGui_Scroll.getCount() - 1).position) + 80;
}
if(ArcadeGui_Scroll.getCount() == 3)
{
ArcadeGui_Scroll.extent = "243" SPC restWords(ArcadeGui_Scroll.getExtent()) + 40;
echo("\c2Extent:" SPC ArcadeGui_Scroll.getExtent());
}
else if(ArcadeGui_Scroll.getCount() >= 4)
{
ArcadeGui_Scroll.extent = "243" SPC restWords(ArcadeGui_Scroll.getExtent()) + 80;
echo("\c2Extent:" SPC ArcadeGui_Scroll.getExtent());
}
%this = new GuiBitmapBorderCtrl()
{
profile = "ArcadeBorderProfile";
horizSizing = "right";
vertSizing = "bottom";
position = %position;
extent = "236 70";
minExtent = "8 2";
enabled = "1";
visible = "1";
clipToParent = "1";
new GuiSwatchCtrl()
{
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "1 1";
extent = "234 68";
minExtent = "8 2";
enabled = "1";
visible = "1";
clipToParent = "1";
color = "0 0 0 30";
};
new GuiBitmapCtrl()
{
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "5 5";
extent = "60 60";
minExtent = "8 2";
enabled = "1";
visible = "1";
clipToParent = "1";
bitmap = "Add-Ons/Client_Arcade/images/questionMark";
wrap = "0";
lockAspectRatio = "0";
alignLeft = "0";
alignTop = "0";
overflowImage = "0";
keepCached = "0";
mColor = "255 255 255 255";
mMultiply = "0";
};
new GuiBitmapCtrl()
{
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "5 5";
extent = "60 60";
minExtent = "8 2";
enabled = "1";
visible = "1";
clipToParent = "1";
bitmap = %obj.bitmap;
wrap = "0";
lockAspectRatio = "0";
alignLeft = "0";
alignTop = "0";
overflowImage = "0";
keepCached = "0";
mColor = "255 255 255 255";
mMultiply = "0";
};
new GuiBitmapButtonCtrl()
{
profile = "ArcadeButtonLargeProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "236 70";
minExtent = "8 2";
enabled = "1";
visible = "1";
clipToParent = "1";
command = "ArcadeGui.selectGame(\"" @ %obj.name @ "\");";
text = " " @ %obj.name;
groupNum = "-1";
buttonType = "PushButton";
bitmap = "base/client/ui/btnBlank";
lockAspectRatio = "0";
alignLeft = "0";
alignTop = "0";
overflowImage = "0";
mKeepCached = "0";
mColor = "255 255 255 255";
};
};
ArcadeGui_Scroll.add(%this);
}
}