// sc.solar 17.07.01 ( // Prestting ExampleGui // handle presetting with the upper eight buttons. if you want to keep one or the other // view from beeing set, you use the NP....View-class instead. useful e.g. for master volume or lagtime slider. // the suffix for the preset_filename can be set for PLoadBV, PSaveBv and PNSaveBv with a .preName_("myName") method. var w; // presetViews w = GUIWindow.new("panel", Rect.newBy(230, 50, 400, 650)); PresetButtonView.new( w, Rect.newBy(32, 17, 128, 20), "Store", 0, 0, 1, 0, 'linear') .backColor_(rgb(0,240,0)); StringView.new( w, Rect.newBy(178, 17, 128, 20), "PresetButtonView"); NamePresetButtonView.new( w, Rect.newBy(32, 42, 128, 20), "Store", 0, 0, 1, 0, 'linear') .backColor_(rgb(0,240,0)); StringView.new( w, Rect.newBy(178, 41, 128, 20), "NamePresetButtonView"); PresetSaveButtonView.new( w, Rect.newBy(33, 97, 128, 20), "Save", 0, 0, 1, 0, 'linear') .backColor_(rgb(0,240,0)); StringView.new( w, Rect.newBy(177, 97, 128, 20), "PresetSaveButtonView"); NamePresetSaveButtonView.new( w, Rect.newBy(32, 122, 128, 20), "Save", 0, 0, 1, 0, 'linear') .backColor_(rgb(0,240,0)).preName_("test"); StringView.new( w, Rect.newBy(177, 121, 128, 20), "NamePresetSaveButtonView"); PresetLoadButtonView.new( w, Rect.newBy(34, 176, 128, 20), "Load", 0, 0, 1, 0, 'linear'); StringView.new( w, Rect.newBy(176, 176, 128, 20), "PresetLoadButtonView"); NamePresetLoadButtonView.new( w, Rect.newBy(34, 202, 128, 20), "Load", 0, 0, 1, 0, 'linear'); StringView.new( w, Rect.newBy(176, 200, 128, 20), "NamePresetLoadButtonView"); PresetLoadSetButtonView.new( w, Rect.newBy(34, 255, 128, 20), "Load", 0, 0, 1, 0, 'linear'); StringView.new( w, Rect.newBy(176, 255, 128, 20), "PresetLoadSetButtonView"); NamePresetLoadSetButtonView.new( w, Rect.newBy(34, 280, 128, 20), "Load", 0, 0, 1, 0, 'linear'); StringView.new( w, Rect.newBy(176, 280, 128, 20), "NamePresetLoadSetButtonView"); RandSetButtonView.new( w, Rect.newBy(34, 318, 128, 20), "Panik", 0, 0, 1, 0, 'linear') .backColor_(rgb(255,0,0)); StringView.new( w, Rect.newBy(177, 318, 128, 20), "RandSetButtonView"); // views to be set and not to be set (NP) SliderView.new( w, Rect.newBy(153, 422, 128, 20), "SliderView", 0.342105, 0, 1, 0, 'linear'); CheckBoxView.new( w, Rect.newBy(21, 422, 128, 20), "CheckBoxView", 1, 0, 1, 0, 'linear'); NumericalView.new( w, Rect.newBy(291, 423, 64, 20), "NPNumericalView", 1.79282e+09, -1e+10, 1e+10, 0, 'linear'); NRNumericalView.new( w, Rect.newBy(289, 565, 64, 20), "NRNumericalView", 7, -1e+10, 1e+10, 0, 'linear'); NRCheckBoxView.new( w, Rect.newBy(21, 565, 128, 20), "NRCheckBoxView", 1, 0, 1, 0, 'linear'); NRSliderView.new( w, Rect.newBy(156, 565, 128, 20), "NRSliderView", 0.359649, 0, 1, 0, 'linear'); StringView.new( w, Rect.newBy(10, 540, 293, 18), "NRViews dont get set from RandSetBV"); StringView.new( w, Rect.newBy(4, 388, 343, 24), "'normal' ControlViews are set from any PBV"); StringView.new( w, Rect.newBy(9, 466, 343, 24), "NPViews dont get preset at all"); NPCheckBoxView.new( w, Rect.newBy(21, 494, 128, 20), "NPCheckBoxView", 0, 0, 1, 0, 'linear'); NPSliderView.new( w, Rect.newBy(152, 494, 128, 20), "NPSliderView", 0.587719, 0, 1, 0, 'linear'); NPNumericalView.new( w, Rect.newBy(291, 494, 64, 20), "NPNumericalView", -5, -1e+10, 1e+10, 0, 'linear'); )