project-navigation
Personal tools

Author Topic: Request: GUI Blending  (Read 4075 times)

Offline RaXaR

  • Rookie
  • ***
  • Posts: 70
    • View Profile
Request: GUI Blending
« on: June 22, 2007, 01:42:01 pm »
Hi guys, I know I've been going on and on about transparency/alpha blending for the GUI, but I only realized a while ago that I haven't actually given any example of how I think the menus/GUI should be implemented. So here's a picture and explanation of what I had in mind (keep in mind this is just an opinion).



Here is what I think the menu definition in the .ufo scripts should be like:


Code: [Select]

// ==================
// MAIN MENU
// ==================

    ..........

// ==================
// buttons
// ==================

// SINGLEPLAYER
pic button_singleplayer
{
click { cmd "mn_push singleplayer" }
pos "640 170"
image  menu/button_big
texl "0 0"
texh "256 64"
mousefx true
out { *string_singleplayer color "0 0.5 0 1" *button_singleplayer texl "0 0"  *button_singleplayer texh "256 64" }
in { *string_singleplayer color "1 1 1 1" *button_singleplayer texl "0 64" *button_singleplayer texh "256 128" }
//  ##### now here is one suggestion: #####
blend "Alpha" // None, Alpha, Add, Multiply, Invert etc.
opacity "1" // Master opacity level of this element/button
}
string string_singleplayer
{
font f_menubig
color "0 0.5 0 1" // For some reason the alpha percentage (4th number) gets lost when the item is redisplayed or moused over
string "_Single-player"
pos "768 202"
align cc
}

    .......




I split the "Background Image" and the "Menu Background" because of the faint possibility of animation at a later stage.  Since all Buttons etc would be child objects of the "Menu Background" , they would inherit all the positional changes of their parent.

I hope that this clarifies what I was hoping for, Laters :)

Offline bayo

  • Professional loser
  • Project Coder
  • Captain
  • ***
  • Posts: 733
    • View Profile
Re: Request: GUI Blending
« Reply #1 on: September 26, 2008, 03:48:42 pm »
My godness, its look incrediblly nice.

Is there a plan to use it into the game?

Offline blondandy

  • Sergeant
  • *****
  • Posts: 391
    • View Profile
Re: Request: GUI Blending
« Reply #2 on: September 28, 2008, 11:26:18 am »
there are plans to improve the look. though progress is slow.

raxar has not been seen in a while, so this particular contribution is unliikely to feature.

Offline BTAxis

  • Administrator
  • PHALANX Commander
  • *******
  • Posts: 2607
    • View Profile
Re: Request: GUI Blending
« Reply #3 on: September 28, 2008, 11:28:01 am »
Which is a pity.