1
NGUI 3 Support / Re: Retrieving Highlighted Text from NGUI UI input
« on: June 25, 2014, 10:49:13 AM »
[UPDATE]
I gonna have to side with ArenMook on this one theres really no easy way to make it work. What I'm trying to implement at this point (and I'm having some success with it) is using both an input field and a label to sort of mimic the desired effect. What that means is I'm drawing the input field's label behind the label such that both labels perfectly overlap and when the user goes to select or highlight, it looks as though they are interacting with the label. I can then use the indices of where they've highlighted in the input field's label to place the color tags in the label's text.
The label will process the bbcode tags and compress to the same size as the input field's label (as in the characters in the newly colored label will cover up the uncolored characters in the input field's label.) Very convoluted, and I don't have it working completely yet
I'll put code up and a more detailed walkthrough of dynamically editable and colorable text if I have any success making my code less brittle.
I gonna have to side with ArenMook on this one theres really no easy way to make it work. What I'm trying to implement at this point (and I'm having some success with it) is using both an input field and a label to sort of mimic the desired effect. What that means is I'm drawing the input field's label behind the label such that both labels perfectly overlap and when the user goes to select or highlight, it looks as though they are interacting with the label. I can then use the indices of where they've highlighted in the input field's label to place the color tags in the label's text.
The label will process the bbcode tags and compress to the same size as the input field's label (as in the characters in the newly colored label will cover up the uncolored characters in the input field's label.) Very convoluted, and I don't have it working completely yet
I'll put code up and a more detailed walkthrough of dynamically editable and colorable text if I have any success making my code less brittle.
