// Update is called once per frame void Update() { if (continuouslyResize) { STools.GetCentredSubImage(image); } }
private void DisplayBlocks(bool toSave) { //create real objects ResetPosition(); print("creating " + downloadedStrings.Count + " blocks"); foreach (string stringData in downloadedStrings) { // create a new block Thumbnail GameObject blockObject = STools.AddChild(gridObject, displayPrefab); displayedBlocks.Add(blockObject); SetFeedReference(blockObject); if (imagebufferCount <= 0) { blockObject.GetComponent <UIData>().AddVariables(stringData, true); } else { blockObject.GetComponent <UIData>().AddVariables(stringData, false); } } // Notify of the event! OnDownload(); //save if (toSave) { SaveDataLocal(); } ResetPosition(); }
public void AfterDownload(Texture2D newTex) { image = newTex; //set SetTexture(imageObj, image); //image url needs to be set first DealWithImage(image, data["image"]); STools.GetCentredSubImage(rawImage); }
private void AddFriends(string input) { //divide into its data components string[] friendStringSeparators = { "|friend|" }; string[] friends = input.Split(friendStringSeparators, System.StringSplitOptions.RemoveEmptyEntries); //split into key, value pair and add to data dictionary foreach (string friend in friends) { GameObject newFriend = STools.AddChild(friendGrid, friendPrefab); newFriend.GetComponent <Friend>().theData = this; newFriend.GetComponent <Friend>().Create(friend); } }
private void SetMainImage() { print("new blocks downloaded"); if (displayedBlocks.Count > 0) { Data_PostV4UI topBlock = displayedBlocks[0].GetComponent <Data_PostV4UI>(); Main_Image mainBlock = mainTexture.GetComponent <Main_Image>(); mainBlock.data = topBlock.data; mainBlock.LoadTextures(); //remove the top block topBlock.DestroyTextures(); STools.Destroy(displayedBlocks[0]); displayedBlocks.RemoveAt(0); } }
private void DisplayBlocks(bool toSave) { //create real objects ResetPosition(); print("creating " + downloadedStrings.Count + " blocks"); foreach (string stringData in downloadedStrings) { // create a new block Thumbnail GameObject blockObject = STools.AddChild(gridObject, displayPrefab); displayedBlocks.Add(blockObject); SetFeedReference(blockObject); blockObject.GetComponent <UIData>().AddVariables(stringData); } //save if (toSave) { SaveDataLocal(); } ResetPosition(); }
// Use this for initialization void Start() { STools.GetCentredSubImage(image); }
protected void PlayTween(GameObject obj, bool direction) { STools.NGUIPlayTween(obj, direction); }
protected void SetLabel(GameObject to, string newText) { STools.UISetLabel(to, newText); }
//-------------- HELPER FUNCTIONS -------------------- protected string GetLabel(GameObject obj) { return(STools.UIGetLabel(obj)); }
private void AddFeedPadding() { STools.AddChild(gridObject, paddingObj); STools.AddChild(gridObject, paddingObj); STools.AddChild(gridObject, paddingObj); }