bright-gpu-74537
05/02/2021, 4:15 PMmost-caravan-45834
05/02/2021, 4:16 PMbright-gpu-74537
05/02/2021, 4:16 PMmost-caravan-45834
05/02/2021, 4:17 PMbright-gpu-74537
05/02/2021, 4:17 PMmost-caravan-45834
05/02/2021, 11:29 PMmost-caravan-45834
05/03/2021, 4:55 AMhaxe
sprite.scrollFactor.copyFrom(scrollFactor);
scrollFactor is null in this case. So looking at my code, seems like it is problematic to reuse a component after I removed it from another component. I think removeAllComponents() is disposing the flixel part of the removed components or messing with their internal state. So I changed my code to the following and everything worked fine.
haxe
private function onShopItemClicked(item: Item)
{
switch(item.getTemplate().type)
{
case WEAPON:
itemDescription.removeAllComponents();
var weaponDescription = new WeaponDescriptionBox();
weaponDescription.populate(item);
itemDescription.addComponent(weaponDescription);
default:
}
}
Not sure if this is a bug, or I just shouldn't reuse component instances. If it's the later, at least I didn't know I shouldn't.bright-gpu-74537
05/03/2021, 7:30 AMbright-gpu-74537
05/03/2021, 7:30 AMbright-gpu-74537
05/03/2021, 7:30 AMbright-gpu-74537
05/03/2021, 7:30 AMhaxe
public function removeAllComponents(dispose:Bool = true)bright-gpu-74537
05/03/2021, 7:31 AMmost-caravan-45834
05/03/2021, 1:17 PMmost-caravan-45834
05/03/2021, 1:56 PMbig-angle-82801
05/03/2021, 2:19 PMbright-gpu-74537
05/03/2021, 4:42 PMbright-gpu-74537
05/03/2021, 4:42 PMbright-gpu-74537
05/03/2021, 4:44 PMbig-angle-82801
05/03/2021, 4:45 PMbright-gpu-74537
05/03/2021, 4:47 PMbright-gpu-74537
05/03/2021, 4:49 PMbig-angle-82801
05/03/2021, 4:53 PMbig-angle-82801
05/03/2021, 4:53 PMbright-gpu-74537
05/03/2021, 4:54 PMbig-angle-82801
05/03/2021, 4:55 PMbright-gpu-74537
05/03/2021, 5:24 PMbig-angle-82801
05/03/2021, 5:39 PMbright-gpu-74537
05/03/2021, 6:39 PMhandsome-processor-40961
05/03/2021, 11:26 PMDo not show again checkbox for a dialog I show on start with Screen.instance.messageBox()? how could I preserve the choice after the app gets closed?handsome-processor-40961
05/03/2021, 11:42 PM.menubar-button .icon {
width: 26;
height: 26;
}
but the icon is still giant