IF3Si/scd/gui_main.scd

47 lines
1.0 KiB
Smalltalk

/*
This file is part of "Interface Fractures III - Silicon".
Copyright (c) 2015 Luka Prinčič, All rights reserved.
This program is free software distributed under
GNU General Public Licence. See COPYING for more info.
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
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);