public void OnButtonPress(TileButton button) { ResetButtons(); button.Image.color = selectedColor; selected = button; shipDesigner.CurrentTileID = selected.tileID; }
private void OnEnable() { foreach (BasePart variant in tileSet.TileVariants) { if (variant == null || !variant.showInPartSelector) { continue; } TabButton tab = tabGroup.AddTab(variant.category); TileButton button = tab.AddTile(variant.previewImg, this); button.tileID = variant.partID; buttons.Add(button); button.Image.color = defaultColor; } }
public void OnButtonExit(TileButton button) { button.Image.color = selected != button ? defaultColor : selectedColor; }
public void OnButtonEnter(TileButton button) { button.Image.color = hoverColor; }