Introducing our lightweight debug slider library for Win32 developers, designed for seamless integration into your projects. With a clean API and modern visual styles, it allows you to manage variables elegantly and efficiently. Whether you require precise value adjustments or dynamic debugging, this tool keeps your workflow smooth and hassle-free—completely free to use and modify.
Debugslider is a powerful and efficient Win32 debug slider library designed to enhance your debugging experience. This library features an stb-style single header that makes it easy to integrate visual sliders into your applications.
Key Features
- Simple Integration: With just a few lines of code, you can quickly implement a slider in your C applications.
- Modern Appearance: Enable visual styles for a more contemporary look by defining
ENABLE_VISUAL_STYLES
when using Clang or MSVC.
Usage Example
Integrating the Debugslider library is straightforward. Here is a simple example:
#include <stdio.h>
#define ENABLE_VISUAL_STYLES
#define SLIDER_IMPLEMENTATION
#include "slider.h"
int main(void) {
Slider slider = slider_new(u8"amount", 1, 400);
if (slider.err != 0) {
printf("I am so sad! Err: %d\n", slider.err);
}
for(;;) {
int val = slider_val(&slider);
printf("amount: %d\n", val);
if (slider.err == SLIDER_CLOSED) {
break;
}
}
return 0;
}
This sample code initializes a slider and continuously prints the current slider value until it is closed.
API Overview
Debugslider provides a simple API with the following functions:
// Create a new slider with the title <name>, and the range from min to max
Slider slider_new(const char* name, int min, int max);
// Retrieve the current value of the slider
int slider_val(Slider* slider);
Visual Styles
The library allows you to toggle between visual styles for modern aesthetics or stick with a classic look. Examples include:
Debugslider is meant to streamline and enhance the debugging process for developers working on Win32 applications. Whether you're building a small application or a larger system, Debugslider offers a flexible and user-friendly approach to managing slider inputs.