Browse Source

Build filehandling plugin by default, resize/pos button

pull/282/head
falkTX 3 years ago
parent
commit
a4726193e2
2 changed files with 12 additions and 3 deletions
  1. +2
    -0
      Makefile
  2. +10
    -3
      examples/FileHandling/FileHandlingUI.cpp

+ 2
- 0
Makefile View File

@@ -21,6 +21,7 @@ dgl:

examples: dgl
$(MAKE) all -C examples/CVPort
$(MAKE) all -C examples/FileHandling
$(MAKE) all -C examples/Info
$(MAKE) all -C examples/Latency
$(MAKE) all -C examples/Meters
@@ -64,6 +65,7 @@ clean:
$(MAKE) clean -C dgl
$(MAKE) clean -C examples/CVPort
$(MAKE) clean -C examples/CairoUI
$(MAKE) clean -C examples/FileHandling
$(MAKE) clean -C examples/Info
$(MAKE) clean -C examples/Latency
$(MAKE) clean -C examples/Meters


+ 10
- 3
examples/FileHandling/FileHandlingUI.cpp View File

@@ -183,12 +183,20 @@ protected:
{
fScale = static_cast<float>(ev.size.getHeight())/kInitialHeight;

fButton1.setAbsolutePos(5*fScale, 5*fScale);
fButton2.setAbsolutePos(5*fScale, 105*fScale);
fButton3.setAbsolutePos(5*fScale, 205*fScale);

fButton1.setSize(100*fScale, 30*fScale);
fButton2.setSize(100*fScale, 30*fScale);
fButton3.setSize(100*fScale, 30*fScale);

UI::onResize(ev);
}

void buttonClicked(Button* const button, bool) override
{
States stateId = kStateCount;
States stateId;

/**/ if (button == &fButton1)
stateId = kStateFile1;
@@ -196,8 +204,7 @@ protected:
stateId = kStateFile2;
else if (button == &fButton3)
stateId = kStateFile3;

if (stateId == kStateCount)
else
return;

requestStateFile(kStateKeys[stateId]);


Loading…
Cancel
Save