Infrastructure and Production
Added the ability to directly install blueprints onto hardpoints in the colony tab Added the ability to customize production of factories This stuff is still kinda buggy
This commit is contained in:
parent
a99b4e82f3
commit
4eb83acb34
32 changed files with 2525 additions and 399 deletions
|
|
@ -8,7 +8,7 @@ using UnityEngine.UI;
|
|||
|
||||
public class FlatFlatButton : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, IPointerClickHandler
|
||||
{
|
||||
public event Action OnClick;
|
||||
public event Action<PointerEventData> OnClick;
|
||||
public float StateDamping;
|
||||
// public RectTransform Tab;
|
||||
public Image Fill;
|
||||
|
|
@ -19,6 +19,7 @@ public class FlatFlatButton : MonoBehaviour, IPointerEnterHandler, IPointerExitH
|
|||
public Color SelectedColor;
|
||||
public Color HoverColor;
|
||||
public Color ClickColor;
|
||||
public Color DisabledColor;
|
||||
|
||||
public void OnPointerEnter(PointerEventData eventData)
|
||||
{
|
||||
|
|
@ -34,12 +35,12 @@ public class FlatFlatButton : MonoBehaviour, IPointerEnterHandler, IPointerExitH
|
|||
|
||||
public void OnPointerClick(PointerEventData eventData)
|
||||
{
|
||||
if (!DisableClickWhenSelected || CurrentState != FlatButtonState.Selected)
|
||||
if (CurrentState != FlatButtonState.Disabled && (!DisableClickWhenSelected || CurrentState != FlatButtonState.Selected))
|
||||
{
|
||||
if (OnClick != null)
|
||||
{
|
||||
Fill.color = ClickColor;
|
||||
OnClick();
|
||||
OnClick(eventData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -58,6 +59,9 @@ public class FlatFlatButton : MonoBehaviour, IPointerEnterHandler, IPointerExitH
|
|||
case FlatButtonState.Hover:
|
||||
appearance = HoverColor;
|
||||
break;
|
||||
case FlatButtonState.Disabled:
|
||||
appearance = DisabledColor;
|
||||
break;
|
||||
default:
|
||||
appearance = Color.white;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue