50 lines
1.1 KiB
C
50 lines
1.1 KiB
C
#ifndef __Settings__
|
|
|
|
#define __Settings__
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <SDL2/SDL.h>
|
|
#include <SDL2/SDL_image.h>
|
|
#include <stdbool.h>
|
|
#include "breakout.h"
|
|
#include "gamestate.h"
|
|
#include "main.h"
|
|
|
|
typedef struct sliderstruct {
|
|
SDL_Rect Bar_rect;
|
|
SDL_Rect Scalar_rect;
|
|
bool IsLock;
|
|
double Slider_value,min,max;
|
|
} Slider;
|
|
|
|
typedef struct stepsliderstruct {
|
|
SDL_Rect Bar_rect;
|
|
SDL_Rect Scalar_rect;
|
|
SDL_Rect L_Arrow_rect;
|
|
SDL_Rect R_Arrow_rect;
|
|
bool IsLock;
|
|
double Slider_value,min,max;
|
|
} Stepslider;
|
|
|
|
|
|
void Settings_Draw (SDL_Renderer* renderer,Scenery* scenery);
|
|
|
|
void Draw_Slider(SDL_Renderer* renderer,Slider* beta);
|
|
|
|
void Draw_Stepslider(SDL_Renderer* renderer,Stepslider* beta);
|
|
|
|
void Settings_Initialize (SDL_Renderer* renderer,Scenery* scenery);
|
|
|
|
void Initialize_Slider(int x,int y,int sw,int bw,int h,double min,double max,Slider* beta,double defaultvalue);
|
|
|
|
void Initialize_Stepslider(int x,int y,int sw,int bw,int h,double min,double max,Stepslider* beta,double defaultvalue);
|
|
|
|
void Settings_Deinitialize();
|
|
|
|
void mapping(double *x,Slider* beta);
|
|
|
|
void Settings_Return();
|
|
|
|
#endif
|