-
Notifications
You must be signed in to change notification settings - Fork 2
/
selectFile.h
89 lines (76 loc) · 1.92 KB
/
selectFile.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#ifndef DEF_SELECTFILE
#define DEF_SELECTFILE
#include <SFML/Graphics.hpp>
#include <iostream>
#include <stdlib.h>
#include <string>
#include "info.h"
class selectFile{
public :
selectFile();
~selectFile();
void initSelector(int type, std::string dossier,std::string fG, std::string fT,std::string Th,std::string fL, std::string simpleLecteur);
std::string selector();
void newDir(sf::Event e);
int createDir(std::string dir);
int listDirs(std::string cdir);
void drawDirs();
int readFiles();
void listFiles();
void drawFiles();
void removeEventFileDir();
void drawDirs2();
void drawFiles2();
Info newInfo;
void onClose();
void onMouseWheel(sf::Event e);
void onKeyPressed(sf::Event e);
void onClick(sf::Event e);
void onMouseUp(sf::Event e);
void onMouseMove(sf::Event e);
private :
bool config=0;
int type=0;
std::string fGui;
std::string fTheme;
std::string dossier;
sf::Text dossierPath;
std::string fLang;
char simplePlayer[255];
sf::RenderWindow winSelector;
float winSelectorWidth=500;
float winSelectorHeight=436;
int menuBarHeight;
std::string titreSelector;
std::string Annuler;
std::string Valider;
sf::Font font;
sf::Color selectorBarColor;
sf::Color selectorBkgColor;
sf::Color selectorFontColor;
int selectFontSize;
sf::Color dirFontColor;
sf::Color fileFontColor;
int selectorFontSize;
sf::RectangleShape selectBkgSlider;
sf::RectangleShape selectBkgSlider2;
sf::RectangleShape selectMSlider;
sf::RectangleShape selectMSlider2;
int buttonMouse=0;
int lastPos1;
int lastPos2;
std::string txt;
sf::Text nText;
std::string newSelect;
std::vector <std::string> vecDirs;
std::vector <std::string> vecFs;
sf::Text selectTextDir;
int listDirsIndex=0;
int listDirsIndex2=0;
int listFilesIndex2=0;
int selectType;
sf::RectangleShape selectShap;
sf::Sprite speaker;
std::string rtf="";
};
#endif