Skip to content
Snippets Groups Projects
Commit f0e3abd1 authored by BenniHome's avatar BenniHome
Browse files

tidy up a bit, only scroll details-UI left

parent 56d675bf
No related branches found
No related tags found
No related merge requests found
fileFormatVersion: 2
guid: b543d9677cbde534ab69c0a229bfdb06
guid: eec83b50c1e0c604aa91430f72c8dbb0
folderAsset: yes
DefaultImporter:
externalObjects: {}
......
......@@ -9,6 +9,7 @@ public class DisplayScrolls : MonoBehaviour
{
public Scroll[] scrolls;
public GameObject ScrollPrefab;
public GameObject DetailScreen;
......@@ -68,7 +69,10 @@ void Start()
var obj = Instantiate(ScrollPrefab, Vector3.zero, Quaternion.identity, transform);
obj.GetComponent<RectTransform>().localPosition = GetPosition(i);
obj.GetComponent<ScrollClickedScript>().scroll = this.scrolls[i];
obj.GetComponent<ScrollClickedScript>().DetailScreen = this.DetailScreen;
obj.transform.GetChild(0).gameObject.GetComponent<TextMeshProUGUI>().text = this.scrolls[i].label;
}
}
}
......@@ -5,8 +5,9 @@
public class ScrollClickedScript: MonoBehaviour
{
public Scroll scroll;
public GameObject DetailScreen;
public void onClick() {
Debug.Log("clicked");
this.DetailScreen.GetComponent<ScrollDetails>().setScroll(this.scroll);
}
}
fileFormatVersion: 2
guid: 11ddd9731d735dd47b5581d7f335747e
guid: 67d16c96068129c4c8631966f2166bd8
MonoImporter:
externalObjects: {}
serializedVersion: 2
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ScrollDetails : MonoBehaviour
{
public Scroll scroll;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public void setScroll(Scroll s) {
this.scroll = s;
Debug.Log(s);
}
}
fileFormatVersion: 2
guid: 92f58ba8e8c7bf243bfde7e6656c9064
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
......@@ -84,7 +84,7 @@ MonoBehaviour:
m_GameObject: {fileID: 3173330253721512196}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 11ddd9731d735dd47b5581d7f335747e, type: 3}
m_Script: {fileID: 11500000, guid: 67d16c96068129c4c8631966f2166bd8, type: 3}
m_Name:
m_EditorClassIdentifier:
scroll:
......@@ -121,6 +121,17 @@ MonoBehaviour:
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
- m_Target: {fileID: 0}
m_MethodName:
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName:
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
delegates: []
--- !u!1 &5809183911047187526
GameObject:
......
......@@ -357,7 +357,6 @@ GameObject:
- component: {fileID: 1410316395273548762}
- component: {fileID: 1410316395273548756}
- component: {fileID: 1410316395273548763}
- component: {fileID: 6773615017864739433}
m_Layer: 5
m_Name: ScrollPrefab
m_TagString: Untagged
......@@ -422,18 +421,6 @@ MonoBehaviour:
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!114 &6773615017864739433
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1410316395273548761}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 413dcae9856bd794ab03d29210561c57, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1410316396323731887
GameObject:
m_ObjectHideFlags: 0
......@@ -548,7 +535,7 @@ MonoBehaviour:
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 6773615017864739433}
- m_Target: {fileID: 0}
m_MethodName: doMagic
m_Mode: 1
m_Arguments:
......
fileFormatVersion: 2
guid: ac72be71662640f4ab0aaf102090fb95
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
......@@ -266,6 +266,7 @@ MonoBehaviour:
scrolls: []
ScrollPrefab: {fileID: 3173330253721512196, guid: a6a9a3ebdb022e546a21d9f9ff148261,
type: 3}
DetailScreen: {fileID: 1891786654}
x_Start: -240
y_Start: 200
X_Pacece_Between_Items: 110
......@@ -384,6 +385,7 @@ GameObject:
- component: {fileID: 1181841652}
- component: {fileID: 1181841655}
- component: {fileID: 1181841654}
- component: {fileID: 1181841653}
m_Layer: 5
m_Name: Scrolls-Show
m_TagString: Untagged
......@@ -411,6 +413,24 @@ RectTransform:
m_AnchoredPosition: {x: 300, y: 300}
m_SizeDelta: {x: 600, y: 600}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1181841653
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1181841651}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 92f58ba8e8c7bf243bfde7e6656c9064, type: 3}
m_Name:
m_EditorClassIdentifier:
scroll:
problemTheory:
solutionTheory:
label:
description:
declarations: []
--- !u!114 &1181841654
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -723,6 +743,30 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1891786654 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1410316395273548761, guid: efd7037a57100574780bb26bea0c0683,
type: 3}
m_PrefabInstance: {fileID: 5372018133985552218}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1891786657
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1891786654}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 92f58ba8e8c7bf243bfde7e6656c9064, type: 3}
m_Name:
m_EditorClassIdentifier:
scroll:
problemTheory:
solutionTheory:
label:
description:
declarations: []
--- !u!1 &2070523361
GameObject:
m_ObjectHideFlags: 0
......@@ -927,7 +971,7 @@ PrefabInstance:
- target: {fileID: 2966758062926209900, guid: efd7037a57100574780bb26bea0c0683,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0.00000961381
value: 181.32999
objectReference: {fileID: 0}
- target: {fileID: 4536977264099877230, guid: efd7037a57100574780bb26bea0c0683,
type: 3}
......@@ -944,8 +988,17 @@ PrefabInstance:
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
m_RemovedComponents:
- {fileID: 6773615017864739433, guid: efd7037a57100574780bb26bea0c0683, type: 3}
- target: {fileID: 7189591644879713249, guid: efd7037a57100574780bb26bea0c0683,
type: 3}
propertyPath: m_Value
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7189591644879713249, guid: efd7037a57100574780bb26bea0c0683,
type: 3}
propertyPath: m_Size
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: efd7037a57100574780bb26bea0c0683, type: 3}
--- !u!224 &6421936590152144000 stripped
RectTransform:
......
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