Whats Your Gui Look like?

User avatar
Vadi
Posts: 4940
Joined: Sat Mar 14, 2009 3:13 pm

Re: Whats Your Gui Look like?

Post by Vadi »

Quite nice, once again

Glass
Posts: 16
Joined: Mon Jun 28, 2010 10:00 pm

Re: Whats Your Gui Look like?

Post by Glass »

Hi Vadi! Sorry we didn't collaborate over that graphic thing.

Life intervened in a big way, also for some reason the password for my old forum account isn't what I remember it being. :(

User avatar
Vadi
Posts: 4940
Joined: Sat Mar 14, 2009 3:13 pm

Re: Whats Your Gui Look like?

Post by Vadi »

I'm still up for it actually. Didn't find a better artist to do it yet. Just get an IM account that works :roll:

Naito
Posts: 18
Joined: Thu Aug 12, 2010 1:36 pm

Re: Whats Your Gui Look like?

Post by Naito »

I'm trying to work on my GUI and currently I'm using 'Labels' for my Affliction tracker(Which is slower then a MiniConsole)

I was wondering what the code would look like for making a MiniConsole that can have text added and removed to it when needed. Like if I was afflicted with 'Aeon' it would show up on the miniconsole then when it's cured it would be removed from the console... but I need it to be able to have more then one text on the MiniConsole at once and be able to take off selective Text each time...

Iocun
Posts: 174
Joined: Wed Dec 02, 2009 1:45 am

Re: Whats Your Gui Look like?

Post by Iocun »

Naito wrote:I'm trying to work on my GUI and currently I'm using 'Labels' for my Affliction tracker(Which is slower then a MiniConsole)

I was wondering what the code would look like for making a MiniConsole that can have text added and removed to it when needed. Like if I was afflicted with 'Aeon' it would show up on the miniconsole then when it's cured it would be removed from the console... but I need it to be able to have more then one text on the MiniConsole at once and be able to take off selective Text each time...
Ok, first you need to set up the miniconsole. I tend to set up all of my gui elements in an init() function that is called only a single time, when I connect to the Mud:
Code: [show] | [select all] lua
function init()
	winX, winY = getMainWindowSize()
	createMiniConsole("aff_display", winX-200, 20, 180, 300)
	setBackgroundColor("aff_display", 150, 150, 150, 255)
	setMiniConsoleFontSize( "aff_display", 10 )
	setFgColor("aff_display", 0, 0, 0)
	setBgColor("aff_display", 150, 150, 150)
end

init()
Then you need a function to refresh the window:
Code: [show] | [select all] lua
function refreshAffs()
	clearWindow("aff_display")
	echo("aff_display","\nAfflictions:\n\n")
	for k,v in pairs(afflictions) do
		echo("aff_display", k.."\n")
	end
end
This expects you to have a table called afflictions, which contains all your current afflictions in the form:
afflictions = {stupidity=true, paralysis=true, clumsiness=true, recklessness=true}

If you save your afflictions in a different matter, you'll have to adapt this somewhat.

Now you merely need to call refreshAffs() whenever you are afflicted or have cured something, i.e. whenever you make any change to the table "afflictions".

User avatar
Omni
Posts: 131
Joined: Fri Feb 12, 2010 10:26 am

Re: Whats Your Gui Look like?

Post by Omni »

Unfinished, but I still love it
Unfinished, but I still love it

User avatar
Vadi
Posts: 4940
Joined: Sat Mar 14, 2009 3:13 pm

Re: Whats Your Gui Look like?

Post by Vadi »


User avatar
Calixa
Posts: 25
Joined: Sat Nov 20, 2010 5:51 pm
Location: Lusternia

Re: Whats Your Gui Look like?

Post by Calixa »

Tried downloading that multiple times now Vadi, but keep getting a corrupted file.

User avatar
Vadi
Posts: 4940
Joined: Sat Mar 14, 2009 3:13 pm

Re: Whats Your Gui Look like?

Post by Vadi »

Fixed the link. Best viewed with VLC on windows.

Yetzederixx
Posts: 186
Joined: Sun Nov 14, 2010 5:57 am

Re: Whats Your Gui Look like?

Post by Yetzederixx »

I just started to work with console windows, so here's the start of my GUI (well the prompt is actually a cecho) which was initially a method to reduce clutter as there was at least 10 prompts in there I really don't care about seeing all the time.

Image

Post Reply