Daily Progress: Populating the panel data

We now know each panel will need a script with a ProcessInfo() function in it, and we’ll begin with the Find_Case search panel, We can just call our script ‘SearchPanel’ since it’s the only one and attach it. We’ll also seed it with the ProcessInfo() function.

And since we’re dealing with Unitys UI, we’ll need to use the UI namespace of course!

Next, we’ll need a holder for the input field:

And we’ll now drag our input into the holder:

For our search button, while it does go to the next screen, we may remove that later, but we’ll also attach it to our ProcessInfo function by creating a new button event, dragging our search panel into the buttons source since that holds the script processInfo() is in, and we’ll select it from the dropdown.

The next panel is just presented data and an accept button.

We’ll need to populate it programmatically so let’s create a SelectPanel script and attach it. Of course it will need the UI space and a public ProcessInfo() function as well:

We’ve created a variable holder of type Text so we can modify that info later, now we just drag the text UI into the variable in the inspector:

And we’re done with this panel! Next is the client info panel:

Here we have a case number text field that needs to be modified, a couple of fields for first and last name, and a next button. We’ll create a ClientInfoPanel script and do everything as before, create holders for the 3 elements and drag them in using the inspector:

And just like the last panel, we’ll attach ProcessInfo() to the Next button.

And that’s it for the Client info panel, next is the location panel:

There’s the case number, a space for the photo, notes inputField and the next button so you know the drill by now! Create a LocationPanel script, add the using Unity.UI namespace, add the ProcessInfo() function, and create holders for all of the elements and drag them in using the inspector. At this point, I’ll just share the final screen.

Next the TakePhoto panel:

We have Case Text, Photo image, Notes InputField, and the next button.

Finally, we have the overview screen that needs holders for: Case number, name, date, location, location notes, a (raw) Photo image, and photo notes.

Suffice to say, I’m pretty familiar with Unitys UI now, I think. :D

Tomorrow we’re going over something called Ipanel implementation.

cartoonist, game artist, and wanabe gamedev.