public void ApplyModel(iComponentModel data) { model = data as ScreenPlayerInventoryModel; localScrollList.ApplyModel(model.localInventoryScroll); placeButton.SetStyle(placeButtonStyle); placeButton.Create(new IconButtonModel(ScreenPlayerInventorySignals.placeButtonClicked)); }
public void ApplyModel(iComponentModel data) { currentNPC = playerManager.NPCLookingAt(); model = data as ScreenNPCInteractionModel; nameText.SetText(model.name); IconStateButtonModel[] startModelList = new IconStateButtonModel[] { new IconStateButtonModel(ScreenNPCInteractionSignals.removeRouteStart, startButtonStyles[0]), new IconStateButtonModel(ScreenNPCInteractionSignals.setRouteStart, startButtonStyles[1]) }; startButton.Create(startModelList); startButton.ForceState(Convert.ToInt32(model.routeDestination != null)); IconStateButtonModel[] destinationModelList = new IconStateButtonModel[] { new IconStateButtonModel(ScreenNPCInteractionSignals.removeRouteDestination, destinationButtonStyles[1]), new IconStateButtonModel(ScreenNPCInteractionSignals.setRouteDestination, destinationButtonStyles[0]) }; destinationButton.Create(destinationModelList); destinationButton.ForceState(Convert.ToInt32(model.routeDestination != null)); IconStateButtonModel[] toggleModelList = new IconStateButtonModel[] { new IconStateButtonModel(ScreenNPCInteractionSignals.pauseRoutes, toggleStateButtonStyles[1]), new IconStateButtonModel(ScreenNPCInteractionSignals.runRoutes, toggleStateButtonStyles[0]) }; toggleStateButton.Create(toggleModelList); toggleStateButton.ForceState(Convert.ToInt32(currentNPC.routeManager.running)); }
public void ApplyModel(iComponentModel data) { model = data as ScreenMarketModel; localScrollList.ApplyModel(model.localInventoryScroll); shopScrollList.ApplyModel(model.shopInventoryScroll); UpdateModel(); }
public void ApplyModel(iComponentModel data) { model = (ItemContainerModel)data; textField.SetText(model.item.name.ToString());//todo: replace with amount when introduced textField.SetTextStyle(textStyle); image.sprite = model.item.img; selectedOverlay.SetActive(model.selected); }
public void ApplyModel(iComponentModel data) { Reset(); model = (ScrollListModel)data; if (model != null && model.gridItems != null) { for (int i = 0; i < model.gridItems.Count; i++) { var item = Container.Resolve <ItemContainer>(); item.ApplyModel(model.gridItems[i]); item.transform.SetParent(gridContentHolder, false); gridItems.Add(item); } } GenerateGrid(); }
public void ApplyModel(iComponentModel data) { model = data as ScreenInventoryTransferModel; localScrollList.ApplyModel(model.localInventoryScroll); if (model.remoteInventoryType == ObjectInventoryTypes.Type.Scroll) { remoteSubmodule = remoteScrollList; } else if (model.remoteInventoryType == ObjectInventoryTypes.Type.Two) { remoteSubmodule = screenMachineProcessor; } remoteSubmodule.ApplyModel(model.remoteInventory as iComponentModel); var monoSubmodule = remoteSubmodule as MonoBehaviour; monoSubmodule.gameObject.SetActive(true); }
public void ApplyModel(iComponentModel data) { Reset(); model = (ScreenMachineProcessorModel)data; if (model != null) { if (model.inputItem != null) { var itemContainerInput = Container.Resolve <ItemContainer>(); itemContainerInput.ApplyModel(model.inputItem); inputItem = itemContainerInput.transform; inputItem.SetParent(inputContainer, false); } if (model.outputItem != null) { var itemContainerOutput = Container.Resolve <ItemContainer>(); itemContainerOutput.ApplyModel(model.outputItem); outputItem = itemContainerOutput.transform; outputItem.SetParent(outputContainer, false); } } }
public void ApplyModel(iComponentModel data) { model = data as ScreenPlayerInventoryModel; textField.SetText(model.cashAmount.ToString()); textField.SetTextStyle(headerCashTxtStyle); }
public void ApplyModel(iComponentModel data) { model = data as ScreenSubmenuTabsModel; }