I dunno that this makes it any easier...

I tried splitting up the sources to speed
up some compiling... but it didn't help.
I dunno that it's more readable this way.

I'm checkpointing this just in case.
This commit is contained in:
2026-01-26 03:47:52 -05:00
parent 9fca970fc5
commit c368696cc2
11 changed files with 279 additions and 200 deletions

View File

@ -1,56 +1,7 @@
#pragma once
#include <Fl/Fl.H>
#include <Fl/Fl_Window.H>
#include <Fl/Fl_Value_Slider.H>
#include <iostream>
#include "MouseWheelSlider.h"
void saverChosen();
void perfChosen();
void balChosen();
class MouseWheelSlider : public Fl_Value_Slider
{
public:
explicit
MouseWheelSlider( const int x, const int y, const int w, const int h,
const char *const l= 0 )
: Fl_Value_Slider( x, y, w, h, l )
{
step( 1 );
}
int
handle( const int event ) override
{
switch( event )
{
case FL_MOUSEWHEEL:
{
// Negative, because I use this for the Brightness control.
const int dy= -Fl::event_dy();
const int newVal= value() - dy * step();
if( 0 ) std::cerr << "newVal: " << newVal << " max: " << maximum() << " min: " << minimum() << std::endl;
if( newVal >= maximum()
and newVal <= minimum() )
{
value( newVal );
}
do_callback();
return 1;
}
break;
default:
{
return this->Fl_Value_Slider::handle( event );
}
break;
}
}
};