(self)
| 40 | self.show_outro() |
| 41 | |
| 42 | def add_details(self): |
| 43 | self.camera.frame.scale_to_fit_width(18 * 1.1) |
| 44 | self.project_root = m.Rectangle( |
| 45 | height=9.0, |
| 46 | width=18.0, |
| 47 | color=self.fontColor, |
| 48 | ).move_to((0, 1000, 0)) |
| 49 | self.camera.frame.scale_to_fit_width(18 * 1.1) |
| 50 | self.camera.frame.move_to(self.project_root.get_center()) |
| 51 | |
| 52 | cmd_text = m.Text( |
| 53 | self.trim_cmd(self.cmd, 50), |
| 54 | font=self.font, |
| 55 | font_size=36, |
| 56 | color=self.fontColor, |
| 57 | ) |
| 58 | cmd_text.align_to(self.project_root, m.UP).shift(m.UP * 0.25 + cmd_text.height) |
| 59 | |
| 60 | project_root_text = m.Text( |
| 61 | os.path.basename(os.getcwd()) + "/", |
| 62 | font=self.font, |
| 63 | font_size=20, |
| 64 | color=self.fontColor, |
| 65 | ) |
| 66 | project_root_text.align_to(self.project_root, m.LEFT).align_to( |
| 67 | self.project_root, m.UP |
| 68 | ).shift(m.RIGHT * 0.25).shift(m.DOWN * 0.25) |
| 69 | |
| 70 | dot_git_text = m.Text( |
| 71 | ".git/", |
| 72 | font=self.font, |
| 73 | font_size=20, |
| 74 | color=self.fontColor, |
| 75 | ) |
| 76 | dot_git_text.align_to(project_root_text, m.UP).shift(self.down_shift).align_to( |
| 77 | project_root_text, m.LEFT |
| 78 | ).shift(m.RIGHT * 0.5) |
| 79 | |
| 80 | self.config_text = m.Text( |
| 81 | "config", |
| 82 | font=self.font, |
| 83 | font_size=20, |
| 84 | color=self.fontColor, |
| 85 | ) |
| 86 | self.config_text.align_to(dot_git_text, m.UP).shift(self.down_shift).align_to( |
| 87 | dot_git_text, m.LEFT |
| 88 | ).shift(m.RIGHT * 0.5) |
| 89 | self.last_element = self.config_text |
| 90 | |
| 91 | if settings.animate: |
| 92 | if settings.show_command_as_title: |
| 93 | self.play( |
| 94 | m.AddTextLetterByLetter(cmd_text, time_per_char=self.time_per_char) |
| 95 | ) |
| 96 | self.play(m.Create(self.project_root, time_per_char=self.time_per_char)) |
| 97 | self.play( |
| 98 | m.AddTextLetterByLetter( |
| 99 | project_root_text, time_per_char=self.time_per_char |
no test coverage detected