pub fn click(&mut self, button: usize) -> Result<(), ToolError> {
        if let (Some(cursor), Some(character_ref)) = (&self.cursor_result, &self.game_character) {
            let transaction = Character::click(character_ref.clone(), cursor, button)?;
            transaction
                .execute(self.universe_mut())
                .map_err(|e| ToolError::Internal(e.to_string()))?;
            Ok(())
        } else {
            Err(ToolError::NothingSelected) // TODO: slightly wrong
        }
    }
/// TODO: Should have click feedback in VUI, not via return value.
Should have click feedback in VUI, not via return value.
Should have click feedback in VUI not via return value .
pub fn click(&mut self, button: usize) -> Result<(), ToolError> {
        if let (Some(cursor), Some(character_ref)) = (&self.cursor_result, &self.game_character) {
            let transaction = Character::click(character_ref.clone(), cursor, button)?;
            transaction
                .execute(self.universe_mut())
                .map_err(|e| ToolError::Internal(e.to_string()))?;
            Ok(())
        } else {
            Err(ToolError::NothingSelected) // TODO: slightly wrong
        }
    }
pub fn click ( & mut self , button : usize ) -> Result < ( ) , ToolError > { if let ( Some ( cursor ) , Some ( character_ref ) ) = ( & self . cursor_result , & self . game_character ) { let transaction = Character :: click ( character_ref . clone ( ) , cursor , button ) ? ; transaction . execute ( self . universe_mut ( ) ) . map_err ( | e | ToolError :: Internal ( e . to_string ( ) ) ) ? ; Ok ( ( ) ) } else { Err ( ToolError :: NothingSelected ) // TODO: slightly wrong } }
TODO: Should have click feedback in VUI, not via return value.
TODO : Should have click feedback in VUI not via return value .
&mut self
button
usize