Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible Attract-Mode BUG: Listbox not fade correctly. #459

Closed
ghost opened this issue Jul 18, 2018 · 5 comments
Closed

Possible Attract-Mode BUG: Listbox not fade correctly. #459

ghost opened this issue Jul 18, 2018 · 5 comments

Comments

@ghost
Copy link

ghost commented Jul 18, 2018

I use this code to fade a listbox after 3.5 seconds:

local flx = fe.layout.width;
local fly = fe.layout.height;
local flw = fe.layout.width;
local flh = fe.layout.height;

// Listbox
if(my_config["wheel_type"] == "listbox")
{
	::OBJECTS <- {lbx = fe.add_listbox(flx*0.76, fly*0.33, flw*0.20, flh*0.64)}
	OBJECTS.lbx.rows = 21;
	OBJECTS.lbx.charsize = 24;
	OBJECTS.lbx.align = Align.Centre;
	OBJECTS.lbx.selbg_alpha = 0;
	OBJECTS.lbx.set_selbg_rgb(255,255,255);
	OBJECTS.lbx.set_rgb(0,0,0);
	OBJECTS.lbx.set_sel_rgb(255,255,255);

	// Fade Listbox
	local move_lbx1 = { when = Transition.ToNewSelection, property = "alpha", start = 0, end = 255, time = 1}  
	local move_lbx2 = { when = When.ToNewSelection, property = "alpha", start = 255, end = 0, time = 2500, delay = 3500}  
	animation.add(PropertyAnimation(OBJECTS.lbx, move_lbx1));
	animation.add(PropertyAnimation(OBJECTS.lbx, move_lbx2));	
}

But it does not fade correctly.

The rest of the listbox fades correctly, but the selected field in the listbox remains visible.

It seems totally an Attract-Mode bug.

Does anyone know why this happens?

Is there any solution?

@oomek
Copy link
Collaborator

oomek commented Jul 21, 2018

You are right, it seems it's a bug in the AM 2.4.0. The properties ListBox.sel_alpha, ListBox.selbg_alpha and functions ListBox.set_sel_rgb(), ListBox.set_selbg_rgb() update only on Transition.ToNewList. they do not update from tick() and other transitions.

@ghost
Copy link
Author

ghost commented Jul 21, 2018

And there is no solution at the moment? Can not you think of anything?

@oomek
Copy link
Collaborator

oomek commented Jul 21, 2018

62c2a6e#diff-8f27264b8acedbb428a1b6ab211bf664R177

62c2a6e#diff-8f27264b8acedbb428a1b6ab211bf664R194

@mickelson Would you take a look at this bug please. I wouldn't like to mess with your commits.

@mickelson
Copy link
Owner

yes I will look

mickelson added a commit that referenced this issue Jul 21, 2018
- 62c2a6e
  exposed this bug which was caused by some sloppy coding double setting the variables
  that track selection text colours
@mickelson
Copy link
Owner

Ok found the problem, it should be fixed now

@ghost ghost mentioned this issue Aug 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants