Programmers Be Crazy!

A few years after the movie Office Space came out my brother-in-law told me I had to see it. “This is your life.” he mentioned somewhat tongue in cheek. Since he is a dentist he felt he could make…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Building Enterprise Apps with Unity Part 2

Before we get to the buttons we need to add a grey overlay, using the same process as the background image.

An interesting trick to know that if you are not sure how large an image is in your scene view you can click on it in the Inspector. Than in the scene view you can click and drag the image and you will see a number appear, drag it to the top and you will see the total size of the image.

Now on to the buttons. Here we just create a button and before we anchor it to stretch like we did for our other UI elements we need to change the size to the image size. To find that out, on the image itself or on our button when we dragged the image on, scroll to the bottom.

This will tell us the size to put in the height and width of our buttons. Change the font to white and increase it to 60, write the relevant text ,duplicate the button and we have our Main Menu.

Next we create a new panel for our Find a case option. We will temporarily disable the Main menu panel for now .This will have a border image and our logo.

You will notice that the borders do not go completely to the top and bottom this is because we have preserve aspect ratio checked. What this does is make sure the edges of our image do not get stretched. In this case it would not distort the image to have them stretched as they are just white bars.

Our logo is added to the top.

This is rather scrunched so what needs to happen is adjusting the left and right anchors by about 120.

Next add a grey overlay like before. Finally we can add a text element that will ask for case number.

The last thing we need to do is add an Input field, which is found under UI. This will allow us to input our case number. There are two text elements under an Input field. One is the placeholder text which in this case is Enter Text… and the text the user will type in. Lets center the text on both and increase font to 40 on it.

In the next article we will continue adding UI elements.

Add a comment

Related posts:

Querying Cache in Apache Ignite

Apache Ignite is a memory-centric distributed database, caching, and processing platform for transactional, analytical, and streaming workloads delivering in-memory speeds at the petabyte scale…

I Walked 60 Minutes For 365 Days

I knew that walking outside was important. But I wasn't sure. It seemed just a waste of time. What can I get walking every day? A lot! And that's why you need walk