-
Notifications
You must be signed in to change notification settings - Fork 4
/
GUI.h
91 lines (78 loc) · 2.7 KB
/
GUI.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
90
91
#pragma once
#include "ofMain.h"
#include "ofxGui.h"
class GUI {
private:
bool isAnySettingChanged;
ofxPanel generalSettingsPanel;
ofxIntSlider seedSlider;
ofxIntSlider tileSizeSlider;
ofxIntSlider mapWidthSlider;
ofxIntSlider mapHeightSlider;
ofxPanel noiseSettingsPanel;
ofxIntSlider octavesSlider;
ofxFloatSlider noiseScaleSlider;
ofxFloatSlider lacunaritySlider;
ofxFloatSlider persistenceSlider;
ofxPanel elevationSettingsPanel;
ofxIntSlider maxElevationSlider;
ofxFloatSlider flattenElevationSlider;
ofxPanel mapTypesPanel;
ofxToggle isStandardMapToggle;
ofxToggle isIslandMapToggle;
ofxToggle isLakeMapToggle;
ofxPanel colorPalettePanel;
ofParameter<ofColor> oceanColorPicker;
ofParameter<ofColor> coastColorPicker;
ofParameter<ofColor> beachColorPicker;
ofParameter<ofColor> plainColorPicker;
ofParameter<ofColor> forestColorPicker;
ofParameter<ofColor> hillColorPicker;
ofParameter<ofColor> mountainColorPicker;
public:
GUI();
struct Settings {
int seed;
int tileSize;
int mapWidth;
int mapHeight;
int octaves;
float noiseScale;
float lacunarity;
float persistence;
int maxElevation;
float flattenElevation;
int mapType;
ofColor oceanColor;
ofColor coastColor;
ofColor beachColor;
ofColor plainColor;
ofColor forestColor;
ofColor hillColor;
ofColor mountainColor;
};
struct Settings getSettings();
void draw();
void setIsAnySettingChanged();
bool getIsAnySettingChanged();
void seedSliderChanged(int& seedSlider);
void tileSizeSliderChanged(int& tileSizeSlider);
void mapWidthSliderChanged(int& mapWidthSlider);
void mapHeightSliderChanged(int& mapHeightSlider);
void octavesSliderChanged(int& octavesSlider);
void noiseScaleSliderChanged(float& noiseScaleSlider);
void lacunaritySliderChanged(float& lacunaritySlider);
void persistenceSliderChanged(float& persistenceSlider);
void maxElevationSliderChanged(int& maxElevationSlider);
void flattenElevationSliderChanged(float& flattenElevationSlider);
void isStandardMapToggleChanged(bool& isStandardMapToggle);
void isIslandMapToggleChanged(bool& isIslandMapToggle);
void isLakeMapToggleChanged(bool& isLakeMapToggle);
void isOceanColorPickerChanged(ofColor& oceanColorPicker);
void isCoastColorPickerChanged(ofColor& coastColorPicker);
void isBeachColorPickerChanged(ofColor& beachColorPicker);
void isPlainColorPickerChanged(ofColor& plainColorPicker);
void isForestColorPickerChanged(ofColor& forestColorPicker);
void isHillColorPickerChanged(ofColor& hillColorPicker);
void isMountainColorPickerChanged(ofColor& mountainColorPicker);
};