+int GWindowToggle::draw_face(int flash, int flush)
+{
+ int ret = BC_Toggle::draw_face(flash, flush);
+ if( hot ) {
+ set_color(color);
+ set_opaque();
+ draw_rectangle(text_x-1, text_y-1, text_w+1, text_h+1);
+ if( flash ) this->flash(0);
+ if( flush ) this->flush();
+ }
+ return ret;
+}
+
+void GWindowGUI::set_cool(int reset, int all)
+{
+ for( int i=0; i<(int)(sizeof(toggles)/sizeof(toggles[0])); ++i ) {
+ GWindowToggle* toggle = toggles[i];
+ if( !toggle ) continue;
+ int *vp = get_main_value(toggle->info);
+ if( !vp ) continue;
+ if( toggle->hot ) {
+ toggle->hot = 0;
+ toggle->draw_face(1, 0);
+ }
+ if( reset > 0 )
+ *vp = toggle->hot_value;
+ else {
+ toggle->hot_value = *vp;
+ if( reset < 0 ) {
+ if ( all || toggle->info->isauto > 0 )
+ *vp = 0;
+ }
+ }
+ }
+ if( reset )
+ update_toggles(0);
+}
+
+void GWindowGUI::set_hot(GWindowToggle *toggle)
+{
+ int *vp = get_main_value(toggle->info);
+ if( !vp ) return;
+ set_cool(-1, !toggle->info->isauto ? 1 : 0);
+ toggle->hot = 1;
+ toggle->set_value(*vp = 1);
+}
+