Talk:Kirby GUI/@comment-16153947-20140808024635/@comment-5106053-20140808032636

I'm close, but I haven't had alot of time to work on it, I've been reshingling my roof. I just have to figure out how I'm making the different controls output values, for the circle pads, they have 4 outputs: As for buttons I'm not sure yet, because buttons can be optionally bound to a button on the DS, in which case they're output is the BTN variable, but if they're not bound, then I was thinking doing the same thing that PTC does with BUTTON, where each button corresponds to a different bit in a variable(I was thinking CTL); however, that would limit the number of buttons you can have to 18, unless I use the fractional bits of the variable, in which case it would be 31(which would be just enough); however, that would get quite complex to use, as I don't think the AND command works with fractions, so it would have to be bit-shifted to use.
 * X-Axis [-1,1]
 * Y-Axis [-1,1]
 * Distance [0,1]
 * Angle [-π,π]

Another thing I could do is use 2 CTL variables, but having them separated might not be very convenient.

Or I could have each button output to an element in an array as an boolean, which would be easy to use, Ex: IF CTL[0] THEN... IF CTL[2] THEN... IF!CTL[6] THEN... but that would be very memory inefficient, as 1 bit is being used out of each 4 bytes.

Or I could have it output to a string and use each character for 8 buttons, but that would also be memory inefficient, as there is a max 31 bits(4 bytes) being used out of 256 bytes.

So I'm a little unsure what to do, maybe I'll ask Random and see what he thinks would be a good way to go.