fn update_from_dialog(&mut self, context: &mut ScreenContext) {
        if context.dialog_entry == DialogEntry::NodeName {
            // Node based
            for node_index in 0..self.nodes.len() {
                if self.nodes[node_index].id == context.dialog_node_behavior_id.0 {
                    self.nodes[node_index].text[0] = context.dialog_node_behavior_value.4.clone();
                    self.nodes[node_index].dirty = true;
                    self.dirty = true;

                    context.data.set_behavior_node_name((self.get_curr_behavior_id(context), context.dialog_node_behavior_id.0),context.dialog_node_behavior_value.4.clone(), self.graph_type);
                    break;
                }
            }
            return
        }

        // Atom base
        for node_index in 0..self.nodes.len() {
            for atom_index in 0..self.nodes[node_index].widgets.len() {
                if let Some(id) = &self.nodes[node_index].widgets[atom_index].behavior_id {
                    if id.0 == context.dialog_node_behavior_id.0 && id.1 == context.dialog_node_behavior_id.1 && id.2 == context.dialog_node_behavior_id.2 {
                        self.nodes[node_index].widgets[atom_index].atom_data.data = context.dialog_node_behavior_value.clone();
                        self.nodes[node_index].widgets[atom_index].dirty = true;
                        self.nodes[node_index].dirty = true;
                        self.dirty = true;
                        break;
                    }
                }
            }
        }
    }
/// Updates a node value from the dialog
Updates a node value from the dialog
Updates a node value from the dialog
fn update_from_dialog(&mut self, context: &mut ScreenContext) {
        if context.dialog_entry == DialogEntry::NodeName {
            // Node based
            for node_index in 0..self.nodes.len() {
                if self.nodes[node_index].id == context.dialog_node_behavior_id.0 {
                    self.nodes[node_index].text[0] = context.dialog_node_behavior_value.4.clone();
                    self.nodes[node_index].dirty = true;
                    self.dirty = true;
                    context.data.set_behavior_node_name((self.get_curr_behavior_id(context), context.dialog_node_behavior_id.0),context.dialog_node_behavior_value.4.clone(), self.graph_type);
                    break;
                }
            }
            return
        }
        // Atom base
        for node_index in 0..self.nodes.len() {
            for atom_index in 0..self.nodes[node_index].widgets.len() {
                if let Some(id) = &self.nodes[node_index].widgets[atom_index].behavior_id {
                    if id.0 == context.dialog_node_behavior_id.0 && id.1 == context.dialog_node_behavior_id.1 && id.2 == context.dialog_node_behavior_id.2 {
                        self.nodes[node_index].widgets[atom_index].atom_data.data = context.dialog_node_behavior_value.clone();
                        self.nodes[node_index].widgets[atom_index].dirty = true;
                        self.nodes[node_index].dirty = true;
                        self.dirty = true;
                        break;
                    }
                }
            }
        }
    }
fn update_from_dialog ( & mut self , context : & mut ScreenContext ) { if context . dialog_entry == DialogEntry :: NodeName { // Node based for node_index in 0 .. self . nodes . len ( ) { if self . nodes [ node_index ] . id == context . dialog_node_behavior_id . 0 { self . nodes [ node_index ] . text [ 0 ] = context . dialog_node_behavior_value . 4 . clone ( ) ; self . nodes [ node_index ] . dirty = true ; self . dirty = true ; context . data . set_behavior_node_name ( ( self . get_curr_behavior_id ( context ) , context . dialog_node_behavior_id . 0 ) , context . dialog_node_behavior_value . 4 . clone ( ) , self . graph_type ) ; break ; } } return } // Atom base for node_index in 0 .. self . nodes . len ( ) { for atom_index in 0 .. self . nodes [ node_index ] . widgets . len ( ) { if let Some ( id ) = & self . nodes [ node_index ] . widgets [ atom_index ] . behavior_id { if id . 0 == context . dialog_node_behavior_id . 0 && id . 1 == context . dialog_node_behavior_id . 1 && id . 2 == context . dialog_node_behavior_id . 2 { self . nodes [ node_index ] . widgets [ atom_index ] . atom_data . data = context . dialog_node_behavior_value . clone ( ) ; self . nodes [ node_index ] . widgets [ atom_index ] . dirty = true ; self . nodes [ node_index ] . dirty = true ; self . dirty = true ; break ; } } } } }
Updates a node value from the dialog
Updates a node value from the dialog
&mut self
context
&mut ScreenContext
&mut self
context
&mut ScreenContext