Hey guys,
I'm really new to this whole scaleform stuff. I try to setup a menu for our game but at the moment I'm stuck at the scrolling list component.
For some tests and for a better understanding I built a really simple flashfile with just a scrolling list in it. I built one file for each AS version. The AS2 list works fine and showed all expected items, but in the AS3 file my scrolling list remains blank.
This is the uc code I used for both lists:
and the code from the ScaleformMenu.ini file:Code:class MyMenu extends GFxMoviePlayer config(ScaleformMenu); struct Option { var string OptionName; var string OptionLabel; var string OptionDesc; }; var config array<Option> ListOptions; var GFxClikWidget ScrollingList; event bool WidgetInitialized(name WidgetName, name WidgetPath, GFxObject Widget) { switch(WidgetName) { case ('sl'): // this assumes your Scrolling List has an instance name of 'sl' in Flash. ScrollingList = GFxClikWidget(Widget); SetUpDataProvider(ScrollingList); break; default: break; } return true; } function SetUpDataProvider(GFxClikWidget Widget) { local byte i; local GFxObject DataProvider; local GFxObject TempObj; DataProvider = CreateArray(); switch(Widget) { case (ScrollingList): for (i = 0; i < ListOptions.Length; i++) { TempObj = CreateObject("Object"); TempObj.SetString("name", ListOptions[i].OptionName); TempObj.SetString("label", ListOptions[i].OptionLabel); // this will be displayed in the list TempObj.SetString("desc", ListOptions[i].OptionDesc); DataProvider.SetElementObject(i, TempObj); } Widget.SetFloat("rowCount", ListOptions.Length); // you must specify the row count of scrolling lists manually break; default: break; } Widget.SetObject("dataProvider", DataProvider); } defaultproperties { WidgetBindings.Add((WidgetName="sl",WidgetClass=class'GFxClikWidget')) // this assumes your Scrolling List has an instance name of 'sl' in Flash. }
My two flashfiles are really simple - two layers. One for the actionscript with just "stop();" in it and one layer with the content (just a scrolling list).Code:[Configuration] BasedOn=..\Engine\Config\BaseUI.ini [UTGame.MyMenu] +ListOptions=(OptionName="Option 1",OptionLabel="Tame",OptionDesc="Easy") +ListOptions=(OptionName="Option 2",OptionLabel="Wild",OptionDesc="Medium") +ListOptions=(OptionName="Option 3",OptionLabel="Crazy",OptionDesc="Hard") +ListOptions=(OptionName="Option 4",OptionLabel="Insane",OptionDesc="Very hard")
I use the newest udk version.
Here two pictures with the problem:
I definitely miss something. Hopefully one of you can help me out with this. I'm getting crazy...![]()





Reply With Quote

Bookmarks