GUI: make it dockable

This commit is contained in:
tildearrow 2021-12-14 04:45:44 -05:00
parent 7a70ccfe2e
commit 9da9ed3cd7
2 changed files with 555 additions and 491 deletions

File diff suppressed because it is too large Load Diff

View File

@ -32,6 +32,11 @@ enum FurnaceGUIColors {
GUI_COLOR_MAX GUI_COLOR_MAX
}; };
struct SelectionPoint {
int xCoarse, xFine;
int y;
};
class FurnaceGUI { class FurnaceGUI {
DivEngine* e; DivEngine* e;
@ -50,6 +55,8 @@ class FurnaceGUI {
ImVec4 volColors[128]; ImVec4 volColors[128];
int curIns, curOctave, oldRow; int curIns, curOctave, oldRow;
bool ordersOpen, insListOpen, songInfoOpen, patternOpen, insEditOpen;
SelectionPoint selStart, selEnd;
int arpMacroScroll; int arpMacroScroll;
@ -68,10 +75,16 @@ class FurnaceGUI {
float nextScroll; float nextScroll;
void drawSongInfo();
void drawOrders();
void drawInsList();
void drawPattern();
void drawInsEdit();
public: public:
const char* noteName(short note, short octave); const char* noteName(short note, short octave);
void bindEngine(DivEngine* eng); void bindEngine(DivEngine* eng);
void updateScroll(int amount); void updateScroll(int amount);
bool loop(); bool loop();
bool init(); bool init();
FurnaceGUI(); FurnaceGUI();