Event listener. Waits for SVET_POPUP events and processes them.
| 267 | |
| 268 | // Event listener. Waits for SVET_POPUP events and processes them. |
| 269 | void ParamsEditor::Notify(const SVEvent* sve) { |
| 270 | if (sve->type == SVET_POPUP) { // only catch SVET_POPUP! |
| 271 | char* param = sve->parameter; |
| 272 | if (sve->command_id == writeCommands[0]) { |
| 273 | WriteParams(param, false); |
| 274 | } else if (sve->command_id == writeCommands[1]) { |
| 275 | WriteParams(param, true); |
| 276 | } else { |
| 277 | ParamContent* vc = ParamContent::GetParamContentById( |
| 278 | sve->command_id); |
| 279 | vc->SetValue(param); |
| 280 | sv_window_->AddMessage("Setting %s to %s", |
| 281 | vc->GetName(), vc->GetValue().string()); |
| 282 | } |
| 283 | } |
| 284 | } |
| 285 | |
| 286 | // Integrate the parameters editor as popupmenu into the existing scrollview |
| 287 | // window (usually the pg editor). If sv == null, create a new empty |
nothing calls this directly
no test coverage detected