All language subtitles for 65. Creating a Pause Menu

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

What's a ladder player to pause the game

And access the options from within the game itself

And also give the player an opportunity to quit to main menu and all that good stuff

Shut up we're going to be lazy aka efficient again and we're going to duplicate our main

New and used as the basis of our pause menu so let's go out and go to our

Scenes UI directory was duplicate the main menu

I'm going to call this pause menu

Alright let's go and open up the pause menu

Let's remove the Script

Let's remove the tiles

Let's rename a route now into pause menu

And let's remove the Vineyard

So now they left with this

And what we can do here at let's change the label to paused

You can make it all cabs if you want that might actually work

We can change that to pause

Change tv box containers minimum size

Subtitled by online-courses.club We compress knowledge for you!

2

Just to give it a little bit more

With fear and anger take the label and change the horizontal alignment to Centre

And I'm actually going to add another vbox container

And move all of the buttons into there

And the reason I'm doing this is because now

I'm going to change the speed box container

Instead of horizontal in the film

For the container sizing I'm going to change this to shrink Centre

And then I'm going to give it a minimum width of something like 75 in The xx

So I think that looks a lot nicer we've got a panel that has them with to it but then the buttons aren't Sue

Large

And I'm even going to change the box container custom minimum size to 100

Because I like that looks better

Alright so we've gone all of those in place and we need to change these options so we've got the play button

We want change this to resume

So can't resume button

Let's call the text resume

And then we'll use the options near Angela change the quick button to quit to menu

So that the players knows what's happening there

What does pause screen should look like

Let's open up our upgrade screen and making a copy this colour rectangle here

I'm going to just straight up ctrl c copy that colour rectangle

And paste it in the Pars menu

And I'll make it the first child of this note so that it sits over everything else

Now let's create an animation player underneath this pause menu

What's create a new animation with animation button new

Let's call it in

And for the colour rectangles let's keyframe the

Model

Keyframe by clicking the key icon and click create

Let's do .4 seconds my favourite

Animation Direction

And I'm going to set this first keyframe value on this colour rectangle

Alpha of 0

And then over .1 seconds or maybe

Other 0.0015 seconds so again

I've sent my snap 2.05 and my animation likes 2.4

Can you consume any with this lighter hair

And I'm going to change this second keyframe value which is at .15 seconds

To have an alphabets for

Play this is going to feed it

Like so

So now we don't make this margin container already of this panel container feed in

Now a pill container has a size

Of 174 by 136

And that is an obscene number

So I'm going to change the custom minimum size of the panel container to B18

NEX and 14th in the wife

Just to give it some even numbers

Ok so we've got that in animation playing for the colour rectangle

And I'm realising that we're not going to be able to animate this panel container

With the ambition play or can I have to use a tween

So can I change this

Animation Direction 2.15

Like some

Ok and then we will do a new animation

Call

Out and actually you know what we can do we could use the play backwards function so maybe all introduce

Play backwards function soldiers use one animation

Let's rename it by clicking animation rename

Default

Animation for our background

Let's create a script at the pause menu route here something to create that's great

And I'm here

Override a ready method I'm going to turn my animation panel off here

Sunday ready

Function animation player

Play

Default

So that's the first thing that we're going to do

How to create a tween for the panel container

Duvar tween is he go to create

We need to grab a reference to the panel containers so I'm going to

Select the panel container here and then

Mark the access as unique name

Let's create an already for that by dragging it over to the editor holding ctrl and then releasing

So those are on ready

And then in between were going to say tween that tween

Property

18 Wheeler property of the panel container

Where is a tween the scale property in quotes and then we're going to win it too

Becca 2.1

So that it goes to a 1:1 scale

And the duration was 2.3

Now we also need to do this when you do tween tween property

Are the panel container

And the scale

Twin at the Vectra 2.0

Over 0 seconds

And remember the reason that we do that

Is because

That will mean that the panel continue will be properly set to zero

Before

We start weaning the scale to 1

And that's mostly just like a workaround for a good a limitation to go really doesn't like animating

Control nodes that are children of containers

We can hack it a little bit by working with the twin the little bit

Ok I will do a new line at the end of this tween property line the second one and I'm going to do set

Is type out

And then set transition

To trans type back

So same as we're doing with the other UI elements here we also in the ready Metheny to connect to our buttons to

Give them functionality

Our resume button here we're going to connect to that

And the options and the quits

You can do just a straight up percent to reference the

Unique names like Sam

I do like to continue using the dollar sign just because it's consistent with

How you're usually get their node in a shorthand fashion

So you can just use the percent if you want to but I do prefer to do dollar sign present

And I connect to that press signal on the resume button

Like so

And I will say on resume pressed

Create that function

So in this method we need to play the animation player

Default animation backwards so that starts purple and fades up

Animation player

Play backwards

Defoe

It's that simple so you can get away with using a single animation if you're just doing it in and out

And then what we need to do is we need to create a twin

That is essentially the reverse of this so I'm going to copy these

Play stores in there

And we're going to go from vector to that one

To vector2

0

We need to do an ease in instead of an ease out

So basically the same idea here

And then we're going to do in a weight

Tween dot

Finish

And that's going to a wait for the to be done and then we can call

Q

Free

Ok now the thing about

Is that we want to pause the tree

When the pause menu

Comes into contact straight

So before we do the rest of the functionality for these buttons

Let's go ahead in the ready method called get 3 paws is equal to true

And then before the Q3 at the end here we're going to do get tree

Pause

Equals false

And then what we want to do is we want to click on the root node for the Potters menu

Are we want to scroll down to the process mode and so like always so it's not pausing itself

So it's all about and place we need a way to actually spawn the pause menu

When

Let's say when the escape about Mills pressed on the keyboard

Before we start doing the scene instantiation let's go to our project project settings

Input map

And then add a new action

Witches called escape

We can Car Parts car parts

And let's go ahead and under that action let's click the add button

And select this listening for input field and pressed escape

Thanks like ok

And then click again under pause and

Do something like pee and you can add whatever other keys you want as well

I've got escape and pea so we can go ahead and close the

And now

In our main menu

Moorside weather in our main scene so it's open up main which is different and main menu

Subtitled by online-courses.club We compress knowledge for you!

Open up that's crap

What's do the following

Let's preload

H

Pause menu so we're going to say pause menu scene

Is equal to preload

And then you can just do wrasse

Pause menu and load the scene

With the autocomplete there

No I need a override a function called unhandled input

So what is unhandled input so in put bubbles up through the tree until it is hanged

And

So when you override the unhandled input event

Essentially what this is going to do as this is going to

Be passed any input events that have happened

They have not yet been handled by anything else in the game

Is there with Arnold and what we can do as we can listen for the parse action

So we can do as we can say if event that is action pressed

Pause

Then we're going to instantiated pause menu scene

Sorry to say I'm child

Pause menu scene.in statue

When you handle input

In the unhandled input

Function

You need to tell Google

That the input has now been had

Anyway we tell guedel to set the input as handle that it doesn't continue propagating up the tree

Is we need to do get 3

Dart route

Start

Set

Input as handle

And that just means that whatever the current input event that is being sent through the tree is

That one is handled in stop its propagation

So nothing else will handle this event

There's one more thing that we need to do with regards to input handling and I'm going to copy this function

With control c so that the entire unhandled input

Can I get a paste that in the Pars menu as well

And what this is going to do is we are going to

Remove the scene

When input is pressed

Somebody get rid of this ad ChildLine

Porky Pig get free sat in his hand

And what I'm going to do is I'm going to create a function called close

I'm going to move all of this code into that

So I've just moved all of the owners impressed code into close

And then I was impressed I'm just going to call close

And the reason is because

I'm going to call clothes here as well

So close in The Angel Inn

Now one thing to note is that we will be able to call close multiple times

And perhaps even press the resume button multiple times

So let's create a new variable at the top cold is closing

And where does going to in here

Modify this if statement in unhandled input to

And not is closing

Just like so we can make this even cleaner

Weekend get rid of this and that we just add

And instead in here do if it is closing

Return

So

We can call close multiple times but it's just not going to do anything

If it's already closing

And then we need set is closing in here to true

So let's Run the game and see if we can pause while we're in the game so press escape

Alright that's looking good

And then press p

Perfect cell

It's basically working just fine

With the exception being

That the pivot offset is all wrong

So

Let's Close our game

And in here in are ready method we can before

We connected that resume button

We can say

Panel container

Dad

Davidoff set

Is equal to

Hello container dad size

/ 2 snowrunner game we should see the

It is animated around the centre

Rather than around

The corner

So now we've got a nice looking pause menu

And you can verify that the resume button works and all that good stuff

Alright so this is a long lesson but we've got two more buttons to build out so let's just get it done

Let's connect to our options button now so I'm going to copy this resume button line in arpad manuscript

Let's say options button

Presto connect

It should be on options

Yeah let's stop out the quick button as well so let's do

Dollar sign percent quit button

Depressed dartconnect

Arncliffe

Press

The quick button is going to be easy

Working as a fun

On quit

I'm going to do is to call get three

Change

Scene

To file

Change it to main underscore menu

Like cell

And then 4 Hour on

Options press

Function

We're going to need to add the options menu so let's just passed for now

Let's do like we do Elsewhere and preload

Pause are the options menu theme

So we're going to save our options menu is equal to preload

And then we can do RAS

Options

Menu Dad cscn

Just like so

And we can do an auctions press as we can save our

Options menu scene

Oral se options menu instance

And I'm actually going to rename this variable up here from option menu to options menu seen

So it's consistent with our naming things otherwise

And we're going to say in our options press via options menu instance is equal to

Options menu scene

Instantiate

And then we can just simply add that child so I'm going to say add child

Options menu instance

And then remember we have to connect to the back button

A options menu

Instant start

Back press

Connect

To call this on options

Back

Press

Ask read that function at the bottom

On options back

Pressed

And let's send in the options menu as a parameter solus specify the parameter option

Menu note

Like cell

And then we're going to

In r connect

Lying here

Do that bind

Options menu instance like cell

So then when we click back we're just going to call

Now we are going to introduce a transition but for now

Medical options menu

Dad

Q3

What's wrong the game and see if we can go into our options from our

Meme

So we

Got the past menus for options

And the options is not rendering on top of the pause menu

And this is a problem that we cannot resolve with the chemist later

So you'll notice that we're just adding

The options menu as a direct child of the pause menu which is the easiest thing to do

Instead of like trying to figure out the right place in the Sims 3

But it does come with hearing problems but this is typically is it resolve

We can go to options menu seen

Open the app

And for the options menu layer

What's just changed the layer 2

In addition to the Vineyard being too

And now and we go into the game and we click play

Open up our options menu

We can see that working well

Now I've been yet

Is not working which means that we can just put up to later 3 instead for the vignette

So with those changes

You should see the options menu with the Virginia around it properly we can click back to go back to the

What's menu and we can click resume

Anna let's just verifying really quick that are quit to menu button work

So that quit the menu is just about working however there is one final thing that we need to do

That is let's go to our pause menu

The problem is that when the quick button is pressed

We are changing the scene

To the main menu here but we are not on parsing the same tree

So let's just quickly do that

Get tree that has it got a false

And that will be great so now let's play

If I going to play

And I click the menu I should be able to go back in so I now should be

Able to go through this whole loop

Enter like all the options and all that good stuff

Alright and our pause menu is finished

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.