initial commit

This commit is contained in:
jettis
2024-12-05 20:49:37 +02:00
commit 688def7e01
235 changed files with 3334 additions and 0 deletions

32
NewDialogs/Scrollbar.h Normal file
View File

@@ -0,0 +1,32 @@
#ifndef SCROLLBAR
#define SCROLLBAR
#include <SDL3/SDL.h>
#include "Item.h"
class Scrollbar : public Item {
private:
bool vertical;
int min_value;
int max_value;
int value;
int bar_size;
int mouse_offset;
bool pressed;
void (*value_changed_func)(void *p);
void *p;
public:
Scrollbar(int min_value, int max_value, int value, SDL_Rect pos);
~Scrollbar();
void drawScrollbar();
bool onMousePress(int x, int y);
void onMouseRelease(int x, int y);
void onMouseMove(int x, int y);
int getBarPos();
void setValueByBarPos(int pos);
void setValueChangedFunc(void (*value_changed_func)(void *p), void *p);
int getValue();
};
#endif