Wednesday, 28 May 2014

Changing into Horizontal bar slider and final search bar

With discussing with the client of the current state of our project and what he wants to add to it, a horizontal bar slider was decided to be put in. This slider bar would control what church would be visible on screen according to date. There would be 2 slider bars, one for maximum date and minimum date. By sliding them, the series of thumbnails shown on the page would organise itself visually corresponding to the date of that church. For the script in creating this, with the help of Stephen, he made a functional slider bar by primarily using: a grid, to allow the thumbnails to be shown on a grid; a filter, to update the grid when the slider bars are adjusted; and a series of variables attached to the slider bar to make it functional.

I decided that I didn't want to abandon of having a search bar that I've worked on for awhile. So I decided to create lines of code that would fit into the new script Stephen had made in making a working search bar. This was done by adding a few lines of code inside the OnGUI function, declaring a variable at the top and by updating the filter function to include filtering strings (images shown below).

Code added in void OnGUI

End result of the slider bar + search bar together. Search bar works with how the scenes of the churches are called from the thumbnails. E.g. if a church's thumbnail's scene is called "Church1", then if Church1 was typed into the search bar, it would update the filter to only show that thumbnail from the grid.

No comments:

Post a Comment