void ModelControl::OnColourChange(wxColourPickerEvent &event) { if (!init) return; Vec4D col = fromColWidget(event.GetColour()); wxColourPickerCtrl *cpc; switch (event.GetId()) { case ID_MODEL_PC_START_11 : pcr[0][0] = col; cpc = PC11S; break; case ID_MODEL_PC_MID_11 : pcr[0][1] = col; cpc = PC11M; break; case ID_MODEL_PC_END_11 : pcr[0][2] = col; cpc = PC11E; break; case ID_MODEL_PC_START_12 : pcr[1][0] = col; cpc = PC12S; break; case ID_MODEL_PC_MID_12 : pcr[1][1] = col; cpc = PC12M; break; case ID_MODEL_PC_END_12 : pcr[1][2] = col; cpc = PC12E; break; case ID_MODEL_PC_START_13 : pcr[2][0] = col; cpc = PC13S; break; case ID_MODEL_PC_MID_13 : pcr[2][1] = col; cpc = PC13M; break; case ID_MODEL_PC_END_13 : pcr[2][2] = col; cpc = PC13E; break; } if (cpc) UpdatePCRText(cpc); if (model) { if (particlecolreplace->GetValue() == true) model->particleColorReplacements = pcr; modelPCRSaves[model->modelname] = pcr; } }
void AuxPlotConfDlg::OnColor(wxColourPickerEvent& event) { int id = event.GetId(); if (id == bg_cp_->GetId()) ap_->set_bg_color(event.GetColour()); else if (id == active_cp_->GetId()) ap_->activeDataCol = event.GetColour(); else if (id == inactive_cp_->GetId()) ap_->inactiveDataCol = event.GetColour(); else if (id == axis_cp_->GetId()) ap_->xAxisCol = event.GetColour(); ap_->refresh(); }
void OutputWinConfDlg::OnColor(wxColourPickerEvent& event) { int id = event.GetId(); if (id == cp_bg_->GetId()) ow_->set_bg_color(event.GetColour()); else if (id == cp_input_->GetId()) ow_->text_color_[UserInterface::kInput] = event.GetColour(); else if (id == cp_output_->GetId()) ow_->text_color_[UserInterface::kNormal] = event.GetColour(); else if (id == cp_quote_->GetId()) ow_->text_color_[UserInterface::kQuoted] = event.GetColour(); else if (id == cp_warning_->GetId()) ow_->text_color_[UserInterface::kWarning] = event.GetColour(); show_preview(); }