Page 4 of 6

Re: Creating a desktop environment style GUI

Posted: Fri Feb 25, 2011 8:01 am
by Heiko
1. You have to replace your greedy quantifier with a lazy one in your regex pattern otherwise your pattern will match everything until the second closing send tag.

2. Order of creation of labels = Z order -> simply create the moon label after the frame that currently hides it.

Re: Creating a desktop environment style GUI

Posted: Fri Feb 25, 2011 8:28 am
by Heiko
KaVir wrote:
Heiko wrote:2. Your GUI should either be shipped with Mudlet directly or downloaded automatically when the player connects to your MUD for the first time or both e.g. ship the main GUI and download the avatars or other files & graphics on demand.
I hadn't realised that was an option, but it would certainly make things much easier for the players. I include a lot of graphics, so I don't think it would be appropriate to ship everything with Mudlet, and I'd rather not have the files downloaded directly from within mud.

Would it be possible for Mudlet to download and extract a specific file from a website, if the mud provided the URL? Sort of like:

Server: IAC DO ATCP
Client: IAC WILL ATCP
Server: IAC SB ATCP "Client.GUI <version> \n <path and filename>"

Then the client could pop up a window on login informing the user that this mud offers a custom GUI, and asking if they want to install it (with a "don't ask again for this mud" checkbox). If they've already installed it but have an older version number, then they could be asked if they wish to update.

I'd suggest automatically creating a folder for each mud, perhaps using its profile name, so that muds don't accidently (or intentionally) write over each other's files. It may also be worth having some sort of certification to reduce the risk of malicious scripts being distributed - perhaps even allow mud owners to submit their GUI files to a Mudlet repository, where it can be checked for anything dodgy, and allow the client to download directly from there.

Should sound files be distributed as part of the GUI, or separately? Not many of my players seem to use sound, but it's still quite a nice option to offer, particularly when targeting first-time mudders who are used to playing games with both graphics and sound.
I have to see if Qt offers cross platform support for unpacking zip files. Other than that, downloading files from http or ftp servers is no problem.
Server: IAC SB ATCP "Client.GUI <version> \n <path and filename>"
Looks fine.

Re: Creating a desktop environment style GUI

Posted: Fri Feb 25, 2011 5:03 pm
by Vadi
KaVir wrote:And...on an unrelated note, see the moon above the maps? Is there any easy way to make it rise and set behind the frame of the map, without redrawing the frame (which then requires redrawing the map)?
Just thought about this. Wouldn't the problem go away if you created the moon label before the map label but after the background one? It should slide in fine then.

Re: Creating a desktop environment style GUI

Posted: Fri Feb 25, 2011 5:09 pm
by Vadi
Heiko wrote:I have to see if Qt offers cross platform support for unpacking zip files. Other than that, downloading files from http or ftp servers is no problem.
There is http://doc.trolltech.com/latest/qbytear ... #qCompress, but I'm not sure on the portability of that.

Other than that, this library (which was last updated 2010 and seems popular in downloads) seems like a good choice to make use of: http://sourceforge.net/projects/quazip/ ... z/download

(there is also a pure Lua unzip only implementation: http://lua-users.org/wiki/ModuleCompressDeflateLua)

Re: Creating a desktop environment style GUI

Posted: Sat Feb 26, 2011 12:08 am
by KaVir
The moon icon now correctly rises and sets behind the map, thanks.

I changed to a lazy quantifier, and it now works properly for the first link, but the second now isn't parsed at all.

Code: Select all

\t<send>(.+?)</send>
Image

Presumably I need to change the code to have it check for multiple links on the same line? I also noticed it's still making text after the link clickable, the same as before. Problem is I'm not really sure what I'm doing with the triggers, I'm just sort of fumbling around.

Re: Creating a desktop environment style GUI

Posted: Sat Feb 26, 2011 12:26 am
by Vadi
Right, so enable the 'match all' option. Further matches will be all stored in the matches[].

also, try:
Heiko wrote:First you have to apply the color and other format to the selection before replacing it. Then it should work alright.

Re: Creating a desktop environment style GUI

Posted: Sat Feb 26, 2011 8:59 am
by Heiko
Without the match all trigger option pattern matching stops after the first match. If match all is enabled all matches for a given line are stored in matches[] for single state triggers and multimatches[][] for multi state triggers before the script is being run.

Thus, you can select all matches of a line for a given capture group cg with:
selectCaptureGroup(1+cg) to selectCaptureGroup(n+cg)

Re: Creating a desktop environment style GUI

Posted: Tue Mar 15, 2011 2:19 am
by Vadi
We fixed that issue like so.

I also added an image folder locator - in case where the images/ folder shouldn't be moved to the muldet binary installation location. To update for this,

a) search & replace "images/ with gw2_path.."
b) create this script in the MSDP folder before all others that has this script: http://pastebin.com/0BNEx0Mb. It'll try the default images/ path, if not found, ask where is the folder. Remebers this, so on a restart it'll "just work"; if the folder is moved, it'll ask you again and such.

There is further improvement needed - UI creation elements should be hooked to sysWindowResizeEvent to resize/remove when the window dimensions are changed, but I'm too tired for that for now.

Re: Creating a desktop environment style GUI

Posted: Mon May 30, 2011 6:38 pm
by Vadi
Mudlet can now download packages from the server & install them - see http://forums.mudlet.org/viewtopic.php?f=7&t=2242 (will be more polished in the future days though)

Re: Creating a desktop environment style GUI

Posted: Fri Jun 17, 2011 12:46 pm
by Vadi
Hey, some feedback on the UI - I think you should increase the bottom border size, it looks better.

setMainWindowSize seems to do it's job for forcing Mudlet into a resolution, but it does not prevent maximizing the window - once maximized, the CPU usage spikes up until minimized. I suppose it'd be nice to have a function that provided it (http://doc.qt.nokia.com/4.7/qt.html#WindowType-enum, - CustomizeWindowHint, not adding WindowMaximizeButtonHint should do it)