Just recapping on my progress since my last entry as well as outlining a couple of my objectives.
I presented this to the group and discussed the direction last meeting.
I presented this to the group and discussed the direction last meeting.
Progress:
- Read through and tried to understand Jun's code
- Unfortunately it would seem that when I submitted a code sample of multiple viewports, I had provided an out of date file which was rather inefficient and inflexible. It is still workable, though.
- Integrated what I had done in a sample piece of code into Jun's code
- Fixed an issue with detecting the coordinates of the mouse in 3d space when enlarging a single viewport
- Created a GUI drawable game component to perform tasks such as:
- Drawing all the buttons for the GUI
- Detecting rollover and clicking of buttons
- Determining which button has been pressed and what action the program should perform next
- Created a struct “ActionEvent” which shall be passed from the keyboard/mouse handler and the GUI. This struct contains information as to what action the program should perform next and what viewport the action is specific to (if any).
- Edited the structure of the program so now the keyboard/mouse handler now returns an ActionEvent to be dealt with later, thus allowing the reuse of code and improving readabillity.
- Modified the code so that each of workspaces that are to be drawn have their own viewports, ie. topleft, topright, bottomleft, bottomright, fullscreen and default. This way the program doesn't have to keep calculating the positioning and sizing of each viewport with each render, resulting in improved efficiency at a minimal cost to memory.
- The GUI class now lets us simply call a function to add a particular button type (eg, filebar or toolbar), passing an image with it and the class will figure out the correct positioning of the button and detect if it has been clicked or not.
- The buttons specific to each of the different viewports requires a bit more work
Objectives (before last meeting):
- Separate existing functionality into detection functions and handler functions
- Create more pictures to be used by the GUI
- Restructure the GUI class
Objectives (after last meeting):
- It would seem that Jun has begun a template for the GUI for me and would like me to continue from where he left off
- I am currently looking at the two designs advantages/disadvantages and what I can do to further the GUI by next group meeting.
No comments:
Post a Comment