MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { version = 1; factor = 10000; ui->setupUi(this); initButtons(); initSliders(); // onPlayerCallback(); }
NoiseGen::NoiseGen() { //init seed srand( time(NULL) ); IMAGE_SIZE = 256; IMAGE_SCALE = 2; terrainmode = false; //paramvalues.resize(9); terSlider = NULL; //load settings defaultSettings(); // load hardcoded defaults first loadSettings(); // load settings file, if one is not found, create one //init screen screen = new sf::RenderWindow( sf::VideoMode(IMAGE_SIZE*IMAGE_SCALE+RIGHT_MARGIN_WIDTH,IMAGE_SIZE*IMAGE_SCALE+BOTTOM_MARGIN_HEIGHT,32), "Simplex Noise"); screen->setIcon(sfml_icon.width, sfml_icon.height, sfml_icon.pixel_data); mapTexture = new sf::RenderTexture; mapTexture->create(IMAGE_SCALE*IMAGE_SIZE, IMAGE_SCALE*IMAGE_SIZE); mapTexture->display(); //load font font.loadFromFile("font.ttf"); //init terrain colors /* terraincolors.push_back(sf::Color(0,0,120)); // deep water terraincolors.push_back(sf::Color(0,0,220)); // shallow water terraincolors.push_back(sf::Color(200,200,0)); // sand terraincolors.push_back(sf::Color(200,120,50)); // dirt terraincolors.push_back(sf::Color(0,220,0)); // low grass terraincolors.push_back(sf::Color(0,120,0)); // high grass terraincolors.push_back(sf::Color(120,120,120)); // low mtn terraincolors.push_back(sf::Color(200,200,200)); // high mtn terraincolors.push_back(sf::Color(245,245,245)); // mtn tops */ //other object inits initSliders(); initTerrainSlider(); initButtons(); //start main loop mainLoop(); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { activeGUIMsg = new GUI_message(); activeFIlterMsg = new FILTER_message(); initSerialPort(); dacDebug = NULL; ui->setupUi(this); initDials(); initSliders(); initButtonGroups(); initVUMeter(); initSeqThermo(); initSpinBoxes(); createConnections(); updateOSC1(); updateOSC2(); updateLFO(); updateENV(); updateDelay(); seq_counter = 0; }
void MainWindow::on_toolButtonNew_released() { setButtons(); initSliders(); }