Author Topic: [Implemented] GUI extra graphics for selected device  (Read 71469 times)

0 Members and 1 Guest are viewing this topic.

Blackosx

  • Forum Moderator
  • Posts: 1150
[Implemented] GUI extra graphics for selected device
« on: June 06, 2010, 06:31:51 PM »
This idea adds the capability for the Chameleon GUI to show an alternative image for each device when highlighted/selected. This gives more options and allows for more adventurous theme design. So for this to work the code needs to be amended and extra graphic files are required.

I had this idea last year and applied it to Chameleon v2 RC3 r658 then presented it to Zef which, after discussion, led to the shelving of this project. The reason for that was because RC3 (and RC4) require a theme to be embedded, and the extra graphics meant the compiled binary would take the booter near the maximum size limit of 392704 bytes which was deemed unnecessary.

However, since Asere freed the bootloader from a mandatory embedded theme and hence RC5 can also run without an embedded theme I am re-visiting the idea..


Outline of operation.
The theme selected for use, pointed to by the 'theme' boot option, will have the following extra files:
device_generic_o.png
device_hfsplus_o.png
device_ext3_o.png
device_fat16_o.png
device_fat32_o.png
device_ntfs_o.png
device_cdrom_o.png

• Chameleon loads the graphics in to an array.
• The GUI draws the normal/original graphic in the theme for the device.
• To show the selected device, it draws the next graphic in the array, which in this case is the extra graphic in place of the original graphic.
• If the user selects a different device, the code draws the original device graphic back, then draws the highlighted graphic for the newly selected device.

The code requires all extra graphics to be present for loading and therefore won't work with current themes unless they have the extra graphic files added. The code has since been changed to allow full compatibility with existing themes.


Example
Using a new theme I have yet to release, here is how the GUI will show the default devices.



Then when selected, the devices will be replaced with the extra '_o' graphics (here I show them all at once, but you would only see one at a time).




Code Changes
The changes required affect the following files
i386/boot2/gui.c
i386/boot2/gui.h
i386/boot2/options.c


Conclusion
I think this functionality could improve the look of Chameleon without too much trouble and I hope it might be considered for further evaluation and possibly inclusion in to RC5. I also understand that this code doesn't include any error checking and is only something I have put together using my limit knowledge of coding. But it works and I am personally using it now against a build for RC5 r168 on the boot and cdboot files.


Themes for use with this mod
I now have a branch on the repo and all the changes have been applied there for anyone to look at. The code has also been tweaked to allow it to work as normal with existing themes as well as the newer rollover themes.

I have now added four complete themes for use with this mod:
http://forum.voodooprojects.org/index.php/topic,1432.msg7318.html#msg7318
http://forum.voodooprojects.org/index.php/topic,1432.msg7327.html#msg7327
http://forum.voodooprojects.org/index.php/topic,1432.msg7413.html#msg7413
http://forum.voodooprojects.org/index.php/topic,1432.msg7427.html#msg7427

Update: 15th July
I found a problem with the normal device image still being drawn with the rollover image. Problem fixed and v2 boot file made. See this post for more details.

The modified boot file for testing these themes is attached below.
Note: this is a pre-release version of Chameleon RC5 and is subject to change.

Update: 26th July
This idea has now been implemented in to the trunk of the forthcoming RC5. Many thanks to Zef & Meklort for writing the revised code necessary to make this happen and thanks also to Azimuth & Smith@@ for their testing and feedback. ;D
« Last Edit: July 26, 2010, 10:45:46 AM by Blackosx »
10.10.5 / 10.11 GM1 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

THe KiNG

  • Observer
  • Posts: 10
Re: GUI extra graphics for selected device
« Reply #1 on: June 07, 2010, 05:59:22 PM »
Nice job!
I really like that theme, any chance to upload all stuff?

Blackosx

  • Forum Moderator
  • Posts: 1150
Re: GUI extra graphics for selected device
« Reply #2 on: June 07, 2010, 11:29:00 PM »
Good to hear you like it, Thanks :)
I have attached the modified boot file and the theme I have been using for this test to the first post.
Note: The theme is still a work in progress and is designed for 1680x1050 but it's should be easy enough to resize.

EDIT: The first post now links to two complete themes for this mod.
« Last Edit: July 14, 2010, 05:34:51 PM by Blackosx »
10.10.5 / 10.11 GM1 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

Gringo Vermelho

  • Forum Moderator
  • Posts: 611
  • The gray monster energy hat
Re: GUI extra graphics for selected device
« Reply #3 on: June 08, 2010, 02:29:57 AM »
Right on. I can't wait to see all the cool new themes that will pop up because of this.

My crystal ball says that you will have your hands full when people try to use the animated themes on older versions of Chameleon.  ::)
10.9.5 - ASUS P8Z77-V Pro - i5 3570K - GTX 660 - Chameleon 2.3 svn-r2xxx
How to...
Install Chameleon: http://forum.voodooprojects.org/index.php/topic,649
Make your own Chameleon boot CD: http://forum.voodooprojects.org/index.php/topic,484.msg2131.html#msg2131

Blackosx

  • Forum Moderator
  • Posts: 1150
Re: GUI extra graphics for selected device
« Reply #4 on: June 08, 2010, 08:01:10 AM »
Yeah. I hope so  :P ... But let's wait and see, as it's still an idea and hasn't been approved yet so I don't know if it will become part of the any future release.
10.10.5 / 10.11 GM1 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

zef

  • Administrator
  • Posts: 265
Re: GUI extra graphics for selected device
« Reply #5 on: June 11, 2010, 11:55:58 AM »
Yeah. I hope so  :P ... But let's wait and see, as it's still an idea and hasn't been approved yet so I don't know if it will become part of the any future release.

Going to take a look at this in the upcoming days :)
ASUS P8Z68-V PRO/GEN3 | i5-2500k | 16GB RAM | GTX560 | Keyboard | Mouse | Devilsound DAC

Blackosx

  • Forum Moderator
  • Posts: 1150
Re: GUI extra graphics for selected device
« Reply #6 on: June 11, 2010, 04:17:06 PM »
Great. I look forward to hearing your thoughts Zef  ;D
10.10.5 / 10.11 GM1 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

scrax

  • Member
  • Posts: 61
Re: GUI extra graphics for selected device
« Reply #7 on: June 13, 2010, 02:45:58 PM »
Tested and working good, but i can't have 1920x1080x32 resolution even if edit the bacground.png and info.plist of the theme.
But it's the same in no GUI mode so I'm thinking it's a Chameleon limitation maybe.

Blackosx

  • Forum Moderator
  • Posts: 1150
Re: GUI extra graphics for selected device
« Reply #8 on: June 18, 2010, 02:53:59 PM »
Thanks for testing scrax.

...but i can't have 1920x1080x32 resolution even if edit the bacground.png and info.plist of the theme.
Just to confirm... is that just with this modified boot file or with Chameleon in general?
« Last Edit: June 18, 2010, 02:56:35 PM by Blackosx »
10.10.5 / 10.11 GM1 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

valv

  • VoodooLabs
  • Posts: 72
    • The AnVAL Forum (fr)
Re: GUI extra graphics for selected device
« Reply #9 on: June 18, 2010, 05:28:02 PM »
Just to confirm... is that just with this modified boot file or with Chameleon in general?
It can happen with external monitors and graphic card not doing its job at the time of booting. 1920x1080x32 is what am using/getting (at boot time) on my internal screen with Graphics Mode key into boot.plist.
Greetz

Blackosx

  • Forum Moderator
  • Posts: 1150
Re: GUI extra graphics for selected device
« Reply #10 on: June 18, 2010, 05:52:32 PM »
Hi valv, thanks.
I am aware than some systems can't use different resolutions in Chameleon's GUI. I just wanted to make sure it was nothing to do with the changes I've made with this mod.
« Last Edit: June 18, 2010, 05:54:48 PM by Blackosx »
10.10.5 / 10.11 GM1 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

scrax

  • Member
  • Posts: 61
Re: GUI extra graphics for selected device
« Reply #11 on: June 20, 2010, 03:39:09 AM »
Thanks for testing scrax.

...but i can't have 1920x1080x32 resolution even if edit the bacground.png and info.plist of the theme.
Just to confirm... is that just with this modified boot file or with Chameleon in general?

I'm not sure, but now from another setup, same monitor and anval bootloader it is 1920x1080x32.
Your mod was tested on an IntegrateGraficCard GF9300 and if I don't remember wrong also standard chameleon can't go tat that resolution.
After more test I could be more detailed
All the two configuration have DSDT GFX inj, and Grafic mode set in c.a.B.p

Azimutz

  • VoodooLabs
  • Posts: 420
  • Paranoid Android
Re: GUI extra graphics for selected device
« Reply #12 on: June 20, 2010, 06:24:43 PM »
Hey Blackosx,

tested this code and all seems fine; i don't see any reason why this shouldn't make it's way to Chameleon.
Theme is to big so, i resized it to 1440X900 using your guide; no problems there besides the font.
The only real problem is that, as it is the old "themes" don't work, because the booter looks for the "_o" png's...
i just duplicated the png's and gave the booter some "_o" images to look for :) pretty sure this can be tweaked on the code.

By the way, nice work on the themes ;D
 System & Patches: http://goo.gl/i961
 Chameleon:
- trunk builds: http://goo.gl/9G1Hq
- pref pane: http://goo.gl/OL2UT

Blackosx

  • Forum Moderator
  • Posts: 1150
Re: GUI extra graphics for selected device
« Reply #13 on: June 21, 2010, 08:33:25 AM »
I'm not sure, but now from another setup, same monitor and anval bootloader it is 1920x1080x32.
Your mod was tested on an IntegrateGraficCard GF9300 and if I don't remember wrong also standard chameleon can't go tat that resolution.
As this mod was added to build r168 from the trunk it wouldn't be accurate to compare it against a different branch. So if the standard r168 build from the trunk behaves the same way then I know it's nothing to do with the mod. Thanks Scrax :)
10.10.5 / 10.11 GM1 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

Blackosx

  • Forum Moderator
  • Posts: 1150
Re: GUI extra graphics for selected device
« Reply #14 on: June 21, 2010, 08:38:09 AM »
tested this code and all seems fine; i don't see any reason why this shouldn't make it's way to Chameleon.
....
The only real problem is that, as it is the old "themes" don't work, because the booter looks for the "_o" png's...
Hi Azimutz

Thanks for testing it and reporting it works for you. And thanks for the kind words :)

And yes the issue with older themes not working with it is something that may hold this back from inclusion to RC5, unless of course the code for this mod was re-worked to support both the older themes and the additional _o.pngs.  But unfortunately for me, my coding skills aren't that great and this serves more as a demonstration to show what I had in mind.
« Last Edit: June 21, 2010, 08:41:56 AM by Blackosx »
10.10.5 / 10.11 GM1 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB