Komag
11 years agoRoku Guru
Why can't my new region draw to another region?
I've had a hard time trying to understand really how "region"s work, they still confuse me a lot.
Everything is working fine. Now I want to add a HUD and have it be its own region for easier x/y management, and I want to base the regions x/y and size off of the mainR like so:
Anything I try to draw into this doesn't show up, why?
If I switch to this (and adjust the numbers based off screen instead of mainR) and everything works perfectly, no other changes, so I know it's not some other problem.
I can live with this I guess, but why can't I draw a region to a region, what am I misunderstanding about regions?
screen = CreateObject("roScreen", TRUE, 1280, 720)
screen.SetAlphaEnable(TRUE)
mainR = CreateObject("roRegion", screen, 32, 8, 1216, 704) ' leaves enough room for overscan
mainR.SetAlphaEnable(TRUE)
Everything is working fine. Now I want to add a HUD and have it be its own region for easier x/y management, and I want to base the regions x/y and size off of the mainR like so:
hudR = CreateObject("roRegion", mainR, 870, 532, 290, 116) ' Draws to mainR
hudR.SetAlphaEnable(TRUE)
Anything I try to draw into this doesn't show up, why?
hudR = CreateObject("roRegion", screen, 902, 540, 290, 116) ' Draws to screen
If I switch to this (and adjust the numbers based off screen instead of mainR) and everything works perfectly, no other changes, so I know it's not some other problem.
I can live with this I guess, but why can't I draw a region to a region, what am I misunderstanding about regions?