hey what about you can click trought "transparent GUI", if you import GUI picture that has some transparent parts or just text (label). You could make different shaped buttons. Well you can make lets say triangular shaped button, but when you click on it it still acts as it isÃ, rectangular..
brrr i hope you understand this :D
Edited by Gilbot:
The following discussions were originally part of this thread (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=19369.0), which now belong to this new thread splitted from the original.
I think currently GUI clicks only check for rectangular regions (for speed purpose probably), so if a button is not rectangular in shape (well with transparent pixels actually) the check is still over the whole rectangular region.
Since this is considered as a feature request, I don't think it's a good idea to post it in this thread.
...anyway, I'm not sure I'd like that. :P If I make a triangular button, I'd like checks to be made on it's surface only.
Well, it's always possible to script up such things yourself. finding if a point is insdie a triangle is very easy, if you have 3 directed lines, just make sure the point is always to the left or to the right. Or, you could make them different colours and use RawGetPixelAt(x, y)
A bit of a hassle for replicating a behaviour that makes a lot of sense and is already built in, no?
There's a RawGetPixelAt() function? Using a plugin?
Quote from: Gilbot V7000a on Tue 01/03/2005 01:30:13
There's a RawGetPixelAt() function? Using a plugin?
Oh... well in that case make it a SUGGESTION!
I swear that there was (at least) once a discussion about it, but I had tried the search function without luck, so I gave up... :P
As far as I remember ther're some small difficulties in implementing the GetPixelAt() function. One problem is, when the game's run in hi-res (640 x 4*0, 800 x 600), each room/screen engine coordinate pair actually corresponds to 2 x 2 = 4 actually displayed pixels. In that case what value should the function return ? The colour of the top-left pixel, or an average colour of all four pixels ? Moreover, the returned colour would be interpreted differently depending on whether the game is in indexed colour mode (256 colours, so it returns the index) or direct colour mode (15bit+). It may be possible if that function works on coordinates of actually displayed pixels, but then the game's scripter might need to take care of different settings, as you can't (shouldn't) prevent the players from running a hi-res game in low-res, or vice versa.
So, in my opinion, this feature is not as easily implemented as expected, and may need indepth discussion of how it should be done until a consistent solution is found.
By the way, as I wrote before, as these are more likely feature requests than bug reports, I'll split these posts. (Edit:done)
Quote from: Sektor 13 on Sun 27/02/2005 17:11:05
hey what about you can click trought "transparent GUI", if you import GUI picture that has some transparent parts or just text (label). You could make different shaped buttons. Well you can make lets say triangular shaped button, but when you click on it it still acts as it is rectangular..
If you have a transparent GUI with just a label on it or whatever, you can just un-check its Clickable setting for mouse clicks to go straight through it.
Allowing click-throughs of transparent areas of button graphics is an idea though, would other people find this useful?
You can make it selectable, something like CLICK TROUGH TRANSPERENT (yes/no), it should be usefull, if you want to make GUI like in HEXEN , but for adventure of course :D
QuoteAllowing click-throughs of transparent areas of button graphics is an idea though, would other people find this useful?
Like, if the player clicks on a transparent bit o' GUI it acts as though he clicked on what's underneath? I thought that was what was already happening. :P
No, so that's actually what this thread is about,
No, this is if you click on a transparent part of a GUI button. At the moment GUI buttons have a rectangular check, but the question is an option for the button not to be activated if you click on a transparent pixel of its image.
Tracker'd: http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=513
Actually I ran into this problem during a jam session with a buddy. We were trying to make a 'rhomboid' GUI, basically a square turned on its side. Its stylized, with an irregular border. Because of this it gets basically triangular transparent sections in the 'corners' where the game still detects that the mouse is over the GUI, but it really doesn't look as if it were.
I know how to process click-through into background, but I really would prefer if there was a way to 'pretend' that the GUI background transparency actually controlled its boundaries. Did that make any sense? Like a skin on a program, if there's nothing in an area, it shouldn't respond as if there is something.
BTW: I got it to work by ignoring the GUI itself and detecting if the mouse was over a GUI element instead. It works pretty nice now.
The ToaK GUI gave yOke some trouble, I drew the buttons as overlapping non rectangular shapes, not sure how he managed it, but I'm sure he'd have appreciated ths feature too.
Heh. You bet I would! :)
I had to tweak the squares to fit the best possible way. If you click around in ToaK GUI you will notice that clicking the edges of some buttons will not activate the button.
Sorry to bring this us again, but I'd like some help and thought it wasn't worth it starting a new thread...
I need a Return-to-Zork-style interface - you'll find out why later in the GIP forum. So far so good, but you'll remember that the interaction pop-up window is made of lozanges(sp?)...
Ã, Ã, /\
Ã, /Ã, \
Ã, /\Ã, /\
/Ã, \/Ã, \
\Ã, /\Ã, /
Ã, \/Ã, \/
Ã, \Ã, /
Ã, Ã, \/
As you can see, this is a more serious problem - the GUI buttons actually overlap, though the images, naturally, do not. I REALLY need the "click-through" feature, and said so in the tracker just now. In the meantime, is there a work-around?
Write a formula in the GUI's click function to determine button by X and Y mouse position?
Yikes. Considering the GUI has 4 different shapes depending on how many actions there are to be performed, and that even just hovering the mouse above the buttons will make a message appear... I think I'll keep it on hold until CJ can add this. Pity. CJ, if you're there, is there any chance of this coming out anytime soon (read=2.71)?
I mean, SSH, that would essentially mean making stuff life "if (mouse.x>gInterface+2 && mouse.x<gInterface+10) " for EVERY Y coordinate, right? If not - if I'm making it harder than it needs be, as I use to - please tell me.
EDIT - The tough part is, I'll ALSO need these buttons:
--------
|Ã, / |Ã, /
| /Ã, | /
|/Ã, Ã, |/
Ã, Ã, /|
Ã, / |
/Ã, Ã, |
----
...and the lower one is supposed to fit into the upper one... and this goes on in a grid of about 10x10 squares of dynamic dimensions.
Egad.
Quote from: Rui "Frank-N-Furter" Pires on Sat 16/04/2005 15:46:22
EDIT - The tough part is, I'll ALSO need these buttons:
--------
| / | /
| / | /
|/ |/
/|
/ |
/ |
----
...and the lower one is supposed to fit into the upper one... and this goes on in a grid of about 10x10 squares of dynamic dimensions.
Egad.
For example, if these 3 "sawteeth" are at screen locations 0, 190
x = mouse.x; y=mouse.y;
if ((y > 190) && (x < 200-y)) { /* sawtooth 1*/ }
if ((y > 190) && (x >= 200-y) && (x < 10)) { /*sawtooth 2*/ }
if ((y > 190) && (x >= 10) && (x < 210-y)) { /* sawtooth 3 */ }
Don't they teach algebra in schools these days?
Only took you 6 hours :)
I never had advanced math. :P Well, thanks anyway, but I'll just put the whole thing on hold until this oversight of AGS' is corrected (and an oversight it is, too).
Hey, I need 3d characters, but AGS doesn't support them.
I'm putting my game on hold until this oversight is corrected. :P
Look, I know what you mean, but,
1) 3d characters is an addition to the whole of the engine, in that it would be an immense overhaul, and click-through-in-trasparent-areas is only making the GUI buttons do what everything else already does;
2) it IS an oversight in the sense that, unlike many other features in AGS, it doesn't do exactly what is expected of it. When you activate pixel-perfect detection, you KNOW that every click will be taken at face vaule. It's only logical that this also happened with GUI buttons - so much so that, as you read the thread, you'll notice I even thought it was already in;
3) it's far too complicated for me, I know my limitations, plus the sheer amount of variability in the interface makes it very non-practical;
4) I don't want to invest a lot of time and energy to work around something that should be already in, and might one day (hopefully soon) be there. For instance, there's a lot of ugly now-unnecessary code in my LSL7 template which makes me cringe, and I sure wish I didn't have to resort to so many variables for getting the size of GUIs - something I can now do quite easily.
You were a wee bit on the extreem side there, Steve. ;)
Quote from: Rui "Frank-N-Furter" Pires on Sun 17/04/2005 21:29:39
4) I don't want to invest a lot of time and energy to work around something that should be already in, and might one day (hopefully soon) be there. For instance, there's a lot of ugly now-unnecessary code in my LSL7 template which makes me cringe, and I sure wish I didn't have to resort to so many variables for getting the size of GUIs - something I can now do quite easily.
but, but, that's the whole FUN of AGS programming!
I disagree. :) The whole fun of AGS programming is getting stuff done, and sometimes working around obscure situations. The only reason I don't invest serious time on this - based on the example you have kindly supplied, SSH - is because, as I said, this is really a bit of an oversight. IMO, at least. Nevertheless, MO or no MO, it IS a behaviour that makes sense and isn't in. Yet.
Look at it this way - if I didn't care how better AGS could get, I wouldn't even bother to point out little bugs. When I don't care about the software, I crop my wishes to the limitations. AGS has practically no limitations and has a great community and an outstanding designer behind it, which allows me to point out ESPECIALLY the "little things". I don't really care much about the "big" things, because I don't even know I need them until they're there (but that's just me), but the "little" things that can hinder you... yikes.
Jesus! Basic geometry and basic algebra. Did you go to highschool? Did you take any math classes there, at all? If so, you were once taught all you need to know to do these calculations. However, if the very idea of letters standing for numbers terrifies you, just ask someone here to do it for you.
That's not to say that it wouldn't be a good addition to AGS, but to let such a piddling limitation stop you?
I can see how this would be useful -- as strazer says, it's on the tracker and I will look into it for 2.71
Snarky - I don't know what's the American or Uk equivalent of this, but I had math for the 12 years I spent in "regular" school - I then spent 3 years in a profissional acting course which had only the merest glimmer of math. That said, I consider myself to be quite good at math, and overly enjpy it, even. Or rather - the calculationsÃ, and equations bit. I've always hated geometry, and I don't remember algebra at all. Letters stainding in for numbers is no problem - X, the variable, the incognito, the one that allows us to do a hundred and one miracles, is a thing I love. But, applied in a geometric problem in 2 very different GUIs, each with dynamic sizes (and one of which is actually 4 different GUIs), and said problem being one which is caused by an oversight (to use the "O" word again ::) )... well, let's just say it's not my idea of a good time.
CJ - Thankya! That's the reason we love ya!
EDIT - And, naturally, the OTHER reason I'll let this piddling limitation stop me is, I now have a reason to temporarily pause development enough to play some games which have been waiting for me. :=
/me even got a master degree on maths but he had lost all his understanding on basic geometry and algebra already...