PDA

Click to See Complete Forum and Search --> : Transparent Form


plenderj
May 11th, 2001, 02:56 AM
Howdy.

Could anyone point me in the right direction for proper transparency for forms ?
I want to have a small form sitting on top of another form in my game, but I want people to still be able to see whats going on underneath ; thus the reason for the transparency.

thanks,
jamie.

Arbiter
May 11th, 2001, 03:11 AM
You could cheat and blit the image from the form behind to the form infront. Same effect really.

plenderj
May 11th, 2001, 03:19 AM
Yeah thats what I was doing except the game screen updates too often, and blitting forms every update slows down the game.
But if I had a transparent form there'd be less overhead.

Its for in game options , communications etc.
You should use it too, instead of that grey box in sentience.

Arbiter
May 11th, 2001, 04:31 AM
You'd only need to update the form if something changes behind it or if the form is moved (ie a mobile menu). If nothing changes, no update is reequired.

I can't really see what you're doing so I can't provide a real example. Got anything for me to look at?

PS - The menu's in Sentience are being improved, but I'm trying to add game functionality first and make it pretty later. They do look pretty dire are the moment don't they... :p

plenderj
May 11th, 2001, 04:35 AM
Well the idea is that if someone right clicks on another ship or whatever in space, or on a space station, that a menu can appear to give them options.

What I would ideally want is to just print text onto the screen, but I need a checkbox too ; and I dont want to do it manually.
So the only other way would be to create a transparent form.

I suppose its kind of like a heads-up-display (HUD) in a fighter plane. It supplies the pilot with information, but its see-through.

Ya follow ?

Arbiter
May 11th, 2001, 04:40 AM
If we look at the problem laterally, let's try and remove the need for the checkbox. As a checkbox is a simple boolean option you don't really need them.

The way I've done the toggle with the RMV slurp (stop/start) is they both use the same label, they merely change the label text. When you click on the label, the variable is updated and the label is refreshed. Using a label, you can set the background to transparent, removing the need for another form.

This help?

plenderj
May 11th, 2001, 04:49 AM
No not really ;)
The reason I want a tickbox is to have somewhere specific for the user to click if they want to choose that option.
I dont want them to click on the whole text.

I could code it easily if I was just using labels and what not.
Ah **** it.

Transparency is a headache anyway. Ill stick to the labels ;)

Arbiter
May 11th, 2001, 05:00 AM
Well, having somewhere specific to click merely irritates me when the whole of the text would be just a useful and provides a greater area to click. In a realtime game, trying to click on tiny checkboxes annoys the hell out of me, especially if there's a lot happening at that given moment.

Why is it that you don't want them to click on the whole text?

I know you could code it easily with labels, you're just a genius really. :D

PS - is this for Craft? Have you finally resurrected it?

plenderj
May 11th, 2001, 05:03 AM
Because I dont like clicking on text ;)

And yes it is for craft.
Ive been working on it lately.
Full map support, better offscreen DCs, some AI, lotsa **** :)

Ill probably work on it a lot over the summer too.

Arbiter
May 11th, 2001, 05:14 AM
Excellent.

It was looking pretty funky when I donloaded it, but it's good to see you're doing some work on it. Keep us posted of new versions. Maybe you should start a thread similar to our Sentience thread? The feedback we've had (off people like yourself) has been invaluable.

Oh and trust me. Go with click on text, the majority of the younger generations are more familiar with this than check boxes / radio buttons etc because they're exposed to the web more than anything else. There's only us old timers who still like check boxes.

If you want Craft to appeal to anyone younger than yourself, labels are the way forward...

plenderj
May 11th, 2001, 05:17 AM
Thanks for the good will ;)
Craft isnt really all that a serious project of mine.
More like a hobby ; or something to do when im supposed to be studying :)


Its also good for refining skills.
Sloppy code is ok when doing normal desktop apps, but you need clean good code when programming games.
So its like a little training room for me.


Anyway yeah ill keep yiz all informed with craft.
I can post the newest ver if ya want ...

Arbiter
May 11th, 2001, 05:23 AM
I'll look forward to it.

kedaman
May 11th, 2001, 06:26 AM
to speed up alpha blending routines you could
1. Write them youself in C++
2. use backbuffers for both front and back components of the area, and updating only front and back when either are changed. Summing them would be a very fast task, comparatively.

a tip: don't replenish your resources with tons of offscreen DC's. Use the same one for all bitmaps and selectobject to switch between them. Other than that, good luck ;)

plenderj
May 11th, 2001, 06:58 AM
You can always rely on kedaman to come along, bladder some incomprehebsible dribble, wish you luck, and wander off ;)

Oh yeah and ked, would that be a kwisatz hedarach kinda prophet :)

kedaman
May 11th, 2001, 07:05 AM
i'm more like a xcviclöum söflazrw prophet :p
maybe you giving up on alphablending now`?

plenderj
May 11th, 2001, 07:09 AM
I gave up on alphablending about 30 picoseconds after I posted this thread :)
Im using a few labels instead. They look all right actually.

kedaman
May 11th, 2001, 07:12 AM
labels sucks bigtime, í guess i'm out of here in an attosecond

plenderj
May 11th, 2001, 07:20 AM
Well what was going to happen was that there would be labels on (for example) Form2. And while the player is playing on Form1, then Form2 would appear over a particular area.
But so that the user can see whats going on Form2 should be transparent.

Now I've just taken the Form2 part out of the picture ;)
Just imagine Form2 is infinitely transparent :)

Arbiter
May 11th, 2001, 07:29 AM
Ok Ked, if labels suck bigtime what would you use?

kedaman
May 11th, 2001, 07:30 AM
labels of course.

Btw, for what purpose?

plenderj
May 11th, 2001, 07:54 AM
Ill upload to members.fortunecity.com/plenderj
Its the latest craft. When you play, right click on a stationary craft and its the menu that appears.

kedaman
May 11th, 2001, 08:07 AM
right-click-menu-popup sucks in RTS games, isn't too good in TBS either

plenderj
May 11th, 2001, 09:38 AM
Download the game from http://members.fortunecity.com/plenderj
Its the "Latest Version" of Craft.
You'll see why I want to use it.

They used something like that in Frontier Elite.
And its not quite a popup. When they right click on something, a few labels appear on the right hand side of the screen with options.

It looks quite good actually.
Im starting to like craft ;)

kedaman
May 11th, 2001, 10:15 AM
Originally posted by plenderj
Download the game from http://members.fortunecity.com/plenderj
Its the "Latest Version" of Craft.
You'll see why I want to use it.

They used something like that in Frontier Elite.
And its not quite a popup. When they right click on something, a few labels appear on the right hand side of the screen with options.

It looks quite good actually.
Im starting to like craft ;)
i still haven't dl that crappy game, i guess i have to if you keep yelling at me like that. Yeah side menus options are much better than popupmenus, they don't get in the way. But i never use them, but hot keys (they should be shown in the menus).

plenderj
May 11th, 2001, 11:17 AM
Yeah go on download it or I'll set the fedaykin after ya !

kedaman
May 11th, 2001, 12:17 PM
hehe (and you call that a game?) i ran around for some time and then i found that other craft but i couldn't kill it. Only say "hello" to it.

Arbiter
May 12th, 2001, 04:53 AM
Ked,

You know, countless times you have impressed us with your intelligence and problem solving abilities. Many times, you've drifted into a thread, talked utter bollocks for a few minuts, solved the problem and then wandered out again, leaving us all dumbfound and not a little confused.

But you know what....

I don't think I've seen you actually create anything that does something. I mean, we've all got little projects and things, some of us even have big ones like Sentience or Craft. What have you ever made that people can associate with you?

I'm beginning to think you can't.

[conspiracy theory]

I reckon Kedaman's merely a prototype of a super advanced government AI program. Fantastic at solving problems that confuse us mere mortals but lacking the required attributes to create anything.

[/conspiracy theory]

Prove it otherwise.... ;)

kedaman
May 12th, 2001, 06:53 AM
what kind of thing are you looking for Arbiter? I gave you the most advanced set of type structured database system components, and you haven't even looked at them? Or maybe just said, "how does this thing work?" and then put it aside and continued on Sentience. Well it's my most recent project and the most advanced and wellstructured, took me 4 months, so i can't give you anything better.