Page 1 of 1
problems in skinning revolution
Posted: Fri Apr 17, 2009 7:14 pm
by shadowslash
i'm developing a skinning method for runtime revolution and i've encountered some problems, the only way to create a custom Minimize, Maximize, Close button on the upper right part of the program is to set the stack decorations to empty... but another problem sprung up.. with the stack decoration set to empty, the taskbutton for my program will also be hidden! i wanna know if there're any ways to get around this problem?

as you can see on the screenshot above, only the Revolution GUI has a taskbar button... here's a full body screenshot of the skinning system that i'm making for runtime revolution...

any answer is greatly appreciated!

Posted: Sat Apr 18, 2009 10:37 pm
by TonyL
try this:
on preOpenStack
set the decorations of this stack to "title","minimize","close"
wait 1 second
end preOpenStack
PS. Don't forget to set your stack decorations back to empty before saving.
Posted: Mon Apr 20, 2009 7:28 pm
by shadowslash
it did show the task button but it still won't do, all i got was a doubled set of buttons as shown on the screenshot below...

Posted: Tue Apr 21, 2009 10:30 am
by margueratesullivan
Does anyone know where I can find a living room decoration planner online?
Ikea has a similar thing online called a ktichen planner. But I have a brown and cream lviing room (brown carpet, cream furniture) and I am loking for tips and ideas, as I am redecorating soon.
Posted: Tue Apr 21, 2009 10:27 pm
by whelkybaby
Random idea...
How about creating a substack with a title that is the same as your window but called something like "fakeStack", setting its location to somewhere that's off the screen (e.g. set the bottomRight of stack "fakeStack" to -500,-500) and going straight to your main stack on the resume event?
Only drawback I can think of whether the alt-tab window-shuffler will show two windows or one window?
Steve
P.S. Happy birthday in a day or two!
Posted: Wed Apr 22, 2009 7:02 am
by mwieder
I realize it's not quite the effect you're looking for, but how about
set the decorations of this stack to title
set the title of this stack to space
Posted: Wed Apr 22, 2009 1:31 pm
by shadowslash
thank you for the suggestions.. the one where i create the substack and stuff won't do because it WILL show the taskbar button but when the user uses alt+tab there would be lots of problem with that... as for the last suggestion, the one to use
Code: Select all
set the decoration of this stack to "title"
it won't do either because it only hid the three buttons in the upper right of the program but it still shows the main title toolbar whereas should have been the function of the title bar in the skinned program itself...

Posted: Wed Apr 22, 2009 3:26 pm
by SparkOut
In your button to minimize the skinned window, try
Code: Select all
on mouseUp
set the decorations of this stack to "title"
set the iconic of this stack to true
end mouseUp
and in the stack script put
Code: Select all
on unIconifyStack
send "unIconifyMe" to this stack in 0 milliseconds
end unIconifyStack
on unIconifyMe
set the decorations of this stack to empty
end unIconifyMe
For some reason in a standalone if you try to set the decorations in the on unIconifyStack handler directly, it will set the stack as invisible too.
You will get a momentary flash of the regular Windows title bar as the window then animates its minimisation. You can set the visible of the stack to false beforehand, and then set to true again after setting the iconic of the stack if you want to avoid this, but that will mean you get no animation of the window minimising - it just looks like it vanishes and perhaps people will not notice the taskbar icon.
Posted: Wed Apr 22, 2009 3:29 pm
by shadowslash
thank you for the answer but how will i show the task bar button when the program is not minimized.. i need to show it without showing the native windows title bar on top of the program because the skin already has that in it's function...

Posted: Wed Apr 22, 2009 7:11 pm
by SparkOut
Hmm. I actually don't know. It may be linked to the bugs 7530 and 7531 and or generally miss-hitting when it comes to windows with no control decorations.
Posted: Wed Apr 22, 2009 8:53 pm
by SparkOut
OK, here's a workaround:
Use a custom window shape, which will mean that the window decorations are not displayed, even though they can be left as set. It appears that in v 3.5 at least (maybe prior) setting a custom window shape will clear the decorations property. I'm not sure if this is intentional or not. I'm very confused by the iconification goings on, and I think it needs an overhaul.
However, import a 1 x 1 pixel image to be the rectangular shape of the stack. I suppose you could use a custom image with transparency to match your desired shape, and handle resizing a bit cleverly, but anyway, in the stack script:
Code: Select all
on resizeStack
refitShape
end resizeStack
on uniconifyStack
refitShape
end uniconifyStack
on preOpenStack
refitShape
end preOpenStack
on refitShape
set the rect of image id <theImageIdNr> to the rect of this stack
set the topleft of image id <theImageIdNr> to 0,0
set the windowShape of this stack to <theImageIdNr>
set the decorations of this stack to "Title"
end refitShape
in the minimize button you can simply put
Code: Select all
on mouseUp
set the iconic of this stack to true
end mouseUp
This should leave the icon on the taskbar while the program is active, and minimize to the taskbar too. On adjusting anything it seems that either the decorations or the windowshape get cleared as mutually exclusive by the engine, so the refitShape handler will put them back. I've played around with leaving one or other out and they seem to give inconsistent results, but the above appears to work - here on Windows XP at least.
HTH
(Happy almost birthday, too!)