playMaker

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Jos Yule

Pages: 1 2 [3]
31
Looking at the GUILayoutTextField.cs, it seems you are using the following method signature to call GUILayout.TextField() :


static function TextField (text : String, style : GUIStyle, params options : GUILayoutOption[]) : String

I'd suggest you use the following method signature:

static function TextField (text : String, maxLength : int, style : GUIStyle, params options : GUILayoutOption[]) : String

So, you can send the default maxLength value here, or actually use the value the user has selected.

ps. here is the link to the Unity docs about GUILayout.TextField() - http://unity3d.com/support/documentation/ScriptReference/GUILayout.TextField.html

pps. This is using Unity 3.5 and PM 1.3.3

32
PlayMaker Bug Reporting / Re: NEW Bug Report Tool
« on: May 11, 2012, 11:45:42 AM »
Getting a missing crossdomain.xml error when trying to use this form. Going to post the bug in the forum now.

33
Hello all.

I'm working on creating a localization/translation action/script(s).

I have something working - ie. i have a script which reads an XML file and i can then call GetText(id) on it to get different translations.

What i was then doing is setting a string variable (translated_text) via a new Set Translation action i created.

Again, this is all working peachy.

I was then using this variable to set the text on a GUI Button.

All good.

However, the issue starts if i have more then 1 GUI Button actions in 1 State, and i am setting the `translated_text` variable in-between those actions. In this case, because of the way OnGUI and the setting of the content to a new instance of GUIContent() in OnGUI (in the GUIContentAction class, parent to GUIButton), both buttons get the same name - the last value `translated_text` was set too.

If the text.Value was cached in a local var (or something), in a OnEnter or some other 1 time fired method, and then used in the OnGUI method, this would not happen.

I'm not sure if anyone takes advantage of the fact that you can change the name on a button dynamically the way it currently is. I just know that having to setup a different variable for each button name takes some of the niceness out of it.

I could also, i suppose, override the GUI Button action and make a GUI Translated Button, which would get the translated value itself.

Anyway, any suggestions or comments about this would be great!

Thanks
Jos

Pages: 1 2 [3]