public void ConstructViewModel() { var model = new ScreenPlayerInventoryModel(playerInventory.model.maxInventoryContainAmount); model.cashAmount = playerInventory.GetCashAmount(); view.ApplyModel(model); }
public void ApplyModel(iComponentModel data) { model = data as ScreenPlayerInventoryModel; localScrollList.ApplyModel(model.localInventoryScroll); placeButton.SetStyle(placeButtonStyle); placeButton.Create(new IconButtonModel(ScreenPlayerInventorySignals.placeButtonClicked)); }
public void ConstructViewModel() { var model = new ScreenPlayerInventoryModel(playerInventory.model.maxInventoryContainAmount); model.cashAmount = playerInventory.GetCashAmount(); for (int i = 0; i < playerInventory.model.itemCollection.Count; i++) { model.localInventoryScroll.gridItems.Add(new ItemContainerModel() { item = playerInventory.model.itemCollection[i] }); } view.ApplyModel(model); }
public void ApplyModel(iComponentModel data) { model = data as ScreenPlayerInventoryModel; textField.SetText(model.cashAmount.ToString()); textField.SetTextStyle(headerCashTxtStyle); }