public void BuilderInWorldQuickBar() { BuilderInWorldTestHelper.CreateTestCatalogLocalSingleObject(); CatalogItem item = DataStore.i.builderInWorld.catalogItemDict.GetValues()[0]; CatalogItemAdapter adapter = BuilderInWorldTestHelper.CreateCatalogItemAdapter(gameObjectToUse); adapter.SetContent(item); CatalogAssetGroupAdapter groupAdatper = new CatalogAssetGroupAdapter(); groupAdatper.AddAdapter(adapter); CatalogGroupListView catalogGroupListView = new CatalogGroupListView(); catalogGroupListView.AddAdapter(groupAdatper); catalogGroupListView.generalCanvas = Utils.GetOrCreateComponent <Canvas>(gameObjectToUse); QuickBarView quickBarView = new QuickBarView(); quickBarView.catalogGroupListView = catalogGroupListView; QuickBarController quickBarController = new QuickBarController(quickBarView); int slots = quickBarController.GetSlotsCount(); quickBarView.shortcutsImgs = new QuickBarSlot[slots]; for (int i = 0; i < slots; i++) { quickBarView.SetIndexToDrop(i); adapter.AdapterStartDragging(null); quickBarView.SceneObjectDropped(null); Assert.AreEqual(item, quickBarController.QuickBarObjectSelected(i)); } }
public FavoritesController(CatalogGroupListView catalogGroupListView) { if (catalogGroupListView == null) { return; } catalogGroupListView.OnCatalogItemFavorite += ToggleFavoriteState; }
public FavoritesController(CatalogGroupListView catalogGroupListView) { catalogGroupListView.OnCatalogItemFavorite += ToggleFavoriteState; }
public FavoritesController(CatalogGroupListView catalogGroupListView) { catalogGroupListView.OnSceneObjectFavorite += ToggleFavoriteState; }