IF3Si/scd/gui_main.scd

46 lines
887 B
Plaintext

/*
part of: Interface Fractures III - Silicon
(c) Luka Prinčič / Nova deViator
nova@deviator.si
gui_main.scd - responsible for GUI elements under
the 'main' tab ...
********************************************************** */
~tab_views[~tab_names.at("main")].layout = HLayout(
nil,
VLayout(
nil,
Button()
.states_([
["Clock"],
["Clock", Color.gray(0.2), Color.grey(0.8)] ])
.mouseDownAction_({ | state |
switch(state.value,
0, {
postln("\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - ");
postln("~~~ starting clock!");
TempoClock.default.sched(0, ~mainTimeline);
~mainTimeline.reset;
},
1, {
postln("\n~~~ stopping clock!");
~mainTimeline.stop;
//~mainTimeline.reset;
postln("~~~ some synths might still be running");
}
);
})
.minHeight_(70).minWidth_(70),
nil),
nil);