GUI: prepare for GB envelope view
This commit is contained in:
parent
99d57bf342
commit
003c9c3235
3 changed files with 31 additions and 3 deletions
|
|
@ -1002,6 +1002,27 @@ void FurnaceGUI::drawFMEnv(unsigned char tl, unsigned char ar, unsigned char dr,
|
|||
}
|
||||
}
|
||||
|
||||
void FurnaceGUI::drawGBEnv(unsigned char vol, unsigned char len, unsigned char sLen, bool dir, const ImVec2& size) {
|
||||
//ImDrawList* dl=ImGui::GetWindowDrawList();
|
||||
ImGuiWindow* window=ImGui::GetCurrentWindow();
|
||||
|
||||
ImVec2 minArea=window->DC.CursorPos;
|
||||
ImVec2 maxArea=ImVec2(
|
||||
minArea.x+size.x,
|
||||
minArea.y+size.y
|
||||
);
|
||||
ImRect rect=ImRect(minArea,maxArea);
|
||||
ImGuiStyle& style=ImGui::GetStyle();
|
||||
//ImU32 color=ImGui::GetColorU32(uiColors[GUI_COLOR_FM_ENVELOPE]);
|
||||
//ImU32 colorS=ImGui::GetColorU32(uiColors[GUI_COLOR_FM_ENVELOPE_SUS_GUIDE]); // Sustain horiz/vert line color
|
||||
ImGui::ItemSize(size,style.FramePadding.y);
|
||||
if (ImGui::ItemAdd(rect,ImGui::GetID("alg"))) {
|
||||
ImGui::RenderFrame(rect.Min,rect.Max,ImGui::GetColorU32(ImGuiCol_FrameBg),true,style.FrameRounding);
|
||||
|
||||
// TODO: this whole thing
|
||||
}
|
||||
}
|
||||
|
||||
#define P(x) if (x) { \
|
||||
MARK_MODIFIED; \
|
||||
e->notifyInsChange(curIns); \
|
||||
|
|
@ -2242,6 +2263,8 @@ void FurnaceGUI::drawInsEdit() {
|
|||
goesUp=false;
|
||||
ins->gb.envDir=goesUp;
|
||||
}
|
||||
|
||||
drawGBEnv(ins->gb.envVol,ins->gb.envLen,ins->gb.soundLen,ins->gb.envDir,ImVec2(ImGui::GetContentRegionAvail().x,100.0f*dpiScale));
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
if (ins->type==DIV_INS_C64) if (ImGui::BeginTabItem("C64")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue