Closed kingj3144 closed 11 years ago
is anyone doing this? I'll do it...
Go ahead Jen. It is now assigned to you.
Not sure why putting the string from getSliderValue() for the CSS won't work when there's a letter in it. Any ideas...
It should work, are you adding the # for the hex value to the front?
The user can type in numbers into the textbox as well as letters (i,e, FF or 255). That is the only problem I can think of.
yeah currently typing the letters doesn't appear to work
I grabbed values from getSliderValue() instead of using color, but it doesn't show up whenever the value has a letter in it. This is for the background of the score. I have checked and it is getting the input correctly.
getSliderValue("Red") should return whatever the red slider value is, I have the current master commit running on my localhost and it alerts out correctly.
@ticketterminal that too. But the background color of score won't display when there is a letter for some reason.
Can you post the code you're using so we can help to debug it?
you can try getSliderValue("Red").toString() Also you should use console.debug("Message"); for debugging not alerts.
Literally one new line and just changed the var under scoreGame():
--> var userSubColor = getSliderValue(name1)+getSliderValue(name2)+getSliderValue(name3); addScore(Math.round(score), userSubColor);
I think the variable, for some reason, wants to take a number and gets mad if it's not.
That's very possible, and might be why I run into issues with getting NaN debug values occasionally when scoring
That is actually what I see when the score tries to score a hex with letters, but the inputs are strings, so IDK.
yeah it's a Not a Number return so I guess it is expecting a number for some reason
shouldn't the values be converted to rgb scale, ie 0-255 when the score is computed? Is it being input as the hex component instead? And if it is, we should have 6 basic variables, 3 for defining the hex codes to each red green and blue slider, and another three for the rgb scale values of the sliders.
It's scored using RGB values, as far as I'm award, but she's looking to pass the values in order to change the background color of an element accordingly, which uses the combined HEX values. The converting of the two is pretty easy, we weren't converting one of them in our original scoring method, which is what caused it to not work. We could possible send all three values through the function, in RGB decimal form, and then reconvert to change the color
Yes, what I'm doing is trivial and shouldn't need conversion, but for some reason... not working
ummm Ok. so I'm an idiot. Just realized the score won't show up because the scoring is still buggy, not because it won't take the hex input.
maybe we can meet in class ( if he gives us time ) and we can all work on the scoring bug
Oops sorry, accidentally clicked closed.
Yes, we should meet in/out of class.
Just pushed changes for this.
Commit Message: "display percentages and changed layout for scores. changed scoring to absolute values"
The scoreboard currently shows the score with the background of the color from that round, it should be the color the user submitted from that round. We should also display the percent error for each color value.