Interface design

When I was thinking about what to change about the Treasure game interface, I thought about my experience trying the treasure game in class. I didn’t get the game at all even though it’s suppose to be pretty easy to play. There is no instruction or whatsoever to tell the player what to do.

For this interface design, I plan to create like an alert pop-up message before the gameplay to let the player know how the game works. Unlike javascript, creating an alert message isn’t that easy in java. I searched on StackOverflow and it seems like I need an extra library or something.

https://stackoverflow.com/questions/21247208/display-pop-up-message-window-in-java

https://stackoverflow.com/questions/9119481/how-to-present-a-simple-alert-message-in-java

The links weren’t that helpful when I tried out the code. I looked through Chris’ existing code and realized I could just add another button as a pop-up message. I went to the gameview tab to create a new text button class. I looked at how Chris created his opponent and player buttons and tried to estimate the location of the x and y coordinate as well as the size of the button.

Screen Shot 2019-03-12 at 11.21.46 PM

The width and height of the button are a bit tricky because of the text. I need to tinker with the font size on the style tab and the size of the button several times. I also explore the style tab on the RGB button and text colors.

Screen Shot 2019-03-12 at 11.30.21 PM

Link to download my file.

Advertisement