
-----------------------------------
user23
Sun May 22, 2011 2:35 am

How can I have a &quot;popup box&quot;?
-----------------------------------
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

-----------------------------------
Zren
Sun May 22, 2011 4:51 am

RE:How can I have a &quot;popup box&quot;?
-----------------------------------
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
Sun May 22, 2011 8:21 am

RE:How can I have a &quot;popup box&quot;?
-----------------------------------
Well, there is another way, but it depends on whether or not I'm being delusional. :P
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
Sun May 22, 2011 10:12 am

Re: How can I have a &quot;popup box&quot;?
-----------------------------------
Neat trick. Oh and your looking for Pic.New() momo.


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
Sun May 22, 2011 2:25 pm

RE:How can I have a &quot;popup box&quot;?
-----------------------------------
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
Sun May 22, 2011 3:47 pm

Re: How can I have a &quot;popup box&quot;?
-----------------------------------
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
Sun May 22, 2011 4:11 pm

RE:How can I have a &quot;popup box&quot;?
-----------------------------------
[tdoc]Rand.Int[/tdoc]

-----------------------------------
Raknarg
Sun May 22, 2011 4:49 pm

RE:How can I have a &quot;popup box&quot;?
-----------------------------------
And don't worry about making too many threads, your questions are probably ones that other students have too.
