Skip to content
Snippets Groups Projects
Commit 69b8a01b authored by John Schihada's avatar John Schihada
Browse files

Made hint-buttons visible/invisible when available or not

parent ac4544ad
No related branches found
No related tags found
No related merge requests found
......@@ -257,6 +257,76 @@ PrefabInstance:
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1430730640409366961, guid: 0f75dbd3f5b33b040948ba58d3b90cb0,
type: 3}
propertyPath: defaultColor.r
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1430730640409366961, guid: 0f75dbd3f5b33b040948ba58d3b90cb0,
type: 3}
propertyPath: defaultColor.g
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1430730640409366961, guid: 0f75dbd3f5b33b040948ba58d3b90cb0,
type: 3}
propertyPath: defaultColor.b
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1430730640409366961, guid: 0f75dbd3f5b33b040948ba58d3b90cb0,
type: 3}
propertyPath: defaultColor.a
value: 0.5294118
objectReference: {fileID: 0}
- target: {fileID: 1430730640409366961, guid: 0f75dbd3f5b33b040948ba58d3b90cb0,
type: 3}
propertyPath: highlightColor.r
value: 0.9529412
objectReference: {fileID: 0}
- target: {fileID: 1430730640409366961, guid: 0f75dbd3f5b33b040948ba58d3b90cb0,
type: 3}
propertyPath: highlightColor.g
value: 0.5137255
objectReference: {fileID: 0}
- target: {fileID: 1430730640409366961, guid: 0f75dbd3f5b33b040948ba58d3b90cb0,
type: 3}
propertyPath: highlightColor.b
value: 0.07058824
objectReference: {fileID: 0}
- target: {fileID: 1430730640409366961, guid: 0f75dbd3f5b33b040948ba58d3b90cb0,
type: 3}
propertyPath: defaultHintButtonColor.r
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1430730640409366961, guid: 0f75dbd3f5b33b040948ba58d3b90cb0,
type: 3}
propertyPath: defaultHintButtonColor.g
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1430730640409366961, guid: 0f75dbd3f5b33b040948ba58d3b90cb0,
type: 3}
propertyPath: defaultHintButtonColor.b
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1430730640409366961, guid: 0f75dbd3f5b33b040948ba58d3b90cb0,
type: 3}
propertyPath: defaultHintButtonColor.a
value: 0.5294118
objectReference: {fileID: 0}
- target: {fileID: 1430730640409366961, guid: 0f75dbd3f5b33b040948ba58d3b90cb0,
type: 3}
propertyPath: availableHintButtonColor.r
value: 0.9529412
objectReference: {fileID: 0}
- target: {fileID: 1430730640409366961, guid: 0f75dbd3f5b33b040948ba58d3b90cb0,
type: 3}
propertyPath: availableHintButtonColor.g
value: 0.5137255
objectReference: {fileID: 0}
- target: {fileID: 1430730640409366961, guid: 0f75dbd3f5b33b040948ba58d3b90cb0,
type: 3}
propertyPath: availableHintButtonColor.b
value: 0.07058824
objectReference: {fileID: 0}
- target: {fileID: 1686984722580339795, guid: 0f75dbd3f5b33b040948ba58d3b90cb0,
type: 3}
propertyPath: m_fontSize
......@@ -282,6 +352,16 @@ PrefabInstance:
propertyPath: m_margin.y
value: -5.0954895
objectReference: {fileID: 0}
- target: {fileID: 5738028260646118123, guid: 0f75dbd3f5b33b040948ba58d3b90cb0,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6338961308496269799, guid: 0f75dbd3f5b33b040948ba58d3b90cb0,
type: 3}
propertyPath: m_Interactable
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7669725544194832573, guid: 0f75dbd3f5b33b040948ba58d3b90cb0,
type: 3}
propertyPath: m_AnchoredPosition.y
......
......@@ -11,9 +11,6 @@ public class RenderedScrollFact : MonoBehaviour
private string _label;
public string factUri;
private Color defaultColor = new Color(255,255,255,135);
private Color highlightColor = new Color(255,0,0,135);
public GameObject ScrollParameterObject;
public string Label
......@@ -37,17 +34,14 @@ public void OnClickHintButton() {
}
public void OnHintAvailable(List<string> uris) {
UnityEngine.UI.Button button = ScrollParameterObject.GetComponentInChildren<UnityEngine.UI.Button>();
UnityEngine.UI.ColorBlock buttonColor = button.colors;
GameObject hintButton = ScrollParameterObject.transform.GetChild(2).gameObject;
if (uris.Contains(factUri))
{
buttonColor.normalColor = highlightColor;
button.colors = buttonColor;
hintButton.SetActive(true);
}
else {
buttonColor.normalColor = defaultColor;
button.colors = buttonColor;
hintButton.SetActive(false);
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment