Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Truly skinnable GUI for allegro released

This thread is locked; no one can reply to it. rss feed Print
 1   2   3   4 
Truly skinnable GUI for allegro released
Specter Phoenix
Member #1,425
July 2001
avatar

Spellcaster: Yeah I started thinking about GUI and the menus and thought of adding full pictures of my characters beside the text in the menus or maybe even behind the text (still debating but I didn't know if it could be done or not). Thanks again;D.

"Can't a man even talk to himself without being interrupted?" -Krull(1983)
"Through vengence I was born. Through war I was trained. Through love I was found. Through death I was released. Through release I was given a purpose." -- Specter Phoenix
"Programming == AWESOME the rest is just tools to accomplish it."
END OF LINE

Bob
Free Market Evangelist
September 2000
avatar

Quote:

Hm... as I said, that code can switch "themes" dynamically.

So can AGUP. In fact, the example program does just that...

--
- Bob
[ -- All my signature links are 404 -- ]

Thomas Fjellstrom
Member #476
June 2000
avatar

Hey, bob, can AGUP add a theme at runtime? I belive this lex_gui can.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Bob
Free Market Evangelist
September 2000
avatar

Thomas: I don't see why not. Better ask Peter to be sure.

--
- Bob
[ -- All my signature links are 404 -- ]

Thomas Fjellstrom
Member #476
June 2000
avatar

hmmm... I thought with AGUP you had to compile in extra functions for each theme, but with this lexgui it has themes like KDE etc...

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Peter Wang
Member #23
April 2000

That's why I thought it would be cool to merge lexgui and AGUP, so you could have the AGUP static themes (faster), and also the lexgui "dynamic" themes (flexibler). But spellcaster doesn't want to, so that's that. There's not much point anyway, except the coolness factor. If someone wants to switch between lexgui and AGUP in one app, they can write their own wrappers.

spellcaster
Member #1,493
September 2001
avatar

Ok, new version is out:

Fixed a bug in the slider skin loading code
Added 2 new themes (bill32 and yellow)
Added better doublebuffering support
Allowed for dynamic skin switching
Added global background color attribute to the dialog skin
Added title text alignment attribute
Added title text color attribute

Works like a charm now, IMHO. All reported problems should now be fixed. The new demo allows to dynamically switch between Yellow (a beos like theme), bill32 (guess what) and the aqua theme.
Creating new skins is really fun and... so, if you want some new skins, make some suggestions :)

If you refresh your browser, you should be able to see the Themes in the screenshot above. If you're too lazy, here's the new screenshot with a new name: [url http://www.steinke.net/allegro/screenshot2.jpg]

Download the new version here:
Get it here: [url http://www.steinke.net/allegro/]

Quote:

That's why I thought it would be cool to merge lexgui and AGUP, so you could have the AGUP static themes (faster), and also the lexgui "dynamic" themes (flexibler). But spellcaster doesn't want to, so that's that

Peter: It's not that I'm against merging AGUP with my code. It's just that I don't want to do it :)
If you want to merge them, that's absolutely fine for me.

--
There are no stupid questions, but there are a lot of inquisitive idiots.

SystemDown
Member #663
September 2000
avatar

Great work! The new theme looks great too. I've been too lazy to do my own GUI stuff for a project I have planned, but now I think it's all taken care of :D

---
BEER: It's not just for breakfast anymore.

Thomas Fjellstrom
Member #476
June 2000
avatar

hmmm.. kind of odd.. I changed the mode to GFX_AUTODETECT and compiled with:

gcc *.c -o gui `allegro-config --libs`

but for some reason, the test just sits and does nothing... It works Ok in windowed mode. Ah.. Just tried with the XDGA2 driver.. Now I don't think its your problem so ignore the above ;)

but I do have another skin suggestion ;) a LCD like theme.

{"name":"skin.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/0\/3\/03b5c6bcfc5a258cbd55ac3a8ac25c90.png","w":531,"h":398,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/0\/3\/03b5c6bcfc5a258cbd55ac3a8ac25c90"}skin.png

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

spellcaster
Member #1,493
September 2001
avatar

heh, now that's a cool theme.
It will also force me to do more flexible dialog headers, which is something I've been considering anyway.
Something like this will be in the next release, promised.

If something doens't work as expected please let me know. I want the 0.95 release to be feature complete and "stable", so I can fix the remaining bugs for the 1.0 release in a couple of months.

So, keep the suggestions coming....

--
There are no stupid questions, but there are a lot of inquisitive idiots.

gnudutch
Member #951
February 2001
avatar

Thomas: XINE USERS UNITE!!! It's a great feeling playing proprietary Windows movies by utilizing the Windows .dll files themselves. Sweet justice!

spell: Aww you changed the pretty screenshot... :'(

Thomas Fjellstrom
Member #476
June 2000
avatar

ooohhh... I've been playing with DLG ;) It now works with lexgui :) muahaha.

Now I just have to figure out where to stick the 'lex_gui_shutdown' function (cause when ESC is pressed to exit the dlg 'demo' mode, it crashes). And its cool I don't have to replace the do_dialog proc, cause it may be flickering, but its much faster than double buffering when using a windowed mode...

you should make a makefile and turn the lexgui.c file into a static lib. (much easier that way for people to play with it.)

gnu: I'm dumb!. I wish I cared enough to not do such a hackish job of cropping that image... But The GIMP sucks so badly... :( hmmm...

Anyone know of a GOOD __SIMPLE__ paint program for linux?? (kpaint and xpaint arn't even as good as mspaint...)

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Specter Phoenix
Member #1,425
July 2001
avatar

I'm just waiting for news on the menus ;D. Then I'll start using it:).

"Can't a man even talk to himself without being interrupted?" -Krull(1983)
"Through vengence I was born. Through war I was trained. Through love I was found. Through death I was released. Through release I was given a purpose." -- Specter Phoenix
"Programming == AWESOME the rest is just tools to accomplish it."
END OF LINE

Richard Phipps
Member #1,632
November 2001
avatar

proportional fonts are a must for a modern gui system. Will your LEX system be able to support them spellcaster?

The basic 8x8 non-proportional font looks far too tired now!

Good work!
Rich.

Thomas Fjellstrom
Member #476
June 2000
avatar

I guess it all depends on taste, I find it much easier to read a fixed-width font than one that isn't.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Richard Phipps
Member #1,632
November 2001
avatar

I suppose some people will prefer the non-proportional fonts.

But if support for proportional fonts were added then the code for non-proportional fonts can be kept in and used as an option too. :D

Thomas Fjellstrom
Member #476
June 2000
avatar

I doubt that it doesn't support proportional fonts... With the regular allegro GUI I've used proportional fonts. Its no big deal, you just have to correctly se the size of all the items that contain text.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Richard Phipps
Member #1,632
November 2001
avatar

Hmmm..

ok! That sounds great! I'd love to see some more advanced gui screenshots (i.e. like winamp skins) using all these features..

How about it? If people make their own skins the best ones could be distributed with the library?

Rich.

spellcaster
Member #1,493
September 2001
avatar

Quote:

proportional fonts are a must for a modern gui system. Will your LEX system be able to support them spellcaster?

It will use whatever is set as "font". If you load a new, proportional font, it will use that.

I was also playing (just playing) with the idea of supporting true antialiased fonts.

Quote:

I'm just waiting for news on the menus

They will be in the next release.

Quote:

ooohhh... I've been playing with DLG It now works with lexgui muahaha.

Have you sent the changes to the author of DLG? Or could you post them here (or in a new thread maybe) so we others can use it also?

Quote:

Now I just have to figure out where to stick the 'lex_gui_shutdown' function (cause when ESC is pressed to exit the dlg 'demo' mode, it crashes).

It will be called automatically if you switch skins, bu should be called manually before you exit the program.
I'll download DLG and have a look at it.

--
There are no stupid questions, but there are a lot of inquisitive idiots.

gnudutch
Member #951
February 2001
avatar

GIMP is very quirky, it's hard to get used to the way it does things. But everything really is in there, you just have to find it! I've been using it for a year, and I'm only proficient at it now.

If Adobe sold Photoshop for Linux I'd buy three copies. But they don't so I have to GIMP it. :-/

Thomas Fjellstrom
Member #476
June 2000
avatar

hmmm.. So how do I get a line command like in ms-paint, or have a pen/pencil tool that only puts down ONE pixel?? most of the buttons on the main gimp window are useless, even the clone tool doesn't do anything if you use the current image as the source... (Im talking basic stuff, no layers.. etc..

[edit]Have you sent the changes to the author of DLG? Or could you post them here (or in a new thread maybe) so we others can use it also?[/edit]

Its a bit hackish right now cause lexgui doesn't have a makefile, and cause of the crash problem I mentioned before, but to integrate lexgui into DLG all you have to do is copy on of the other plugins and put the lexgui functions in the 'proc' list.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Peter Wang
Member #23
April 2000

Use the pencil or brush and plonk the first point, then hold shift and plonk the rest of the points in your line. For a single pixel pen/brush, you pick the brush size (duh ;), e.g. double clicking on circle thing on the bottom right of the main dialog, to bring up the brush selection dialog.

spellcaster: Ok, maybe some day. I've got too much on my plate already.

gnudutch
Member #951
February 2001
avatar

1 pixel draw: Choose pencil tool, and the smallest brush (Circle 01 1x1)

Line: Using pencil or any other tool, click the starting point, hold shift, click the ending point.

Like I say, it's in there, just gotta find it.

[edit] PETER WANG YOU ARE SCARING ME!!!

Thomas Fjellstrom
Member #476
June 2000
avatar

I know about the crappy line thing, I said one like ms-paint :) where it holds your hand by showing where the line would be if you dropped it. um sory, my GIMP has no circle thing at the bottom right, and neither does the one with the newest Mandrake. And I just did an upgrade on debian (unstable), so it should be up to date... But since Im using debian... They still haven't released KDE3... They say they are waiting till X4.2 is out... Oh.. wait.. It is. UGGHHSSAAAA... Sheesh it takes them forever to package stuff... considering that the newest GIMP in the debian package archives is 1.0.1...

[edit] compiling newest 'stable' gimp...

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

gnudutch
Member #951
February 2001
avatar

Thomas, be chill.

Click this to bring up the brush dialog. I currently have the 1 pixel brush selected.

http://woz.gs/tim/pix/brush.jpeg

When drawing lines with the shift key you do get a preview.

 1   2   3   4 


Go to: