How can I have a "popup box"?
Author |
Message |
user23
|
Posted: Sun May 22, 2011 2:35 am Post subject: How can I have a "popup box"? |
|
|
Basically, I'm trying to accomplish dimming the background, and redrawing a popup box over top of the current screen. I know drawing the new box is simple, but is it possible to dim the background to create a shadow effect type of thing?
Thanks |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Zren

|
Posted: Sun May 22, 2011 4:51 am Post subject: RE:How can I have a "popup box"? |
|
|
Turing doesn't natively support drawing opache (transparent) boxes. Someone did make a module for it (use the search button) but I've never used it personally. If you're looking for a eye candy effect than try blurring instead?
Ah here it is.Scroll down for the alpha module.
http://compsci.ca/v3/viewtopic.php?t=17171&highlight=module |
|
|
|
|
 |
Raknarg

|
Posted: Sun May 22, 2011 8:21 am Post subject: RE:How can I have a "popup box"? |
|
|
Well, there is another way, but it depends on whether or not I'm being delusional.
So I think I read somewhere once that you can save whatever's on the run window as a picture. Ever heard of that, Zren? Or anyone for that matter?
If it's possible, then you can load your background as a picture and use Pic.Blend and blend a black box with your picture. |
|
|
|
|
 |
Zren

|
Posted: Sun May 22, 2011 10:12 am Post subject: Re: How can I have a "popup box"? |
|
|
Neat trick. Oh and your looking for Pic.New() momo.
Pic.Blend
Well, it works. Just remember to use Pic.Free after unpausing (or you'll crash after 1000 pauses).
Turing: |
var a, b, c : int
for i : 1 .. 1000
Draw.FillOval (Rand.Int (0, maxx), Rand.Int (0, maxy), Rand.Int (4, 40), Rand.Int (4, 40), Rand.Int (0, maxcolor))
end for
a := Pic.New (0, 0, maxx, maxy)
Draw.FillBox (0, 0, maxx, maxy, black)
b := Pic.New (0, 0, maxx, maxy)
c := Pic.Blend (a, b, 10)
Pic.Draw (c, 0, 0, picCopy)
|
|
|
|
|
|
 |
Raknarg

|
Posted: Sun May 22, 2011 2:25 pm Post subject: RE:How can I have a "popup box"? |
|
|
Right, thanks Wander.
So i'm guessing for user23 he wouldn't even need to use Pic.Free, he could just draw the background, draw the box and loop a Mouse.Where command or something. |
|
|
|
|
 |
user23
|
Posted: Sun May 22, 2011 3:47 pm Post subject: Re: How can I have a "popup box"? |
|
|
Yea that worked for me with a few changes, now because I've made too many threads today, heres my last question, how can I randomize a boolean value so x := false or x:= true, where it selects one at random? |
|
|
|
|
 |
Tony

|
|
|
|
 |
Raknarg

|
Posted: Sun May 22, 2011 4:49 pm Post subject: RE:How can I have a "popup box"? |
|
|
And don't worry about making too many threads, your questions are probably ones that other students have too. |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
|
|