1
00:00:01,690 --> 00:00:07,900
OK, so now we want to be able to toggle back and forth between our menu here and that start screen,

2
00:00:08,260 --> 00:00:09,710
that start frame, right.

3
00:00:10,060 --> 00:00:13,720
So what we could do is just grab one of these guys.

4
00:00:14,980 --> 00:00:22,040
And I think above the exit, let's create one that is called home and let's give it a command of home.

5
00:00:22,450 --> 00:00:27,790
Now, we didn't create a function when we did all this stuff earlier, and we probably need one.

6
00:00:27,790 --> 00:00:32,410
So let's create one called the fine home, and we need to pass anything.

7
00:00:32,780 --> 00:00:34,900
And let's just put everything that's in there.

8
00:00:35,860 --> 00:00:38,470
I just hit the tab key, can't really tell until I.

9
00:00:39,480 --> 00:00:44,800
Scroll back over and you see everything's indented now let's see this frame.

10
00:00:45,270 --> 00:00:49,900
This needs to go on the outside with all of our other frames, right.

11
00:00:50,870 --> 00:01:00,680
So there we go and see what else, um, this function we're calling it right here in our menu.

12
00:01:00,710 --> 00:01:04,610
So this whole thing needs to be above the menu, just like physically.

13
00:01:04,610 --> 00:01:04,980
Right.

14
00:01:05,360 --> 00:01:10,820
So I copy this and bring it up here to above our menu stuff.

15
00:01:12,210 --> 00:01:13,790
OK, let's see.

16
00:01:14,910 --> 00:01:15,930
That seems all right.

17
00:01:17,350 --> 00:01:22,660
But now we've got this start frame, and if we.

18
00:01:23,600 --> 00:01:28,100
Toggle back and forth from like the edition back to the home, run back to the Ed. We're going to get

19
00:01:28,100 --> 00:01:29,050
that same problem.

20
00:01:29,060 --> 00:01:32,000
We have a couple of videos ago where it's just going to put it on the screen again.

21
00:01:32,000 --> 00:01:36,770
So we need to come up here to our hide many frames and let's add another one of these.

22
00:01:37,470 --> 00:01:41,440
So I'm just going to paste that in instead of divide frame.

23
00:01:41,450 --> 00:01:43,360
This will be the start frame.

24
00:01:44,280 --> 00:01:47,970
And we're already packed for getting it, so, OK, that looks good.

25
00:01:48,780 --> 00:01:52,370
All right, so let's save this and give it a run and see if I mess this up.

26
00:01:52,380 --> 00:01:56,170
I almost surely did because I did that very quickly.

27
00:01:56,790 --> 00:01:59,070
Yeah, it's not even showing anything here.

28
00:01:59,190 --> 00:02:00,290
Oh, I know why?

29
00:02:00,810 --> 00:02:03,630
Because we forgot to call it so.

30
00:02:03,630 --> 00:02:05,070
Here's our home function.

31
00:02:05,310 --> 00:02:07,950
When the program starts, we need to call that.

32
00:02:07,950 --> 00:02:13,560
So I'm just going to come down here right above our main loop here, and I'm just going to call home

33
00:02:13,980 --> 00:02:18,810
and make a little comment that says Show the start screen.

34
00:02:19,880 --> 00:02:24,890
OK, so this is how we call it a function, any function with Python, we just named the function.

35
00:02:25,220 --> 00:02:28,780
This will fire this thing and then all this other stuff will happen.

36
00:02:28,790 --> 00:02:33,600
So let's go ahead and save this and run it and boom, that worked.

37
00:02:33,920 --> 00:02:36,440
So if we click here for Edition, it goes to addition.

38
00:02:36,620 --> 00:02:37,490
Here's our home thing.

39
00:02:37,490 --> 00:02:40,740
We can go back to the home page, but, oh, something's gone wrong there.

40
00:02:41,510 --> 00:02:43,550
Let's see that I'm not.

41
00:02:46,280 --> 00:02:50,220
Let's see the start frame that should have worked, right?

42
00:02:50,250 --> 00:02:53,050
Right here we have two of these there.

43
00:02:53,220 --> 00:02:57,800
That's weird and that's why I pay twice accidentally.

44
00:02:58,820 --> 00:03:00,260
Not really sure how that happened.

45
00:03:01,820 --> 00:03:03,060
OK, maybe that's the problem.

46
00:03:03,080 --> 00:03:06,180
So let's hope that's the problem.

47
00:03:06,590 --> 00:03:06,830
All right.

48
00:03:06,830 --> 00:03:07,740
So Ed..

49
00:03:07,760 --> 00:03:09,230
Now we go back home.

50
00:03:10,790 --> 00:03:13,410
Oh, I know why we need to.

51
00:03:13,430 --> 00:03:14,030
OK, so.

52
00:03:15,010 --> 00:03:19,360
Let's look at one of our other things, like our divide thing, every time we call a function, we have

53
00:03:19,360 --> 00:03:25,320
to call our hide many frames and we're not doing that in home origo.

54
00:03:25,420 --> 00:03:26,940
Or you could just slap that in there.

55
00:03:27,220 --> 00:03:29,020
Now, it calls that hide frames thing.

56
00:03:29,170 --> 00:03:32,140
It hides all the things and destroys all the widgets.

57
00:03:32,140 --> 00:03:34,420
And everything should work just fine now.

58
00:03:36,330 --> 00:03:38,790
You would think, OK.

59
00:03:39,870 --> 00:03:46,710
So now subtractions or a minus one, we can go back home, all right, division, go back home, try

60
00:03:46,710 --> 00:03:52,220
division again, go back home again, multiplication, go back home.

61
00:03:52,230 --> 00:03:52,470
All right.

62
00:03:52,500 --> 00:03:54,990
Now, this is kind of starting to look like an actual app, right?

63
00:03:55,300 --> 00:03:57,810
We can navigate around from the start menu.

64
00:03:58,380 --> 00:04:02,980
You could do the same thing with an about page if you wanted to put some about information up or whatever.

65
00:04:03,330 --> 00:04:07,490
And of course, the X button boom still works the way it's supposed to work.

66
00:04:07,500 --> 00:04:09,390
So, OK, pretty simple.

67
00:04:09,720 --> 00:04:11,190
And I think that looks a little bit better.

68
00:04:11,190 --> 00:04:13,830
I'll leave it up to you to actually make that home screen look nicer.

69
00:04:13,830 --> 00:04:16,680
Like I said, you can put an image there or you could do anything you want.

70
00:04:17,010 --> 00:04:21,990
I just put some buttons there just to show us how to create that home screen and integrate it in with

71
00:04:21,990 --> 00:04:22,830
the rest of our app.

72
00:04:23,190 --> 00:04:24,750
And pretty simple.

73
00:04:24,970 --> 00:04:26,340
So that's all for this video.
