mirror of
https://github.com/AquaMorph/Droplets.git
synced 2025-04-29 17:35:33 +00:00
AD title support for split mode
This commit is contained in:
parent
e6881fc906
commit
eb9e4ad365
@ -119,7 +119,9 @@ ADDroplet::ADDroplet(DaisyPatch* m_patch,
|
||||
GetTitleHeight());
|
||||
}
|
||||
|
||||
ADDroplet::~ADDroplet() {}
|
||||
ADDroplet::~ADDroplet() {
|
||||
delete title_graph;
|
||||
}
|
||||
|
||||
void ADDroplet::Control() {
|
||||
if (Patch()->encoder.Pressed()) {
|
||||
@ -194,7 +196,7 @@ void ADDroplet::Draw() {
|
||||
title_graph->Update();
|
||||
}
|
||||
title_graph->SetPixelPercentage(ad[0].GetSignal());
|
||||
title_graph->Draw(Patch(), 0, 0);
|
||||
title_graph->Draw(Patch(), GetScreenMin(), 0);
|
||||
|
||||
DrawName("AD");
|
||||
AnimationInc();
|
||||
@ -209,4 +211,6 @@ void ADDroplet::UpdateStateCallback() {
|
||||
sample_rate,
|
||||
State());
|
||||
}
|
||||
title_graph = new Graph(GetScreenMax()-GetScreenMin(),
|
||||
GetTitleHeight());
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ void Graph::Draw(DaisyPatch* patch, int x, int y) {
|
||||
for (int w = 0; w < width; w++) {
|
||||
for (int h = 0; h < height; h++) {
|
||||
patch->display.DrawPixel(x+w, y+h,
|
||||
graph[GetShiftArray(width-w, active, width)]
|
||||
graph[GetShiftArray(w, active+1, width)]
|
||||
[GetShiftArray(height-h, height-1, height)]);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user