[Closed] floater vs dialog confusion
great idea… go oldscool on filebase
i solved it something like this:
(schematic)
AX.mse
DN.mse
..
if max.version < 9.1.0.109 then (
delete X.mse
copy DN.mse X.mse
)else(
delete X.mse
copy AX.mse X.mse
)
rollout (
..
include X.mse
..
)
..
the inlcude was beachin around while trying to feed it anything else than a pure string… seams to be caused by the position in the RO… anyways, works great thx :wavey:
ah something else while i got the chance to ask you
is it possible to assign a bitmap as background to a rolloutfloater?
would it be possible if i take a dialog and stuff a rolloutfloater as subrollout into it?
Only createDialog() supports a background bitmap.
In a floater, you would have to fake it by placing an ImgTag of Bitmap control over the whole rollout and then place your buttons on top of it, hoping they will redraw correctly, or draw your controls in the ImgTag itself and handle their interaction with the ImgTag mouse handlers, like a map on a web page.
ok i did that and it works … just with the little exception that MS tells me:
Unknown property: “height” in X <<
X= my UI element with the image
as i need to colorize a dynamic Rollout (dialog) and it’s subfloater i have to enlarge the pic when i add new items… this is strangely not possible.
i also could make it 2k in height from the beginning but that would mean unnessecary loadingtime for ROs with only a few elements
also verry funny is that the dialog with it’s subrollout in max08 is grey and in max8 corectly colored (with bitmap for the createdialog).
is there a way to make subrollout inherit the parameters of the parent rollout, like the bitmap or similar?
or a way to cheat this missing height parameter? in maxscript
thx in advance
what is your UI element of choice for displaying the bitmap? Both bitmap and imgtag support .height just fine…
rollout roll_test "test" width:250 height:250 (
bitmap bmp_test "" width:50 height:50 pos:[0,0]
)
createDialog roll_test
roll_test.bmp_test.bitmap = bitmap 100 100 color:(color 255 128 0)
roll_test.bmp_test.width = 200
roll_test.bmp_test.height = 200
rollout roll_test "test" width:250 height:250 (
imgtag tag_test "" width:50 height:50 pos:[0,0]
)
createDialog roll_test
roll_test.tag_test.bitmap = bitmap 100 100 color:(color 255 128 0)
roll_test.tag_test.width = 200
roll_test.tag_test.height = 200
i use a button
needs to be clickable for interaction (in another part of the scriptz)
also i got a createdialog in a function and try to acces it’s pos in another function… doesn’t work either.
does it maybe have to do something with the fact that they are not on “topLevel”?
yeah, you won’t have much luck with a button if you need the width/height to be changed… dare I ask why something that acts as a background image needs to be clickable, though? or maybe I missed something
anyway – imgTag is clickable, or (if you’re creating a dialog) you could try playing with the dialog mouse events… not quite sure what that does with subrollouts
nah these are 2 different things
the buttons with the images are in a different rollout