#include "gui.h"
#include "menu.h" // Element class methods are pulled in here...
#include "window.h"
+#include "button.h"
+#include "text.h"
+#include "diskwindow.h"
#include "video.h"
+#include "apple2.h"
// Debug support
//#define DEBUG_MAIN_LOOP
#include "log.h"
//#endif
+/*
+Work flow: Draw floppy drive.
+If disk in drive, MO shows eject graphic, otherwise show load graphic.
+If hit 'new blank image':
+ If disk in drive, ask if want to save if modified
+ else, load it
+If hit 'swap disks', swap disks.
+*/
+
GUI::GUI(SDL_Surface * surface): menuItem(new MenuItems())
{
// windowList.push_back(new Menu());
// Create drive windows, and config windows here...
-
+ windowList.push_back(new Window(30, 30, 200, 100));
+ windowList.push_back(new Window(30, 140, 200, 100));
+ windowList.push_back(new Button(30, 250, "Click!"));
+ windowList.push_back(new Text(30, 20, floppyDrive.GetImageName(0)));
+ windowList.push_back(new Text(30, 130, floppyDrive.GetImageName(1)));
+ windowList.push_back(new DiskWindow(&floppyDrive, 240, 20));
}
GUI::~GUI()
SDL_EnableKeyRepeat(150, 75);
// Initial update... [Now handled correctly in the constructor]
+ // Uh, still needed here, though... Only makes sense that it should
for(i=windowList.begin(); i!=windowList.end(); i++)
(*i)->Draw();