most-caravan-45834
05/04/2021, 4:07 AMmost-caravan-45834
05/04/2021, 4:08 AMmost-caravan-45834
05/04/2021, 4:10 AMhaxe
backgroundColor = 0xFF77FF77;
I supposed setting the color to 0 as in
haxe
backgroundColor = Color.fromComponents(0, 0, 0, 0);
would make it transparent, but when I tried it, it turned black.bright-gpu-74537
05/04/2021, 6:20 AM.backgroundColor isnt a FlxColor, its basically a shortcut for customStyle.backgroundColor, that doesnt use an alpha attribute, so although 0xFF77FF77 works on flixel, its technically wrong and should just be 0x77FF77
2) The Color.fromComponents makes it black because it ignores the alpha (thats a separate background property: backgroundOpacity)
3) The correct way to do would be to null it: .backgroundColor = null, however, there was a bug that stopped that working (on static targets) - thats fixed nowbright-gpu-74537
05/04/2021, 6:21 AM.backgroundColor = nullbright-gpu-74537
05/04/2021, 6:23 AMbright-gpu-74537
05/04/2021, 6:27 AMxml
<style>
.menuitem .menuitem-icon {
width: 16px;
height: 16px;
}
</style>bright-gpu-74537
05/04/2021, 6:28 AM.menuitem .iconbright-gpu-74537
05/04/2021, 6:29 AMbright-gpu-74537
05/04/2021, 6:31 AMbright-gpu-74537
05/04/2021, 6:45 AMhaxe
private var myChild:Box = null;
public function new() {
super();
set.onClick = function(_) {
if (myChild == null) {
myChild = new Box();
myChild.addClass("mychild");
}
container.addComponent(myChild);
}
unset.onClick = function(_) {
container.removeAllComponents(false);
}
}
am i doing something different to your test?most-caravan-45834
05/04/2021, 1:43 PMmost-caravan-45834
05/04/2021, 1:45 PMmost-caravan-45834
05/04/2021, 2:45 PMbright-gpu-74537
05/04/2021, 2:45 PMmost-caravan-45834
05/04/2021, 2:46 PMhandsome-processor-40961
05/04/2021, 3:10 PMhandsome-processor-40961
05/04/2021, 3:12 PMmenubar-button
I style its icon like you showed
.menubar-button .icon {
width: 36;
height: 36;
}
but the icon in the menubar is unaffected, while the icons for the items are all finebright-gpu-74537
05/04/2021, 3:15 PMmost-caravan-45834
05/04/2021, 3:21 PMmost-caravan-45834
05/04/2021, 3:22 PMmost-caravan-45834
05/04/2021, 3:22 PMbright-gpu-74537
05/04/2021, 3:24 PMhandsome-processor-40961
05/04/2021, 3:54 PM.menubar-button .icon {
width: 36px;
height: 36px;
}
.menuitem .menuitem-icon{
width: 36px;
height: 36px;
}bright-gpu-74537
05/04/2021, 4:01 PMhandsome-processor-40961
05/04/2021, 4:04 PMbright-gpu-74537
05/04/2021, 4:04 PMhandsome-processor-40961
05/04/2021, 4:05 PMbright-gpu-74537
05/04/2021, 4:05 PMbright-gpu-74537
05/04/2021, 4:06 PMcss
.menubar-button .icon {
width: 100px;
}
.button .icon {
width: 200px;
}