If I want to display effect- or skill-icons, these icons are always 32x32 pixels, which is too large for some of my applications. Luckily I'm able to scale them down to e.g. 16x16 using SetStretchmode().
However, using SetStretchMode will apparently result in a bug (?) that the controls are always visible, even when they're outside of their parent control. This can especially become a problem when using scrollable controls such as ListBox where parts of the content in the scrollable control are always outside of their parent control.
Simple example to demonstrate the issue:
Code:
import "Turbine.UI";
window = Turbine.UI.Window();
window:SetSize(100, 100);
window:SetBackColor(Turbine.UI.Color(0,0,0));
window:SetVisible(true);
icon = {};
for i = 1, 20, 1 do
icon[i] = Turbine.UI.Control();
icon[i]:SetParent(window);
icon[i]:SetSize(32, 32);
icon[i]:SetBackground(0x4113a302);
icon[i]:SetStretchMode(1);
icon[i]:SetSize(16, 16);
icon[i]:SetPosition(16*(i-1),16*(i-1));
end
Does anyone know a solution? Any help would be greatly appreciated!