It looks like you're new here. If you want to get involved, click one of these buttons!
local bkg = Pixel.new(0x338899,1,300, 300) stage:addChild(bkg) bkg:setPosition(200, 200) bkg:setLayoutParameters({ columnWeights = {1,1,1}, rowWeights = {1,1,1} }) local btn_close = Pixel.new(0x223344,1,200, 200) btn_close:setLayoutConstraints({ anchor = Sprite.LAYOUT_ANCHOR_NORTHEAST, gridwidth = 1, gridheight = 1, gridx = 2, gridy= 0, --insetTop = -100, insetRight=-100, }) bkg:addChild(btn_close) |
Likes: Apollo14
Comments
Likes: vitalitymobile
If insets are expected to be positive values, then how we can move btn_close some dx and dy outside the bkg (This time not exact haft width and haft height)?
Likes: vitalitymobile, pie