PDA

View Full Version : External Windows Features


zokemon
04-13-2008, 11:35 AM
Here's a few features we should have added for the new client with external windows, if some aren't already added.

Displaying a Window on the Taskbar
It would be cool to have a showontaskbar variable for GuiWindowCtrl's that would display a taskbar button on Windows operating systems for GuiWindowCtrl's that have isexternal set. Double-clicking this button would call the function that is called when you click the minimize button as well as right clicking the button would show the usual right-click elements that you see when you right click on the taskbar button of another window for any given application. It would also show the equivalent for an open window on MacOS and Linux.

Displaying a Window in the System Tray
To go with the above item, a showontray variable that would the icon of the 16x16 TDrawingPanel object in an icon variable would also be nice. This icon could also be used for the taskbar buttons above.

Window Stack Priority
Having an alwaysontop variable would be very useful as well. This would display all external windows with that as true above any other Graal window regerdless of what has focus. Multiple windows with this as true would simply be given priority as normal in the window stack's position.

Making the Escape Window Scripted
The window that appears when you hit the escape key when the client is open should be changed to an external script GuiWindowCtrl.

Moving a Window
GuiWindowCtrl's should have an externalx and an externaly variable that would modify the position of the window's container when isexternal is true. They would would be initialized to (desktop's mousex - (gui width)/2) and (desktop's mousey - (gui height)/2) at the end of the new block when the gui is created if the two were not initialized already.

Desktop Variables
To go with the above one, it would help a lot then to be able to read the desktop's width and height, the desktop's mousex and mousey as well as the position and extent of the main Graal window relative to the desktop.

Allow Modifying of GUIContainer's Extent
A final thing to allow would be so that when one modifies GUIContainer.width and GUIContainer.height, it causes the main Graal window to reflect those changes and resize accordingly.

What This Would Allow
Having all of the above would allow a number of useful feature to be added such as:
The positioning and tiling of all of Graal's windows for scripted in-game editors, in-game windows such as IRC channels, radio station displays, etc.
The F2 window could be given alwaysontop priority so that it would not be placed under the client so that you could debug, read rpg messages, etc. This would also be useful for other similar scripted windows.
Docking of the Playerlist on the side of the graal window could be later scripted with fair ease if the Graal window's extent was modifiable and if you could read various desktop/graal container variables.
The escape key could be bound to do other things besides closing the client such as displaying an options screen for games on the Skills Games server.
The client rc would seem almost exactly like and operate almost exactly like the original external RC if you could display a button on the taskbar and an icon on the system tray
A bunch of other fun features that I could not think of. I'll probably post more reasons later.

Tell us all what you decide to add and when you have added it/them, Stefan! :p

Note: Funny thing is, I posted this on a Mac.

cbk1994
04-13-2008, 04:44 PM
Note: Funny thing is, I posted this on a Mac.

What? :confused:

The system tray, start menu, etc can't be done since it doesn't maintain compatibility with Mac and Linux, mainly Mac.

Also, fix canResize variable, atleast on Mac.

zokemon
04-13-2008, 06:33 PM
What? :confused:

The system tray, start menu, etc can't be done since it doesn't maintain compatibility with Mac and Linux, mainly Mac.

Also, fix canResize variable, atleast on Mac.

Sure it could. It would probably just display it in the icon list below when the window is minimized or so. Even if it doesn't replicate the functionality of windows, we still should have those features implemented so for the windows users, it isn't such a hard change to go to from the client-rc from the external one.

I said it was a funny thing because I use Windows but just happened to be posting this while on a Mac. I don't know, it just seemed ironic at the time.

cbk1994
04-13-2008, 07:02 PM
Sure it could. It would probably just display it in the icon list below when the window is minimized or so. Even if it doesn't replicate the functionality of windows, we still should have those features implemented so for the windows users, it isn't such a hard change to go to from the client-rc from the external one.

I said it was a funny thing because I use Windows but just happened to be posting this while on a Mac. I don't know, it just seemed ironic at the time.

Compatibility should be number one priority, there are a lot of Mac users who would play Graal if it was more compatible. I think Universal graal will help a lot, but still it needs to maintain compatibility.

Skyld
04-13-2008, 07:04 PM
Some of this functionality sounds like it could be paving the road to abuse, i.e. always on top, changing the Graal window container size. I am certain that I don't want other people to control these things.

Admins
04-13-2008, 07:27 PM
On Mac the separate windows are minimized to an own window in the Dock anyway :)
It's already possible to resize (I think) and go fullscreen, but only for authorized scripts.

zokemon
04-13-2008, 07:58 PM
Compatibility should be number one priority, there are a lot of Mac users who would play Graal if it was more compatible. I think Universal graal will help a lot, but still it needs to maintain compatibility.

Yes but Mac users don't have to change to the client-rc because there was no external rc for them beforehand. I don't see why it's so important to port an existing windows function over to an operating system that is not designed for such.

Some of this functionality sounds like it could be paving the road to abuse, i.e. always on top, changing the Graal window container size. I am certain that I don't want other people to control these things.

How could alwaysontop be abused? Only way I could think was if canclose was set to false but maybe require it set to true if alwaysontop is true? Also, other non-Graal windows still could be displayed over alwaysontop windows.

As for the container size, I suppose such a feature should be limited but I do think certain trusted servers could get this right.

cbk1994
04-13-2008, 09:20 PM
How could alwaysontop be abused? Only way I could think was if canclose was set to false but maybe require it set to true if alwaysontop is true? Also, other non-Graal windows still could be displayed over alwaysontop windows.

I guess if other windows could be on top, but you could have a loop constantly opening external windows with alwaysontop with some kind of offensive image etc.

zokemon
04-13-2008, 10:25 PM
That's what alt+f4 is for. Or right clicking on the main Graal window taskbar button and clicking close.

EDIT:
The hell, I got bad rep for saying "funny thing is I'm posting this on a Mac"? I was just pointing out the irony in my ignorance, and people are upset by that? Wow.

cbk1994
04-13-2008, 11:59 PM
The hell, I got bad rep for saying "funny thing is I'm posting this on a Mac"? I was just pointing out the irony in my ignorance, and people are upset by that? Wow.

You just had to say that?

Anytime Mac is mentioned and people get bad reputation, I get bad reputation from like 5 people saying "DONT REP THESE PEOPLE LOL".
:cry:

EDIT:

Stefan: Yes, resizing works, but canResize is not letting you disable it.

zokemon
04-14-2008, 12:13 AM
You just had to say that?

Anytime Mac is mentioned and people get bad reputation, I get bad reputation from like 5 people saying "DONT REP THESE PEOPLE LOL".
:cry:

EDIT:

Stefan: Yes, resizing works, but canResize is not letting you disable it.

I never said it was you but I would apprciate it if who ever did it to properly assess the situation before throwing negative rep out. It seems as though these forums are used more for negative rep then positive rep even though I rarely give out negative rep...

And also,
I was talking about resizing the main Graal window.

cbk1994
04-14-2008, 01:06 AM
I never said it was you but I would apprciate it if who ever did it to properly assess the situation before throwing negative rep out. It seems as though these forums are used more for negative rep then positive rep even though I rarely give out negative rep...

And also,
I was talking about resizing the main Graal window.

I know, I was just saying that I will get tons of negative rep for that, even though I did nothing. ;)

I know you were saying resizing Graal window -- I mentioned that canResize does not affect a window's behavior on Mac.

DustyPorViva
04-14-2008, 01:16 AM
Ya, I got neg rep calling me a jackass for getting into a debate about mac.

Anyways, alwaysontop would have to be looked into a lot to make sure it isn't abused. Someone could make a huge ass window and make it alwaysontop and cover up the whole screen. A big plus, like said, would be that they would have to have a close button on them, and the bar(close buttons and crap) can't be outside the screen.

cbk1994
04-14-2008, 01:34 AM
Ya, I got neg rep calling me a jackass for getting into a debate about mac.

Anyways, alwaysontop would have to be looked into a lot to make sure it isn't abused. Someone could make a huge ass window and make it alwaysontop and cover up the whole screen. A big plus, like said, would be that they would have to have a close button on them, and the bar(close buttons and crap) can't be outside the screen.

But you could have a timeout opening it if it is detected to be closed.

DustyPorViva
04-14-2008, 01:42 AM
In that case external windows themselves are a bad idea :P

cbk1994
04-14-2008, 01:46 AM
In that case external windows themselves are a bad idea :P

No, they just need good features to protect users from spam etc.

DustyPorViva
04-14-2008, 01:49 AM
Ya, but anyone can constantly create a simple external window in a timeout over and over--which will constantly pop up over things, or worse they can script it to create multiple external windows all over the place. And that's without even needing an alwaysontop.
What kind of feature will stop that? If you're gonna factor in all the dangerous crap people can do with GS2 then you have to consider alwaysontop isn't the only dangerous thing.

cbk1994
04-14-2008, 01:57 AM
Ya, but anyone can constantly create a simple external window in a timeout over and over--which will constantly pop up over things, or worse they can script it to create multiple external windows all over the place. And that's without even needing an alwaysontop.
What kind of feature will stop that? If you're gonna factor in all the dangerous crap people can do with GS2 then you have to consider alwaysontop isn't the only dangerous thing.

I know, I'm just saying that external windows aren't a bad idea, they just need certain features to protect the user.

It's not my job to decide what to do to prevent this, that's up to Stefan to figure out. I'm just saying that it is a very good idea.

DustyPorViva
04-14-2008, 01:59 AM
Well if he has external windows there are already problems with spamming introduced. Adding alwaysontop isn't going to introduce anything more potent than external windows themselves, so I'm all for it.

zokemon
04-15-2008, 04:50 AM
In all honesty, we really shouldn't worry about people pulling crap like this. If they do, you close your client, report it on the support center, don't go on that server anymore and the perpetrator(s) gets banned. Simple.

Crow
04-15-2008, 03:45 PM
In all honesty, we really shouldn't worry about people pulling crap like this. If they do, you close your client, report it on the support center, don't go on that server anymore and the perpetrator(s) gets banned. Simple.

Exactly. Thats the fun thing about this :D

zokemon
04-16-2008, 10:52 AM
I found getdesktopresolution() in scriptfunctions_client.txt but it seems to just return "0,0,0" for me.

Admins
04-16-2008, 12:55 PM
I found getdesktopresolution() in scriptfunctions_client.txt but it seems to just return "0,0,0" for me.

That's for open-gl mode only

Tolnaftate2004
04-16-2008, 07:50 PM
Ya, but anyone can constantly create a simple external window in a timeout over and over--which will constantly pop up over things, or worse they can script it to create multiple external windows all over the place. And that's without even needing an alwaysontop.

I'm looking forward to some intense Rick-Rolling. :D

cbk1994
04-17-2008, 06:38 AM
I know, I was just saying that I will get tons of negative rep for that, even though I did nothing. ;)

I know you were saying resizing Graal window -- I mentioned that canResize does not affect a window's behavior on Mac.

Man, now I got reputation on this post saying "Mac Sucks".

Was that even relevant?

zokemon
04-17-2008, 07:37 AM
Man, now I got reputation on this post saying "Mac Sucks".

Was that even relevant?

I got more negative rep from people miss-understanding me then positive rep from submitting things to the code gallery. My eval function got me all of like +2 rep points...

Admins
04-17-2008, 03:56 PM
It's easier to lose reputation than gain it ;)

Twinny
04-17-2008, 04:27 PM
It's easier to lose reputation than gain it ;)

So tempted to neg rep with, "so true! ^^" then >_<

cbk1994
04-17-2008, 11:13 PM
It's easier to lose reputation than gain it ;)

Then make positive reputation worth more than negative?

Would be cool if it was like positive rep only, no negative. That way people still get awarded for good things, and not punished by people who only notice bad things. Then just raise the standards for reputation.

zokemon
04-18-2008, 01:43 AM
Then make positive reputation worth more than negative?

Would be cool if it was like positive rep only, no negative. That way people still get awarded for good things, and not punished by people who only notice bad things. Then just raise the standards for reputation.

When you give negative rep, it only reduces their points by half of your rep power. Giving positive still gives your full rep power though.

cbk1994
04-18-2008, 06:46 AM
When you give negative rep, it only reduces their points by half of your rep power. Giving positive still gives your full rep power though.

That's good, people tend to rep more negative then positive.

Stefan, did you fix canResize?

DustyPorViva
04-18-2008, 07:07 AM
Let's not forget the only person who's gotten more than one bar is Crono :P
That seems kind of dumb, doesn't it?

zokemon
04-18-2008, 07:34 AM
I got very close but people knocked me down pretty far recently over stupid things.

DustyPorViva
04-18-2008, 07:42 AM
I'm close, but it seems people have stopped giving me pos rep and just got a neg rep recently.

cbk1994
04-18-2008, 08:26 AM
I've given both of you too much rep lately -- I must spread it around :(

zokemon
04-24-2008, 09:59 PM
Sooo, how are these features coming?

cbk1994
04-27-2008, 03:49 PM
Man, now I got reputation on this post saying "Mac Sucks".

Was that even relevant?

:rolleyes:

Not again ...

Robin
04-27-2008, 11:02 PM
Macs own your face. Mac owners can't help it if you're poor. Stop playing graal on your OLPC.

cbk1994
04-27-2008, 11:47 PM
Macs own your face. Mac owners can't help it if you're poor. Stop playing graal on your OLPC.

:rolleyes:

Not likely.

zokemon
04-28-2008, 05:31 AM
There should be reputation moderation :-/.

zokemon
06-24-2008, 11:36 PM
So... Anything? My scripted level editor sits in my closet as we speak :frown:.

zokemon
07-23-2008, 07:50 PM
La di da.

Clockwork
07-23-2008, 10:27 PM
Da di do