PDA

View Full Version : Moving Old UI over to use GFx issues



John J
09-11-2010, 09:05 PM
I am in the process of converting a main game UI that uses the old UE3 system over to use GFx, but I know very little about Actionscript and am muddling through figuring out how AS and UScript interact.

My main issue at the moment is getting my Lists to read in the datastores I have set up. This worked pretty well the old way with this:


function InitDataStores()
{
local DataStoreClient DSClient;
local int Idx;


DSClient = class'UIInteraction'.static.GetDataStoreClient();

if (DSClient == none)
return;

WeaponsDataStore = GBOUIDataStore_Weapons(DSClient.FindDataStore(clas s'GBOUIDataStore_Weapons'.default.Tag));

if (WeaponsDataStore != None)
return;
else
WeaponsDataStore = DSClient.CreateDataStore(class'GBOUIDataStore_Weap ons');

if (WeaponsDataStore != None)
DSClient.RegisterDataStore(WeaponsDataStore);

MenuItemDataStore = UTUIDataStore_MenuItems(DSClient.FindDataStore('UT MenuItems'));
MenuItemDataStore.GetProviderSet('WeaponName', WeaponProvider);

if(WeaponProvider.Length == 0)
return;


for(Idx=0; Idx<WeaponProvider.length; Idx++)
{

if (GBOUIDataProvider_Weapons(WeaponProvider[Idx]).WeaponType == "AR")
WeaponsDataStore.AddStr('AvailableWeapon', GBOUIDataProvider_Weapons(WeaponProvider[Idx]).FriendlyName, false);
}

}

The threads that asked something similar previously here didn't seem to get an answer so I'm trying. How the heck do I attach the datastore to a GFx list?

-John

Doublezer0
09-12-2010, 11:45 AM
I have yet to see a tutorial for this or any documentation. I asked about this back in May but was advised the datastore would not be used with scaleform and would be deprecated eventually. i dont know if tis was true as its nearly 4 months later and I see no change. There are GFX Datastore functions but I have not used them yet as I get all my data from the configs where necessary and write back to the config. In an early menu i made I created the flash equivalent of a datastore which was nice for error checking before writing to configs but really quite unecessary. I would like to know how to use unreal datastores however. Any news on its scaleform status would be a great help.

John J
09-12-2010, 04:43 PM
I hadn't heard that datastores themselves would be depreciated, just the old UI system for creating.

Maybe I don't need to use them though..... All I am doing in the old system is reading in map/weapon names along with any corresponding info(a icon image, description text etc..) then updating various UI components like lists, labels and images based on what is read in. I guess the datastore is what keeps everything associated, but is there a good way to just do it by reading in straight from the config files?

GeekyPayback
09-12-2010, 06:22 PM
Yeah, Datastores are still in there. Infact the scaleform stuff uses datastores to get stuff into the GFx so I don't think they are disappearing. Take a look at any UpdateListDataProvider() function. That will show you how you get stuff out of a datastore and into the scaleform environment.

I've already got it working for some of my stuff :)