]> Shamusworld >> Repos - apple2/blobdiff - src/gui/gui.cpp
Add new files that makes this stuff work. D'oh!
[apple2] / src / gui / gui.cpp
index fa652146737a3f0a8ebc3c513c89f772b59ec02c..7c6e219782d001fbd2c7c7680964c0abb341b267 100755 (executable)
 #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())
 {
@@ -43,7 +56,12 @@ 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()
@@ -96,6 +114,7 @@ void GUI::Run(void)
        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();