fixed some ui issues
This commit is contained in:
parent
f968ae7e70
commit
820181044f
2 changed files with 8 additions and 3 deletions
|
@ -38,7 +38,7 @@ namespace TouchyTickets {
|
|||
|
||||
this.Ui = new Ui(this.UiSystem);
|
||||
this.Camera = new Camera(this.GraphicsDevice) {
|
||||
Scale = 2,
|
||||
Scale = 4,
|
||||
AutoScaleWithScreen = true,
|
||||
AutoScaleReferenceSize = new Point(720, 1280),
|
||||
MaxScale = 24,
|
||||
|
|
|
@ -333,10 +333,15 @@ namespace TouchyTickets {
|
|||
PopulateUpgradeList(upgradeList);
|
||||
}
|
||||
});
|
||||
button.OnUpdated += (e, time) => {
|
||||
|
||||
void HideAndDisable() {
|
||||
button.IsHidden = upgrade.Dependencies.Any(u => !u.IsActive());
|
||||
button.IsDisabled = upgrade.IsActive() || GameImpl.Instance.Stars < upgrade.Price;
|
||||
};
|
||||
}
|
||||
|
||||
button.OnUpdated += (e, time) => HideAndDisable();
|
||||
HideAndDisable();
|
||||
|
||||
button.AddChild(new Paragraph(Anchor.TopCenter, 1, Localization.Get(upgrade.Name), true));
|
||||
button.AddChild(new Image(Anchor.CenterLeft, new Vector2(0.2F, 40), upgrade.Texture) {
|
||||
Padding = new Vector2(4)
|
||||
|
|
Loading…
Reference in a new issue