[Logo]
 
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Working on V7: Death, taxes and the UTUIComboBox  XML
Forum Index -> UT3 RPG
Author Message
BattleMode

Rampage
[Avatar]

Joined: 11/14/2007 01:35:49
Messages: 126
Offline

I wanted to replace my ugly "how do I leave the UI Scene crap ASAP" NEXT and PREV solution with a much nicer and user friendlier Combo Box.

After a very long night (I think I spend a total of over 16 hours on this one) I finally got it working.

The first challenge was to get the combo box on my menu. That was a few hours of UT3 Editor fun, I want to forget about ASAP. As usual I copied things to the clipboard, did the real work in notepad, and pasted them back. There seem to be all kinds of things in the editor for this as well, but I am not even close to figuring out how that works.

The second challenge was to learn everything I didn't want to know about UT3 DataStores. I learned a lot about this from the "DataStore Problems (aka, I want to kill something)" thread another happy UT3 UI developer posted on the Epic forums: http://utforums.epicgames.com/showthread.php?t=593380. I based my solution on the UTUIDataStore_StringList, which once you learn how they work, are quite usable actually. It's code, I like code, I hate the UT3 Editor.

The third challenge was to capture the event a combo box fires if the value is changed. To make a very long story a bit shorter: I gave up on that. Whatever I tried, it didn't work.

The fourth challenge was to get some timer working with polled the value of my nice combobox. Of course UTUIScene don't do timers or tick, so I tried calling a pseudo timer from the PlayerController instead. After wasting a zilion debug log's on this I finally figured out that if you locate the UTUIScene from the PlayerController you somehow get the wrong object. Even though I never create the UTUIScene (UT3 does that for you) I somehow got two of them and of course the nice function in UT3 to locate them returned the wrong one.

Finally I figured it out. In the DrawPanel event of the panels on the UTUIScene I can access both the right PlayerController and the right UTUIScene at the same time. This allows me to give them both a reference to each other. Using these references a timer in the PlayerController can now poll the value of my nice combobox.

Yeah I know, there must be a better solution for this. But I am very happy I got it working at all.
Szlat

Wicked Sick!

Joined: 05/18/2005 18:32:41
Messages: 2124
Location: UK
Offline

11/10 for perseverance
 
Forum Index -> UT3 RPG
Go to: