supreme-committee / text-adventure

UCSC CMPS 115 Project
0 stars 0 forks source link

Create a button class(8) #5

Closed mgrijalva closed 10 years ago

mgrijalva commented 10 years ago

This class will represent a button that the game class will use.

We don't really need a 'GUI wrapper' quite yet.

Something like: Button play = new Button(); play.text = "Play game" etc...

blieu commented 10 years ago

I will try to deal with this issue but I will probably need someone to read that I actually did it right.

mgrijalva commented 10 years ago

Next time we meet we'll do a coding session to flesh it out more.

I pushed some code that shows what I'm thinking for how the GUI creation process will work. Look at the function Game::createButtons() in the file Game.cc.

I'm thinking I'll just iterate through the links for the current tile and build a button for each one. I would pass in the text to display on the button, and the path to the filename to load in the event that the user clicks said button.