background top icon
background center wave icon
background filled rhombus icon
background two lines icon
background stroke rhombus icon

Download "Game Development / Unreal Engine 4 tutorial / #26 - how to create inventory. Widgets. Part 2."

input logo icon
Video tags
|

Video tags

Unreal Engine 4
UE4
разработка игр
создание игр
как создать игру
как создать инвентарь
инвентарь на unreal engine 4
слоты инвентаря
инвентарь
сохранение инвентаря
уроки по unreal engine 4
геймдев
на русском
блупринты
blueprints
how to create inventory in unreal engine 4
инвентарь unity3d
как создать инвентарь в unity3d
уроки по программированию
игровые движки
inventory
курсы по unreal engine 4
как создать игру на пк
как создать игру на андроид
виджеты
widgets
Subtitles
|

Subtitles

subtitles menu arrow
  • ruRussian
Download
00:00:03
Yandex fifth column and we see that
00:00:06
so ours are these uniforms
00:00:08
says the final will be filled
00:00:10
that is, now we can already enter the game
00:00:12
I click new game I click new
00:00:17
the game is like this and when I click
00:00:20
oh key as we see we have
00:00:24
inventory hi everyone, glad to welcome you
00:00:29
with 26 video lessons of the video course on anrial and
00:00:32
jet 4
00:00:33
this is the second part of which is devoted
00:00:35
creating inventory, let's do it now
00:00:38
let's go to the presentation and look at
00:00:41
a short tour of what awaits us
00:00:43
today I open the presentation and
00:00:46
I briefly wrote down here what we are
00:00:49
let's do it today but first we
00:00:53
will be needed inside bluprint or
00:00:55
inventory that we created already in
00:00:57
in the previous lesson create a function that
00:00:59
Yandex slots will be returned to us
00:01:02
the contents of this very slot and
00:01:05
in fact, this is the content we will be
00:01:07
display the widget too, that is, we will
00:01:09
display a picture of the quantity and also
00:01:11
we will have a link to this very slot
00:01:14
and after that we will start creating
00:01:17
slot widget in particular creation
00:01:20
I divided the slot widget into 2 here
00:01:22
stage is the creation of the visual part
00:01:25
also the creation of logic, that is, the creation
00:01:27
code the third point you will be creating
00:01:31
inventory widget
00:01:32
I also divided this point into stage 2 and
00:01:34
we will create a visual
00:01:36
parts and creating the logic and code after
00:01:39
how we create slots and create
00:01:42
inventory in particular this inventory and
00:01:44
we will also spawn these slots after
00:01:47
all we have to do is create logic for
00:01:49
displaying the inventory widget on the screen
00:01:51
that is, this widget will spawn
00:01:53
automatically when you spawn
00:01:55
inventory
00:01:56
he will spawn with us but at the same time
00:01:58
we will be as if invisible and last
00:02:02
the last fifth point is creation
00:02:04
logic for showing and hiding
00:02:06
inventory by pressing a key, that is
00:02:09
we will create inventory
00:02:12
ozu time immediately upon immediately during
00:02:15
creating the blueprint itself and the inventory but
00:02:18
it will be hidden and upon pressing a key
00:02:20
for example in particular because inventory
00:02:23
So I'll take the key a and press
00:02:25
on the oh key we will open and
00:02:27
close inventory
00:02:29
we can also close it by clicking on
00:02:32
the close key besides this I
00:02:35
brought small changes to those
00:02:37
system icons we used
00:02:39
which we imported into the engine on
00:02:41
the previous lesson in particular took the poison
00:02:44
got it from a free asset which
00:02:46
available in the store here's a picture
00:02:49
which will be our background
00:02:52
inventory, that is, this will already be the case
00:02:54
picture they are just systems systems
00:02:56
colors yes besides that I replaced them
00:03:00
a picture of an empty slot, that is, empty
00:03:02
our slot will now look like this
00:03:04
so I got it from there, well
00:03:08
and also here we have three options
00:03:11
buttons this button will be located with us
00:03:14
it is logical to assume from the top right and
00:03:17
there are three options here, this is an option
00:03:20
regular button on hover and
00:03:22
clicking regarding pictures and pictures
00:03:26
baskets and pictures of their allocated slot
00:03:29
we don't change them we leave them in particular
00:03:32
today when we will create ourselves
00:03:34
slot we will delete all these pictures that
00:03:37
we imported in the previous lesson and
00:03:39
with import those pictures that you
00:03:41
now you see on the screen that is, we them
00:03:44
we will replace
00:03:47
I also, in turn, want to express
00:03:49
thanks to the project sponsor
00:03:51
on patreon in particular we now have 3
00:03:53
sponsors two younger ones are Vladimir Koz and
00:03:56
Elvis site with not sure what's right
00:03:59
I pronounce
00:04:00
as well as one senior sponsor of this
00:04:02
Evgeniy Konnikov thank you for
00:04:04
support our project and as always we
00:04:09
let's start from the first point
00:04:12
this is creating a function to get
00:04:13
information about the code and unfortunately due to
00:04:17
I have a little technical hitch right now
00:04:19
I'm writing down this first point
00:04:20
already again because because of my
00:04:22
maybe these are carelessnesses there
00:04:26
5-7 minutes of the video were lost let's say
00:04:29
so let's go to the engine now and
00:04:32
I'll tell you that our first point is
00:04:34
is that we create a function
00:04:37
get slot
00:04:38
info forum index that is this one
00:04:40
the function is called we have children slot
00:04:44
info forum index what does it mean to receive
00:04:46
slot information by index
00:04:50
and according to the index of this very slot this
00:04:54
function should be drink functions that is
00:04:56
we put a tick here that it should
00:04:58
be drinking feature she has one
00:05:00
incoming parameter called index
00:05:02
integer type
00:05:04
that is, the number is up to the slot number and it has
00:05:08
three outgoing parameters first parameter
00:05:11
type boolean
00:05:12
which is called empty first first
00:05:15
the parameter returns the value empty or slot
00:05:18
or there is some object in it
00:05:21
further 2 2 output parameter we have
00:05:26
this sign is also called and its type is also
00:05:29
with the site there is a signal that there is a step structure there
00:05:31
signeda that is, like this
00:05:34
our function looks like this and this is it
00:05:36
this sign is also what we have
00:05:39
there is the inside of our slot itself yes
00:05:41
that is, this function will be us
00:05:44
used from widgets when we
00:05:46
we will call from the widget on the inventory
00:05:50
here is this function and submit it to Yandex
00:05:53
and receive information
00:05:54
Is this empty or is there something in it?
00:05:57
there is if there is something in it there and there
00:05:59
this way we can get out of it
00:06:02
this one inside these insides here
00:06:04
this internal structure as well as
00:06:06
quantity yes that is firstly what the
00:06:09
this yes this signature and theme and also
00:06:12
let me give you the quantity now
00:06:15
I'll show you how this word and this function
00:06:17
looks that is what the meaning is
00:06:19
that is, first we check if it is not empty
00:06:22
is it a slot, that is, we are this incoming
00:06:24
integer type parameter we use this
00:06:27
parameter we get one copy one
00:06:30
instance of a slot from an array of slots yes how
00:06:33
here is this array of slots for this array
00:06:35
we created slots in the previous lesson
00:06:37
we call the get function on it and submit it to
00:06:41
Yandex our incoming index
00:06:43
then we call the break slot like this
00:06:46
sign before then that's it
00:06:49
we now see there it's called here
00:06:51
this is it
00:06:52
from from class is valid class wow and
00:07:00
it connects here and that is that
00:07:02
what you can see on the screen that is
00:07:05
this is where we check if the slot is empty and
00:07:07
Let's further develop the logic, yes, that is, if
00:07:10
falls is telling us that this class is not
00:07:12
valid this means what is inside us
00:07:14
there is nothing inside this slot, that is
00:07:17
here we issue an empty one accordingly
00:07:19
ritter node and we put a tick here
00:07:22
empty yes, that is, we put a tick here
00:07:24
that this slot is empty both in the signature and in
00:07:27
the novel is in quantity and we don’t serve anything
00:07:30
in the same case when it shows that
00:07:32
this class is valid what's inside this
00:07:36
there are slots at this index
00:07:39
really some item is so classy
00:07:41
valid then we issue put
00:07:43
positive result positive
00:07:45
note, we no longer put a tick here that
00:07:48
it is empty and also on this one with altos
00:07:51
call the get close function we default
00:07:56
call the function get close default and
00:07:58
in fact, we serve it right there at
00:08:02
the way out is that everything is very simple, well
00:08:04
also that is, we serve as
00:08:05
here it is through functions baby with default
00:08:07
this signature is equal to the signature of the slot itself
00:08:10
and also and also the number of this slot a
00:08:13
also its quantity well on this
00:08:17
in fact, all the functions consist of
00:08:19
there is literally work in about minutes
00:08:22
for 7-10 years unfortunately original
00:08:25
I lost the video, what should we continue after?
00:08:28
what we are now starting to create
00:08:30
slot widgets in particular to the creation
00:08:33
his visual part let's let's we
00:08:37
let's start the first thing we do we
00:08:40
Now let's go to the inventory folder and
00:08:43
then let's go to ekans further systems and
00:08:47
I suggest this one, you see how we have it
00:08:49
where is this empty slot look but
00:08:51
he looked something like this
00:08:55
way I am now all this is all that
00:08:58
we have it here now, I'll delete it all
00:09:00
it’s like we don’t need mine now
00:09:03
Rome partner yes I'm opening just 5 here
00:09:06
these are their blanks, that is, ordinary ones
00:09:08
pictures in png format
00:09:10
I just highlight them all like this and
00:09:12
I move it inside here and also
00:09:15
when they were moved here
00:09:17
They are still configured for me as 2d
00:09:20
icons, the engine still doesn’t know what’s wrong with them
00:09:22
do where
00:09:23
why sort them accordingly?
00:09:26
right click here
00:09:28
eset actions next beam in front of you I
00:09:32
Damn matrix, click this
00:09:35
opening full screen beyond us
00:09:37
I'm interested in compression here
00:09:39
and level of detail in we call here
00:09:42
select in level of detail world change
00:09:45
to yuan and change compress and settings
00:09:47
on the user interface 2d because we have it
00:09:50
picture for the user interface and also me
00:09:53
here I press control with I that's all
00:09:55
saving closing
00:09:57
We don't really need inventory right now
00:09:59
let me close it and so we
00:10:03
imported everything, but into a new version
00:10:05
all these pictures and we will already be
00:10:07
work with them, that is, I will too
00:10:08
more interesting pictures now
00:10:11
let's get down to exactly what we are doing
00:10:13
let's do it, I go to the inventory folder
00:10:16
widget and I click here edits but
00:10:19
I’m creating reeds and a new bluprint widget
00:10:22
which I call as inventory slot wb
00:10:26
for shorthand I can just call it
00:10:29
How pin to slot w
00:10:33
vip like this and then I
00:10:36
I open it
00:10:38
let's take it this way
00:10:40
the whole screen and the next thing we do is
00:10:45
is in tune with him
00:10:46
size for this I choose here fil
00:10:48
I change screen to custom and set the size
00:10:52
like 64 by 64 is the size we need
00:10:58
after which we need canvas foam here
00:11:01
no need now I click next I and
00:11:04
deletes and is in place now as root
00:11:09
element I add site box
00:11:15
this is how I add the site here
00:11:17
boxing and then this xbox I'm posting here
00:11:23
like 64 by 64 actually here
00:11:29
you can create many widgets
00:11:31
the ways I do it is like this you can
00:11:33
basically do it differently then inside
00:11:37
this boxing site we add canvas
00:11:39
I understand I'm choosing here I'm looking for canvas foam
00:11:41
I add it here like this and
00:11:46
what should we do now next we are in
00:11:49
this canvas pencil case first of all
00:11:51
add a picture that will
00:11:54
display empty slot i.e. this
00:11:56
the picture that will be at the very end
00:11:59
there are, roughly speaking, the most rear
00:12:03
if our slot is not empty in this
00:12:05
in case we will add a few more on top
00:12:08
images and they will block and even that
00:12:11
empty slot but the first one now is what we are
00:12:13
we do I choose the image here
00:12:15
I drag the foam here into the canvas and
00:12:19
I'm setting it up and I need this picture
00:12:21
set the checkbox that it was and the spheres were
00:12:24
we don't need it here, that is, mine and
00:12:26
picture from the code picture of an empty slot
00:12:29
We will not change the warehouse
00:12:30
dough I write here what we have
00:12:33
background-image that is, background
00:12:34
picture of me writing
00:12:39
background-image
00:12:43
So, what do we do next?
00:12:47
I'll post it here next
00:12:49
anchor in the center further the size I put
00:12:54
64 by 64
00:12:57
further alignment I set 0.5 to 0.5
00:13:03
then I open the brush here and well, you can
00:13:08
select from the list here
00:13:09
Well, what did I do, I did it this way
00:13:12
I'll take it and go to the ekans folder systems empty
00:13:15
slot yes, that is, a picture of an empty slot
00:13:17
I go here and click this one
00:13:20
arrow and we have just the same
00:13:22
this picture is used like this
00:13:25
way we now have such an interesting
00:13:28
us will look like an empty slot then
00:13:32
let's go further further to us further to us
00:13:39
you need to add foam inside the canvas
00:13:41
I also choose one more picture
00:13:45
image I add foam to the canvas and that’s it
00:13:48
basically similar things only here here
00:13:50
I write that this is our iten icon
00:13:55
so here it is already important here already
00:13:58
you need to check the box that this is from faith
00:14:00
was because well because it’s like with us
00:14:03
since such variables we will go to her we
00:14:05
pancakes and will update until depending
00:14:07
depending on what item here it will be that I
00:14:09
I'll continue to do the same thing
00:14:11
Next I set the center to size 64
00:14:15
and by the way no by the way there is no 64 by 64 here
00:14:19
I want to take here like a62 to 62
00:14:24
this is what they do in order to
00:14:28
we could still see this outline
00:14:31
the slot itself is me so you can
00:14:34
basically do whatever you want next
00:14:35
alignment I put
00:14:37
0.5 by 0.5 like this
00:14:42
and what am I doing here I'm scrolling down
00:14:47
and here I scored a challenge with Rita
00:14:50
I remove the default display, I put it on
00:14:53
what was hidden like this
00:14:55
I also want to click this one here
00:14:58
this little eye this little eye so that we
00:15:00
I also can’t see this picture right now
00:15:03
there we can see it like this
00:15:05
the way she basically looks like you
00:15:08
understood if we were allowed to have it here
00:15:12
lay some object there and just
00:15:14
already from the code bring it and now for for
00:15:17
For the sake of an example, I’ll show you what we have here
00:15:20
so this picture will be
00:15:22
change to slot yes but now we have lots
00:15:25
there is none now I'm updating everything
00:15:29
It's hidden by default
00:15:30
I close my eye so that we don't
00:15:32
eyesore compal safe and basically with
00:15:36
we figured it out and then we
00:15:39
add another picture and this one
00:15:41
we will have a picture this will be a picture
00:15:45
dedicated slot, that is, we have it
00:15:48
it turns out when we have when we will
00:15:50
click on the slot, well, I just want you to
00:15:52
show I did what's possible
00:15:54
You can’t just allocate loop slots
00:15:55
You can select it by double clicking it
00:15:57
using a drag item
00:16:00
this dragging was possible but I
00:16:01
I've done it and I'll show you how to highlight it
00:16:04
this might be useful to someone
00:16:05
respectively made at the beginning at the beginning
00:16:08
the same thing I rename what it is
00:16:11
we should be like selected and match here
00:16:18
so we should have this
00:16:19
selected and we also place the ball next
00:16:23
tick and your fish since we are from the code
00:16:26
we'll hide we'll hide we'll hide
00:16:27
close then do the same thing
00:16:29
center snap next size here
00:16:32
important but maybe 64 to 64 because
00:16:35
the outline should be the entire slot here
00:16:38
thus 64 by 64 alignment zero.
00:16:43
this is the most 0.5 0.5 to further we also
00:16:48
we'll reveal it all now, we're here too
00:16:50
choosing visas bil ritu hai
00:16:52
this way, that is, this
00:16:53
we hide that he was not visible here either
00:16:55
we must now apply just the same
00:16:57
a picture, that is, a picture that
00:17:00
which will be superimposed on us
00:17:03
slot does not matter whether it is empty or not empty
00:17:05
when will this slot be allocated to us?
00:17:07
so I highlight here from
00:17:09
get slot garden picture like this
00:17:11
and here I press the arrow like this
00:17:16
way that is
00:17:17
what did you understand, this is how we will have it
00:17:19
look here we have it not highlighted
00:17:22
this is what it looks like before that is simple
00:17:25
the little black one is so empty
00:17:26
if we click if we highlight this slot
00:17:29
it will look like this
00:17:30
accordingly what we do yes
00:17:34
that is, I also tick here that
00:17:36
by default it was hidden yeah well
00:17:38
silent pump should not be highlighted
00:17:39
I put hidden here Hayden and
00:17:44
actually, yes, I use this one here too
00:17:46
marriage is basically all we need now
00:17:49
we can move on, I’m here again
00:17:51
I'm removing this little eye
00:17:53
so that it doesn't bother us here that we
00:17:56
we do it further we do it too
00:18:00
just now, by the way, we’ll add
00:18:03
we do the same thing only for the picture
00:18:06
no longer a dedicated slot but for a picture
00:18:09
when we I want to show you as an example
00:18:13
when we take some slot with
00:18:16
subject yes we will drag and
00:18:18
it is this illumination that will not
00:18:21
dedicated slot and backlight
00:18:23
exactly where we want to drag here
00:18:25
when we endure just this
00:18:28
now this is this this is the second
00:18:31
the selection we will now make
00:18:32
this is the backlight
00:18:34
which will happen when we take some
00:18:36
slot, click on it to start
00:18:39
drag and when we will
00:18:41
drag over other slots
00:18:42
this is the backlight
00:18:44
dragging over other fleets and doing
00:18:48
yes that is also what I take here
00:18:52
I drag the image like this
00:18:54
canvas foam I call it as it says how a
00:18:59
red
00:19:01
otherwise this is the same way we are here
00:19:04
need a tick what a tick what is this and
00:19:05
our fish and do the same in the center
00:19:08
here we update everything further also 64
00:19:14
on 64 this is how we do it
00:19:22
further further we also put on
00:19:24
by default it should be hidden
00:19:26
then I assign this selection the same
00:19:30
I also assign the picture itself here
00:19:34
this is the garden in the picture itself, just like
00:19:37
dedicated slot and only one
00:19:40
I just didn’t want to paint another picture
00:19:41
it's clear what I'm doing now, I'll choose tint then
00:19:44
I have a color overlay and I’ll do something like this
00:19:46
here it is
00:19:47
yellowish that is, what we can do
00:19:51
yes, that is, when we allocate
00:19:54
we will have a dedicated slot
00:19:57
the slot will have a white outline
00:19:59
such a white blue outline and when we
00:20:01
drag as if we are flying over
00:20:04
above other slots then we will have it
00:20:06
in yellow you can use two
00:20:08
different pictures this one is already like water
00:20:10
I just didn't bother drawing another one
00:20:11
why don't we have a drawing lesson?
00:20:14
our lesson now is programming and
00:20:16
I also hide it all by default
00:20:19
and I remove this little eye so that she can tell us
00:20:21
again, I didn’t waste anything and we go
00:20:24
next what do we do next next to us
00:20:31
need to add just what we need
00:20:34
add the number of slots, that is
00:20:40
if we have stacked slots then basically
00:20:42
quite convenient it is very common
00:20:45
practice in games what if slots
00:20:47
stack
00:20:48
then it is not necessary to point at this slot
00:20:50
so that in this drop-down window there
00:20:54
I wrote how many of them you have before and here
00:20:56
maybe just a small number here
00:20:57
sign to make it beautiful what happened
00:21:00
you can see exactly what we are now and
00:21:02
we are doing that's why I'm here writing a manor in I'm here
00:21:05
another boxing site, that is, we will be there now
00:21:07
site boxing and in this site there will be boxing
00:21:09
text I already basically know what
00:21:12
I need parameters
00:21:15
that's why I'm putting this boxing site up
00:21:19
his size is approximately 45 45 by 13
00:21:26
This is how I give him the position
00:21:32
1616 to 48 I'm already in front of
00:21:37
lesson looked how she would be more
00:21:39
beautiful, I already wrote it out for myself here
00:21:41
just the same location, that is, I want
00:21:43
place this sound here and inside
00:21:46
this boxing site will be just the same
00:21:48
now the numbers and we will now add it well
00:21:50
all we have to do is with this with
00:21:52
in the box you just enter the value, oh well
00:21:56
place it where you like, can I
00:21:58
bottom right you can bottom left you can
00:22:02
In short, wherever you want, it’s not so important
00:22:05
and now we add text inside
00:22:09
block I'm now playing with tits he chooses
00:22:12
here I add text inside this site
00:22:15
box and now we will set it up first
00:22:19
turn I write that this is our slot
00:22:24
I'll put a tick here like this because
00:22:26
we will update this number further
00:22:30
I set the alignment to right
00:22:32
let me put the size here right away
00:22:35
what I want the text size to be
00:22:37
small 10 pixels
00:22:39
here I want it to be an example
00:22:42
let him write 33 it doesn’t matter, anything is possible
00:22:44
write the number of dates and I changed it here
00:22:47
from here to this to but here to to
00:22:50
the right edge was you aligned well
00:22:52
approximately like this and actually and actually
00:22:55
that's all we added this way
00:22:58
this is the text meaning I have it by
00:23:01
by default here you can principle silently
00:23:03
hide and then from the call code from it
00:23:05
from the code tell me you are not so important then
00:23:07
there is what we are doing here we are
00:23:09
just add this number up to
00:23:12
this is the number that will sign
00:23:15
we get it like this and
00:23:19
actually now let's go back to
00:23:22
presentation for the reason that we only
00:23:25
what the
00:23:26
we just finished the first part 2
00:23:30
point that is, creating a slot widget we
00:23:33
just finished the visual part
00:23:36
and now we start creating the logic
00:23:39
and code
00:23:41
let's go back to ours now
00:23:44
workplace and I save again and
00:23:49
I go to graph next what I do yes
00:23:54
let's spruce up the beauty a little
00:23:56
I’ll delete these events now
00:23:58
if not we will need them later
00:24:00
let's call again the first thing I want to do
00:24:03
these are these these are these standard like
00:24:07
there would be variables but these are not really changes
00:24:09
these are the components, that is, these
00:24:11
standard components I want to add
00:24:14
here in the category for them
00:24:16
it was possible to roll it up like this
00:24:18
they didn't seem to interfere
00:24:20
since there will be a lot of variables so that
00:24:21
we're not confused, that's why I'm here now
00:24:23
I am writing to the type, I have selected any before the change
00:24:26
I’m writing here types of gastrointestinal tract year you are like this
00:24:36
aiko no category no evening component
00:24:41
this is how the widget component is and here it is
00:24:44
like this in this way I take turns
00:24:46
I just want everything clean for the sake of beauty
00:24:49
these system variables are from here
00:24:52
shove it so we can do it like this and for
00:24:54
it’s just beautiful to close that’s all
00:24:57
I wanted to do it here and now it’s ours
00:25:00
the task is to create the first two variables
00:25:03
we will have one variable for change
00:25:05
this will be the signature slot signature as
00:25:08
right here
00:25:10
the slot signature is just like this
00:25:14
all his insides that is
00:25:16
the name is a description of the picture like this
00:25:19
just the slot itself and also its quantity
00:25:23
for this I press plus wearable
00:25:25
I call this variable like oh there
00:25:29
zegna yet
00:25:32
this is how I call it like oh there
00:25:34
sign is also the type I choose as with item cic
00:25:39
niche under this way everything is very simple
00:25:44
change oh there with Ignasha type with the site
00:25:48
strongest and also create a second variable which
00:25:53
I call it e-mount that is quantity
00:25:56
and the quantity will be like an integer
00:26:00
so let's move on further
00:26:08
necessary including variable
00:26:11
inventory, that is, these slot widgets
00:26:15
we will you we will spawn from the very
00:26:19
inventory and so that later on these
00:26:23
slots call logic in the parent
00:26:27
inventory which is currently not available for this
00:26:29
we just need a variable in now
00:26:32
which to a variable widget type variables
00:26:36
variables such as the widget of the inventory itself
00:26:40
which we when spawning from intel from
00:26:43
we'll put the inventory there, sat down in that is, how
00:26:45
the widget itself and we will call
00:26:47
because we don't have a budget right now
00:26:49
inventory for this we go here to
00:26:52
folder widget and we want and still don’t
00:26:54
We are also creating an inventory widget now
00:26:57
We'll come to this a little later, I don't care
00:26:59
I'm creating a new widget here now
00:27:01
blueprint and I write that we have it and well, that is
00:27:05
inventory double yu bi that is widget
00:27:10
inventory purely so that we now
00:27:12
could create a variable of this type
00:27:15
so that the caste does not come to us there
00:27:18
I had to do accordingly
00:27:20
what I did here is create a variable which
00:27:24
I call both inventory and wbf
00:27:35
this is how the kernel entry in in wpf
00:27:39
the type should be just the same inventory and
00:27:42
wgn that is exactly what you should do
00:27:45
be inventory widget inventory object in
00:27:49
france and now and now we already have to
00:27:54
check the box here for both of us and Rita
00:27:56
were exhibit x pauses he was sleeping what is this for
00:28:01
done if we call now let's say
00:28:03
no matter where Freud is widgett like this
00:28:07
So let's bring this equipment here
00:28:09
and slot under thus and on fleet wb up
00:28:14
so that we can submit here
00:28:15
that is, we will have such a function
00:28:17
call from the inventory itself and here we
00:28:20
We will supply the inventory itself here
00:28:22
we will have this variable already
00:28:24
parental equipment, as it were, which
00:28:26
created all these slots
00:28:27
now I'm deleting this and that we also
00:28:31
we must do also we must do this
00:28:34
the variable should probably be placed in
00:28:37
category which I will name as x pauses it
00:28:40
spawn expose it spawn like this
00:28:46
and also here we have another x pose to expose him
00:28:51
he was sleeping we need to set another variable
00:28:55
blueprint a
00:28:56
inventory and also yandex yandex here
00:29:02
this slot is exactly why we
00:29:04
let's do I'm creating another one here
00:29:08
the variable which I call as a slot
00:29:12
Yandex Yandex
00:29:18
this is how the type should be
00:29:20
the integer is like this and also exists
00:29:23
here I tick the instance box and Rita was
00:29:25
ecstasy
00:29:26
he was sleeping he and I choose a category here
00:29:28
expose he was sleeping so I want this one
00:29:32
my index was here
00:29:36
I want him to be a little taller then
00:29:40
Basically I like it so simple and probably
00:29:43
and here we also create another one
00:29:45
variable which is on
00:29:46
will be called as baby equipment and f
00:29:50
that is, just one more variable
00:29:53
which will store a link to
00:29:55
Beppe's inventory
00:29:59
inventory and lion like this type
00:30:04
this variable will be our inventory
00:30:07
baby equipment and facility in France also
00:30:13
I put a tick
00:30:14
it was expansion span I select the category
00:30:17
how x pauses did he sleep well and I guess I want
00:30:22
place it here accordingly
00:30:25
let's sum up what we did we
00:30:27
first created two variables 1
00:30:30
variable is the slot signature and this
00:30:33
signatures Lenin Ventura Artem who
00:30:36
stores information about
00:30:38
in alts further amount and there is quantity
00:30:41
next three variables x slider spawn
00:30:44
which will be when creating this
00:30:46
our slots will continue to be filled
00:30:50
give out I'll show I call will come
00:30:53
the widget is further here and but like this
00:30:59
way inventory slot and how we blame
00:31:01
us here when creating this slot in particular
00:31:04
from the widget we will do this we come here
00:31:06
let's add the slot index, we'll add what
00:31:09
link to blu brin inventory for that
00:31:14
to call functions from it and also
00:31:17
link to the widget itself, that is, here it is
00:31:20
us blueprint
00:31:21
this is what we have, this is what we get
00:31:25
bluprint of inventory and in this we have a widget
00:31:29
inventory yes, that is, print inventory and
00:31:31
inventory widget I don't think that's it
00:31:34
it's worth stopping and we move on
00:31:38
next we create next we need here
00:31:40
create a custom event that will
00:31:43
called update slot that is
00:31:46
the main event that will be
00:31:49
be called in order to
00:31:51
that's why it's a yandex slot
00:31:55
so that it’s just 5 by index
00:31:56
update the information we will call
00:31:58
this function update slot every time
00:32:02
when will something change with us?
00:32:04
slot yes that is if we do something
00:32:06
we always dragged his place we are there
00:32:08
we changed something we always update
00:32:10
we will always update that's why I create
00:32:12
here is a custom event I am writing this here
00:32:14
cars.com
00:32:15
event this is how I call it
00:32:18
custom event like update slot here
00:32:24
so I call it an update
00:32:27
slot and now we get down to it
00:32:31
creation
00:32:32
first of all what should we do
00:32:34
we need to check not empty
00:32:37
whether the slot I call immediately branch and holding down
00:32:40
this is how I call the by key
00:32:43
scolding what do we do next next we're on
00:32:46
inventory, just call that one
00:32:49
function that we just got into
00:32:52
at the beginning of this lesson we created just
00:32:54
get slot
00:32:57
info from index yes and that's what we are for
00:33:00
made her drink functions so that we
00:33:02
It’s just that she didn’t have to be here
00:33:04
this is how we do things, we know
00:33:06
like this empty yes that is my city we will be
00:33:08
check whether the slot is empty or not
00:33:11
Yandex look beautiful it turns out Aug
00:33:13
Yandex music dance loot index that is
00:33:15
everything is simple like this
00:33:19
just like that and right away I want it here
00:33:23
comment that we are not checking this
00:33:25
whether the slot is empty, check if it is empty
00:33:31
let’s create a slot like this now
00:33:36
logic if the slot is empty and if the slot is not
00:33:40
acute
00:33:41
if our slot is empty then what are we
00:33:45
do we first need an icon
00:33:50
himself
00:33:52
item yes, that is, even if before that
00:33:54
for us, this slot was not empty, and even for us
00:33:57
this
00:33:58
this ikan item was filled when
00:34:02
it was filled like some kind
00:34:04
picture accordingly we need it
00:34:07
hide it so it doesn't exist accordingly
00:34:09
I take alt m ikan here and here
00:34:12
I call the white visa set function
00:34:15
set scales bilerem this way it is
00:34:19
Same the same setting that we have here
00:34:23
visas were set to white by default
00:34:25
hidden Hayden I connect here and
00:34:31
I choose white visas as the owner, that is
00:34:34
if we have slot is empty if the slot is empty then we
00:34:38
there is no item icon in it, we don’t have a date in it
00:34:41
he's on it's just hidden this icon is there
00:34:43
there is nothing and we must continue the same way
00:34:46
just hide the e-mount slot here
00:34:49
this slot and mount we are here
00:34:51
did so we can even copy
00:34:54
this function again and here take a
00:34:57
e-mount slot this way
00:35:00
here and also we hide the quantity
00:35:06
items since there is no quantity
00:35:08
not here, also choose Hayden here
00:35:12
I also select this, press the C key and
00:35:15
here I write what it is
00:35:17
if the slot is empty then we have processed
00:35:22
logic update slot yes there is a slot
00:35:26
empty that is, if the slot is empty we
00:35:27
remove the picture, the picture remains
00:35:29
empty slot and also if we have there
00:35:32
something was written down in quantity then here it is
00:35:36
these numbers once accordingly
00:35:38
We also remove these numbers, that is
00:35:41
they will also have these numbers
00:35:43
removed and it will be just clean
00:35:45
slot as for these selected ones
00:35:48
here we will have separate functions
00:35:50
who will set it all up by the way
00:35:52
you can say that but it doesn't matter like that
00:35:57
way we processed if the slot is empty and
00:36:01
we'll process it now
00:36:03
if the slot is not empty, then there is
00:36:06
and the slot is not empty what do we do first
00:36:08
first of all
00:36:10
you need to write down these two
00:36:13
variables that is, we have a variable
00:36:15
alto m sec ney ball and
00:36:16
e-mount so what do we do I choose
00:36:19
here alto m s and bottoms like this
00:36:21
let's stretch it out a little something like this
00:36:25
and e-mount that is, so that you understand us
00:36:28
now that's when we update the slot for us
00:36:32
I just need it, I can do it like this
00:36:34
copy and call here again and
00:36:38
connect like this here and like this
00:36:41
here but I think it will be easier here
00:36:43
connect this way without calling
00:36:49
this function again that is, if we have
00:36:52
if our slot is not empty if in it
00:36:56
there is some object then we are this object
00:36:58
is written to the iTunes variable
00:37:00
And
00:37:01
notes change and little we do
00:37:05
further Well first of all by the way we are here
00:37:06
I should also comment, I write that
00:37:09
we are recording the slot signature here
00:37:15
so we are recorded here
00:37:17
slot signature and I have this tick here
00:37:19
I clean it up like this, what do we do next?
00:37:26
Next we need to ask
00:37:29
just the icon, that is, just like that
00:37:31
this is the item micon we need
00:37:34
here
00:37:35
ask her a picture that is, I'm here you
00:37:39
without calling the function s et ses bras
00:37:48
texet
00:37:49
this is how I hang it here and what
00:37:54
we do further further cause this
00:37:56
secession this way we can
00:37:58
take it from here but I don’t want it anymore I want it
00:38:00
to make the code more beautiful
00:38:02
accordingly, here we can either take
00:38:04
like this break yes and take it here 2d
00:38:07
akon or you can just do it right away here
00:38:10
here right mouse button split path pin
00:38:12
this is how we serve it here
00:38:16
and the texture too, that is, that’s what we
00:38:19
in slot
00:38:20
let's go back for a second
00:38:23
the prince has class with this chicken lek
00:38:27
here we come 2d ikan that's when we created it
00:38:30
when we created this smoking m here
00:38:33
chicken leg we asked this one
00:38:35
picture and, accordingly, here I am
00:38:38
I can already close this picture here
00:38:40
we’ll take it from here and accordingly
00:38:42
besides what we asked us here also
00:38:45
need to show yes, that is, we are working on
00:38:47
by default this item is hidden
00:38:51
yes, that is, this is the picture of it
00:38:52
initially hidden
00:38:53
well, we also have a slot here
00:38:56
empty then we also hide here
00:38:58
so I call in principle also
00:39:00
function set from and white can copy
00:39:02
insert hang and I put here
00:39:09
disable this is what we do
00:39:13
further further here you need this
00:39:16
comment everything out and I want to write
00:39:19
that we don’t even set the slot icon
00:39:23
slot and item set the icon
00:39:28
item in the slot like this we
00:39:32
set and show this picture here
00:39:38
something like this and after which we still need
00:39:43
do the last ones here
00:39:44
this is the branch we need
00:39:47
to find out if it stacks
00:39:49
subject or not, well, it’s logical what if
00:39:52
subject 10 or not even so if subject
00:39:56
stacks then there is a point here
00:39:58
display the quantity but if the item is not
00:40:02
stacks then we are here, why if
00:40:05
he won't stack if he can only be
00:40:07
singular give me this armor
00:40:09
then it usually takes one to accept the reservation
00:40:11
slot for this, some twigs are not coal for me
00:40:14
there's gold there, but that's when we can't
00:40:18
you need to display this number here
00:40:20
numbers and accordingly further I call
00:40:23
here branch for now let's see what I'm doing
00:40:25
sat I call here branch
00:40:27
also I call oh there signage and I call her
00:40:30
I open it and here I connect it just
00:40:34
I finally made a deal here
00:40:36
as the kiss the cable that is, I'm here
00:40:39
I check I check it doesn’t stack years and
00:40:46
the pace is like this, that is, we
00:40:50
we check whether the tempo and
00:40:53
accordingly further if it stacks
00:40:59
here it is if it is labor that is if it is
00:41:01
stacks then we take the e-mount slot
00:41:04
this is how we choose a slot
00:41:06
e-mount I'm on it on this slots mount
00:41:10
I call the function set text I call
00:41:16
function set text like this and
00:41:19
I'm connecting here the corpse, what are we doing?
00:41:23
further and then I select e-mount here
00:41:26
variable e-mount to quantity and
00:41:28
I’m just falling straight here basically
00:41:31
here are the default settings for
00:41:33
default suits me, that is, here we are
00:41:36
so we submit here the quantity yes
00:41:39
if he stacks I'll probably be here right away
00:41:42
because of comment what if it stacks
00:41:45
then we display the quantity if
00:41:50
stacks then display the quantity here
00:42:01
Thus
00:42:06
I press compal saif and if she doesn't
00:42:10
stacks then I just take the slot
00:42:13
e-mount this way and this e-mount slot I
00:42:17
just call the function let me
00:42:20
you can copy it, take the type
00:42:22
control with I call visa set here
00:42:26
take it and post it here as Hayden hidden
00:42:32
yes that is, if we have
00:42:34
he if our item does not stack then
00:42:37
we just don’t display this number
00:42:39
then we hide it like this and
00:42:42
I’ll also write here for commenting that
00:42:47
if it doesn’t stack, hide the text
00:42:54
the quantity is like this, that is, and
00:43:01
doesn't stack then we hide the text
00:43:04
quantity press compal press safe
00:43:08
Well, the last thing I still want is for us
00:43:11
here remove these checkboxes and the last thing
00:43:15
what do we need to do I want this
00:43:17
it's all together again I want it like this
00:43:25
I want to do it all again together
00:43:27
comment and I'll do it
00:43:33
I sign that if the slot is not empty, here it is
00:43:39
so let me burn here
00:43:41
ticks
00:43:42
there won't be that's what we saw in
00:43:44
in general terms, that is, here we have
00:43:46
here is the logic yes that is if that is here
00:43:55
here we check if the slot is empty
00:43:57
if the slot is empty then we go here, this
00:44:00
We display everything and if the slot is not empty
00:44:03
then we display it here now, well
00:44:09
and what did I just I almost forgot this
00:44:12
what we are missing here is another function
00:44:14
when are we after
00:44:16
filling in the information just the same
00:44:19
number of items in slot we we don't
00:44:23
we display just these on the screen
00:44:26
numbers as we can see we have them here
00:44:28
we hide yes and here on these numbers
00:44:31
now we hide it and here are the slots again
00:44:35
mount array hide accordingly
00:44:37
besides that we are here besides
00:44:40
what we are providing here is the meaning we need
00:44:42
also show, that is, display on the screen
00:44:43
so I'm copying and pasting here
00:44:46
white services
00:44:47
this is how I choose here too
00:44:51
called yes, that is, except that we
00:44:54
if we update the slot if in the slot
00:44:58
is there something yes and if it is something
00:45:01
stacks then we not only
00:45:04
we display that we are serving some kind of stuff there
00:45:07
value yes, that is, enter that number
00:45:09
we must also display on
00:45:10
screen since we hid it until a little
00:45:13
don't forget and we just finished how
00:45:17
Well, that's it for the second part of the second
00:45:20
point is the creation of logic and codes
00:45:23
there is so we have already created
00:45:25
visual part
00:45:26
and the logic and code for creating the slot widget and
00:45:29
we're moving on to the third
00:45:32
now we have to create the item itself
00:45:37
widget inventory, that is, we are already starting to
00:45:40
the first part of paragraph 3 is the creation
00:45:42
inventory widget creating it
00:45:44
visual part
00:45:46
let's go back to the engine
00:45:50
inventory slot my time on we can now
00:45:53
close I go to the inventory folder and
00:45:56
then I go to the widget folder we are already
00:45:58
previously just created here
00:46:01
Janusz wb jan is short for inventory
00:46:04
and you can just write the full name
00:46:06
what is this inventory and and I open it here
00:46:09
this fidget bluprint I call it all
00:46:12
screen and the first thing I want to do is
00:46:14
give him a different size
00:46:18
in particular, I want to put it here as
00:46:20
custom and register it as 364
00:46:27
at 400 like this, that is, this
00:46:32
will be the size of our amber in principle
00:46:35
You can take any size of amber, I just
00:46:37
For example, I took this one
00:46:40
what do we do next next to us
00:46:44
you need to delete this canvas by
00:46:46
canvas fell and paste here with zbox checkout
00:46:50
which is what we're putting in from here as well
00:46:56
need to be delivered
00:46:58
rewrite this is what you write here
00:47:00
we are 364
00:47:04
at 400 like this, then inside
00:47:09
this boxing site i insert canvas
00:47:13
Panova I take canvas foam and add it here and
00:47:17
further inside this canvas back
00:47:20
I'm inserting a picture it will be the background
00:47:23
I'm pasting the picture here and below
00:47:29
I'm setting it up
00:47:31
well first of all I want to be here
00:47:33
indicate that this is our inventory and on n
00:47:38
2
00:47:39
background like this, tick that
00:47:46
from wearable I'm cleaning here since we
00:47:49
we will not change this background dynamically and
00:47:52
further here we make settings, that is, I
00:47:55
I set the alignment to center
00:47:57
further size of this picture I make
00:48:00
exactly the same size as this
00:48:02
widget that is 364 by 400 after which
00:48:08
alive I put 0.5 here 0.5 and then I
00:48:15
I use this as a picture
00:48:19
that picture
00:48:20
inventory that we have today
00:48:22
imported the oceans with a claim and here we have
00:48:25
we have inventory and we have this one
00:48:27
picture I highlight it here and here I am
00:48:31
I press this arrow and how can we
00:48:33
see
00:48:34
let me take the size one to one
00:48:36
this is how it will be in the game so we can
00:48:39
see
00:48:40
then our abro inventory acquired something like this
00:48:43
picture of what next we are inside this to
00:48:49
this canvas panel should place the site
00:48:52
boxing further we come here inside to the back
00:48:56
put the site box and immediately I probably
00:49:00
change and what we will have
00:49:03
header underscore
00:49:09
says box that's how we are with this
00:49:15
making this site boxing will be here
00:49:22
on top and inside it we will place ourselves
00:49:25
text title what is our inventory a
00:49:28
also a close button, that is, there’s more
00:49:31
close button
00:49:32
accordingly what are we doing I'm here
00:49:34
Anchar I put the alignment in the center
00:49:37
here already in advance for yourself
00:49:39
prepared the coordinates where it should be
00:49:41
maybe you can imagine poisons area of ​​hands
00:49:44
at least with your hands like this somewhere
00:49:45
put where you want next size i
00:49:50
I want to put here like 348 like 348 on
00:49:57
32 this is how it can be done temporarily
00:50:01
reset further like mine I want
00:50:04
set as 0.5
00:50:06
and 0.5 and also the offset along the y axis, that is
00:50:12
up I take
00:50:14
-170 7.5 I already pre-nicotine
00:50:18
you know I already have it selected for you
00:50:21
you can do it yourself like this
00:50:23
bring it closer and adjust it all because
00:50:26
you need this way we
00:50:32
it was placed where we need it next
00:50:35
inside this hadith from boxing you need
00:50:37
place place another canvas foam
00:50:40
canvas print is just such a thing
00:50:42
very convenient to place everything in principle
00:50:44
you can get by with other elements
00:50:46
it's not so important and further inside this
00:50:49
canvas foam we add one more
00:50:52
site box I take the site box and put
00:50:54
inside canvas further this site box
00:50:58
you need to configure it, I highlighted it here
00:51:01
I put the anchor of this boxing site at
00:51:04
center tick that this change tick
00:51:07
that we shouldn’t set this as a variable now
00:51:10
necessary because we turn to him
00:51:12
this boxing site will not be the only one
00:51:14
what I want to sign is that we will have this
00:51:16
name underscore site box here
00:51:20
so that is, this will be the site
00:51:22
boxing where will be recorded just
00:51:24
after all our name will be posted here
00:51:27
name after which we need
00:51:29
put the size in my case
00:51:32
it will be 120 by 25 and then here we are
00:51:39
put it in the center and
00:51:40
alignment I set it to 0.5 and here it’s 0.5
00:51:45
so I post this site box
00:51:48
in the center and then inside it from
00:51:51
box I place a text block
00:51:55
I select a text block here and place it
00:51:59
inside this boxing site and setting it up
00:52:02
first of all I will put the font here
00:52:04
to be 14 further alignment I
00:52:07
I put the text in the center: in principle, we do not
00:52:13
We'll probably rename it anyway
00:52:15
because we won't go here
00:52:16
They don’t even tick their albums for us.
00:52:18
What is needed next is the text itself, I’m writing here that
00:52:22
This is our inwin inventory
00:52:26
this is how I write what it is
00:52:28
I want to put the inventory here next
00:52:32
another shadow I take here shadow color
00:52:34
I just set the black one to maximum
00:52:37
if we are now
00:52:38
Let's take a closer look, they've already appeared here
00:52:39
these are the small shadows, and I would also
00:52:44
I wanted to put
00:52:46
a slight color shift, that is
00:52:49
take here color i color and up a sore
00:52:51
and put some color here
00:52:55
a little bit beige
00:52:57
something like this, something like this
00:53:02
I press compal I press safe and how we
00:53:06
we can see we already have it here
00:53:08
sign that this is inventory
00:53:10
All we have to do next is add it here
00:53:12
button for this we are inside this
00:53:16
canvas we place another website box
00:53:21
place another website box like this
00:53:25
in the following way I set up my
00:53:29
I choose I choose alignment here already
00:53:34
on the right edge like this further
00:53:37
I want to put the size as 32 by 32
00:53:43
Next, this is what I want to reset and so that
00:53:46
With us, she didn’t become here, but became here
00:53:49
in short, you understand where it should be
00:53:52
accordingly, here you need to put already
00:53:54
not 0.5 by 0.5 but here you need X
00:54:00
put
00:54:01
one and then it will be just like that
00:54:03
the place where we have
00:54:04
and there should be a close button okay
00:54:09
ok further inside I'll put it here too
00:54:13
can you write here again what it is?
00:54:15
it should be 32 by 32, well, I guess
00:54:19
I’ll just write this, in principle it’s not absolutely
00:54:21
it doesn’t matter, but I’ll write that we have it here
00:54:25
I'll write what we have here
00:54:30
claus loaf underscore website
00:54:37
box like this, that is, I wrote
00:54:39
just to make it clear what we have here
00:54:41
inside there is a button to close and
00:54:43
Accordingly, what do we do next?
00:54:45
inside this box we place the most
00:54:48
whatever it is, a regular button like this
00:54:50
so it fits here with us
00:54:53
Next we have this button
00:54:55
adjust to adjust to her
00:55:01
Now let’s highlight her first
00:55:03
rename it, I write that we will have it
00:55:06
claus underscore baron that is
00:55:10
this is our button to close is
00:55:12
very well yes that's right
00:55:15
then I open style
00:55:17
I put sounds I put sounds by pressing and
00:55:24
our standard hover sounds
00:55:27
sounds we always use
00:55:29
and also now I open normal here and
00:55:33
normally I put the picture here
00:55:37
this is the norm, that is, the norm is normal
00:55:40
the normal appearance of the button when it is not pressed and
00:55:43
the bear is not pointed at her
00:55:45
accordingly, I click the arrow here
00:55:47
this is where we assigned normal
00:55:51
then open i have a red I'm here
00:55:54
I'll take it, I'll lighten it up a little
00:55:56
when we move the mouse it moves a little
00:55:58
lighter flock I choose here says here
00:56:01
so I close it too
00:56:03
and asks that she be a little darker
00:56:05
this is how she asks, here she will be
00:56:11
a little dark like this
00:56:16
way in principle in principle if we
00:56:20
we want, we can in theory already look
00:56:23
what will it look like
00:56:26
it will be, well, how narrow it will be
00:56:29
we can just give back and display
00:56:30
Let's just see how it is out of curiosity
00:56:32
will look like I'm choosing now I'm going to
00:56:36
folder yuan main had further still here
00:56:40
user wings goes and searches here for them navy wb and
00:56:46
just pull out and what are we now
00:56:48
saw I'm launching the game now we have it
00:56:50
there will be nothing to react to but we
00:56:52
just let's see what she looks like
00:56:53
let's see how we load
00:56:58
the first boot always takes longer
00:57:00
time it's normal here we loaded
00:57:05
I can probably even press the game and pause
00:57:08
yes and so but it overlaps a little but
00:57:11
I think it's okay, you can do it like this
00:57:13
do and now we have a button that
00:57:17
we can also call push in
00:57:20
in principle, these sounds are the sounds of pressing
00:57:21
it would be a little too much to change
00:57:23
too loud but that's not what we're talking about now
00:57:26
there is as we can see now like this
00:57:28
let's pour in our inventory
00:57:30
so let me close it from here I will close it
00:57:32
I will delete it because we will not call them
00:57:34
so he will spawn us all this will happen
00:57:36
done in code and not by hand
00:57:38
accordingly main had we can too
00:57:40
close and we move on now I can
00:57:45
close header
00:57:47
that is, we ended up with these cedars
00:57:51
we can close it completely and that we
00:57:53
do further inside the canvas panel already
00:57:56
this big canvas pencil case brings us here
00:57:59
add another softbox
00:58:01
I take another boxing site and add it here
00:58:05
here in this way further to us
00:58:08
this canvas foam is coming
00:58:10
add y or rather not canvas pelle
00:58:15
but this boxing site we have to
00:58:17
set up at 1 o'clock I want to call him us
00:58:20
what is this you will have a lower slot
00:58:23
underline site box like this
00:58:27
boxing site in which there will be just the same
00:58:29
located slots further anchor anchor
00:58:33
alignment I want to put here by
00:58:35
this can be reset to zero in the center
00:58:37
further, in principle, alignment I can
00:58:40
put immediately 0.5 by 0.5 further size
00:58:46
the size I want to put here is 344 I
00:58:52
I already adjusted it, I already know these sizes 344
00:58:57
at 270 that is, this is the place where this
00:59:02
the size where we will have
00:59:03
we still have exactly the same acid and lower
00:59:06
there will be a basket and we also need more
00:59:08
y-axis offset y-axis offset by
00:59:13
-18 and 5 minus -18. 5 like this
00:59:19
and we have placed a boxing site where they will be
00:59:23
our slots are posted
00:59:25
our inventory slot it's basically here
00:59:27
well, almost perfectly fitted
00:59:29
in principle it is possible according to you according to possible
00:59:31
to drive more ideally at the moment is not
00:59:34
so interested
00:59:37
what do we need to do next next
00:59:40
inside this boxing site slot boxing site
00:59:44
we need to add a scroll box to
00:59:48
in principle we can not add it
00:59:51
I'm just adding this as an example to
00:59:54
promotion sense I'm in this specific sense
00:59:56
I will make 20 slots in my inventory
00:59:59
so that without rights without scrolling
01:00:01
that is, I will have it right here
01:00:02
one two three 4 5 5 by 4 20 and 20 lots
01:00:08
but basically what you understood is possible
01:00:10
add any number of slots
01:00:12
it will scroll, that is, to
01:00:14
just this scrolling was me
01:00:16
here I'm looking for a scroll box like this and
01:00:21
I add this scroll voice inside
01:00:24
I also want this knees this one
01:00:27
the scrolling place was always visible then
01:00:30
Here you can check the always box
01:00:32
show scroll bar this is how I want it
01:00:36
I like her that's why I'm here
01:00:38
I put a tick, you don’t have to tick it
01:00:40
there are also a lot of others here
01:00:43
various parameters, including
01:00:45
change the texture and color of this stripe
01:00:48
scroll to
01:00:49
but I'm leaving everything by default now
01:00:52
what do we do next next here
01:00:55
need to add unipharm grid pants
01:00:59
unipharm clip pencil case we have already encountered
01:01:01
when we created
01:01:04
menu displaying loading slots
01:01:07
there is a unipharm grid pencil case this is what it is
01:01:10
panel where you can very beautifully
01:01:12
adding child elements is just that
01:01:15
after all, we have rabble as child elements
01:01:18
and there will be our slots, what did I do, I'm here
01:01:20
also uniform
01:01:22
unipharm grid final and add this one
01:01:25
unipharm smokes n well, here inside and
01:01:29
next this univ he will penalize us
01:01:32
I have to configure it, I added it
01:01:35
next I want to rename what it is
01:01:38
there will be us
01:01:40
I want to convey what it will be like for us
01:01:43
bottom slot as bottom slot
01:01:47
underscores but like this
01:01:52
further definitely definitely here
01:01:54
put a tick
01:01:55
is very well for the reason that it is
01:01:58
us variable and we will be here poet in
01:02:00
write this variable just like that
01:02:02
slots
01:02:03
Well, the last thing we need here is
01:02:06
I just know for myself what will happen
01:02:09
more beautiful if we are between slots
01:02:12
let's put one, it's not a bixel, but well
01:02:16
essentially pixel goods in the original gap
01:02:19
well, as if in the original sterling
01:02:21
there is like one unit
01:02:23
like the indentation before what was the indentation between
01:02:26
slots
01:02:27
in one I'm putting this here
01:02:31
indents to one and that's it
01:02:34
let's go back now let's go now
01:02:38
let's go back to the presentation and that's it
01:02:41
just finished the first one already
01:02:44
half 3 3 points toys creation
01:02:49
visual part, that is, we just
01:02:50
finished creating the visual part for
01:02:53
inventory widget and now we get started
01:02:57
to creating the logic of the widget itself
01:03:00
inventory go back to the engine
01:03:04
let's go to the Hungarians and start with that
01:03:07
what we usually start with let's delete
01:03:09
we can use these extra screws later
01:03:12
always call
01:03:13
and the first thing I want to do is these
01:03:17
our variables that we got
01:03:20
throw the inheritance from the widget itself into
01:03:22
I want to create a separate category for them
01:03:24
category widget component as we
01:03:27
we've already done it before so that we have them
01:03:29
more concisely designed I create here
01:03:33
or I don’t even have to create it and can go in
01:03:35
here I can immediately go here widget
01:03:38
company I can copy here
01:03:43
Thus
01:03:44
and here the same create the same category
01:03:48
and after we created such
01:03:54
we need to create a category
01:03:56
variable to set to
01:03:58
expansion spawn in which we will be
01:04:00
write down a link to the inventory itself
01:04:03
that is, the same as we did before
01:04:05
there we create a variable
01:04:06
I call this variable as gp gp
01:04:12
outwardly underlining inventory and in
01:04:18
accordingly the type of this variable
01:04:20
must also be beppi
01:04:22
Edwin 3 this way and also we
01:04:28
here we put a tick and nose and retail &
01:04:30
expo zones spawn next we need
01:04:32
create a variable type variable
01:04:36
an array in which we will store the array
01:04:38
all the slots that we create we can
01:04:42
principle to create this change later
01:04:45
or create let's do it right away
01:04:47
I'm creating another variable here
01:04:50
I call it like slot widget and ray
01:04:53
I'm writing a slot I'm writing a slot widget next
01:05:02
variable type
01:05:03
I choose as inventory slot double bin
01:05:08
like this the reference object is here
01:05:11
I no longer check the boxes and rhythm and
01:05:13
expansion spawn since we'll be here
01:05:17
record from this same bluprint
01:05:19
and from this code and exage it goes without saying
01:05:24
we forget to put here what we have
01:05:26
there should be an array after this for us
01:05:29
we need to create a variable that we
01:05:31
let's hang it on a begin play which will be like
01:05:34
once again, which will generate
01:05:37
just generate and all ours
01:05:40
inventory slot in it widgets on
01:05:42
based on the slots we already have
01:05:45
there is a printer inventory in the very corner
01:05:47
so what are we doing I'm creating a new one
01:05:50
function new function and call it generate
01:05:54
slot widget I write here
01:05:57
generate slot
01:06:01
widget this is how I create this
01:06:05
function immediately I go inside this
01:06:10
function we will put it on the event
01:06:13
contractual and put a contract on the event
01:06:15
after we have already created it and
01:06:17
accordingly what we have to do here
01:06:19
do the first thing we have to do is
01:06:22
clear this array on that man on
01:06:26
in case it is already filled
01:06:28
some
01:06:29
some slots and we also need
01:06:32
This slot foam should also be cleaned for
01:06:36
so that we already know for sure if we are in
01:06:38
in the future we will add logic when this is all
01:06:41
will be updated well that's for us now
01:06:43
need that is what we do I call
01:06:46
now I spin the variable slot and call
01:06:49
function clear to on this variable
01:06:52
clear all jen I'm writing here
01:06:56
clear charger like this no no everything is correct
01:07:00
is it from strangers what does it mean to clear everything
01:07:03
child elements, that is, inside us
01:07:07
us inside this panel of slots like
01:07:11
since we may have just the same
01:07:14
there may be and will be our slots, that is
01:07:17
if I open here now the user smokes then
01:07:20
here with me
01:07:21
if I take our inventory slot wb I
01:07:27
I can move it here
01:07:29
and as we see it will appear here
01:07:31
in the same way I can move it here
01:07:34
second slot but what is the second slot we have
01:07:36
were displayed they are now displayed in
01:07:38
in one place we have just the same
01:07:40
this is the inventory and this is the foam slot here
01:07:43
this uniform gould foam she has here
01:07:46
parameters such as columns and columns
01:07:49
and now we have row here
01:07:51
these are more accurately columns and rows, this is row
01:07:56
this is our strings and this is our stake
01:07:58
columns accordingly if I come to you
01:08:00
I’ll write one here, then we see what we have
01:08:04
this is how they were placed
01:08:07
we'll have three and I'm here to
01:08:09
already in callum I will indicate 2 then they
01:08:14
will be placed like this if I
01:08:17
I'll put another slot here and write here
01:08:20
in column 3 we won’t have it anymore at 4
01:08:24
columns to from zero and also we have here
01:08:27
there should be 5 columns accordingly
01:08:28
if we come here I add a fifth column
01:08:30
adding to her
01:08:32
y and or rather when I add 5 slot here
01:08:34
I’m adding this slot for the fourth time
01:08:38
Yandex fifth column and we see that
01:08:41
so ours is this uniform
01:08:43
says the foam will fill
01:08:45
and accordingly before filling it out
01:08:47
we need to clean it up
01:08:49
option in case it already exists
01:08:52
filled so what we do is this
01:08:55
we don’t need it now, so I’m deleting all this and
01:09:02
Accordingly, I clean this one here
01:09:05
this layer here this slot back and also here
01:09:07
this slot widget is ray
01:09:09
I call the clap function on it, that is
01:09:13
so I clear this array where
01:09:15
we will record these slots and
01:09:18
right away I want to comment on this
01:09:21
I want to write that we are cleaning here
01:09:23
old meaning that's how we
01:09:31
clear the old values ​​and move on
01:09:35
then we go through the cycle
01:09:38
Let's go through the array of slots
01:09:41
which we have right in
01:09:43
inventory
01:09:44
That's why we created just the same
01:09:46
a variable where we will write the link
01:09:48
on inventory in inventory we have
01:09:50
variable array of slots which
01:09:53
it's called a slot, I write here get slot
01:09:57
get slot this way
01:10:00
and then we call the cycle cycle on it
01:10:04
which will run through all
01:10:07
according to all indexes, accordingly, I’m here
01:10:09
I'm writing forum club I'm writing here for each
01:10:14
club under thus after this for
01:10:18
more beautiful code so as not to delay here
01:10:20
these indexes these pasta somewhere
01:10:22
very far away, I immediately suggest this one
01:10:25
local index write to local
01:10:28
a variable that I will call as as
01:10:32
local and ray
01:10:33
I will write down the index local and ray
01:10:40
Yandex this is how I put it on
01:10:44
execution and what we do next
01:10:47
Next we create just the same widget
01:10:50
slot, that is, what we get from us
01:10:52
one by one from this
01:10:54
from this array of our slots is taken
01:10:56
each and starting there from the first to
01:10:59
last
01:11:00
first we record it in local
01:11:03
changes just so as not to drag on
01:11:04
we'll need these later
01:11:06
notes a a little further and accordingly
01:11:09
Next we create a video I'm writing here
01:11:11
wings widget I call the function here
01:11:14
edge widget and
01:11:16
I call this widget as inventory and
01:11:20
or rather I call this widget which
01:11:21
called
01:11:22
inventory slot like this and
01:11:25
next we have to apply here
01:11:27
certain values ​​first
01:11:29
Yandex Yandex with us we submit from here
01:11:32
we take the index from here, that is, what
01:11:35
we had the index in the corner of the print
01:11:38
the index is passed to us and to the slot widget
01:11:41
what do we do next next we need
01:11:43
submit a link to the inventory bluprint
01:11:46
what we were doing now was roughing and inventory
01:11:48
and RF and I drop here the link to bluprint
01:11:51
inventory and we also need to in
01:11:55
win and w bin inventory and on widget
01:11:58
widget is stupid rindo accordingly here in
01:12:01
where we are, that's why I'm writing
01:12:03
here with lcl which means yourself and that is
01:12:06
we rise here ourselves
01:12:09
this is roughly how it should be
01:12:12
look after what after what this
01:12:16
go out
01:12:17
our goal is just that
01:12:19
write to this array here in this one
01:12:22
an array of words into this array of slots
01:12:26
slot widgets accordingly I call
01:12:29
this array and calling the function, etc.
01:12:39
then after to after we added
01:12:42
and wrote down this created slot
01:12:45
inventory in the array next we need it
01:12:49
just add it to this one
01:12:51
this and this uniform smokes foam
01:12:55
what we do is I take slot foam and
01:12:58
I call the function this child and uniform
01:13:05
grid like this, that is, we
01:13:09
we add it to this slot and to the content
01:13:12
just let me do it like this
01:13:15
it was beautiful, we're adding it to the content here
01:13:18
this same widget as for these
01:13:22
columns of these rows and
01:13:26
speakers
01:13:27
We'll deal with this a little later now
01:13:30
Now let's create some functions
01:13:32
who will calculate for us what goes where
01:13:34
need to be given so that it is correct
01:13:36
count a little here
01:13:37
mathematics I'll show you how it's done
01:13:41
a little later now next the last thing
01:13:44
we need to do this call on
01:13:46
widget created by us on a widget created by us
01:13:49
slot widget update function, that is, how
01:13:52
we remember and how we remember
01:13:54
we have an event update in the slot
01:13:57
which everyone updates, that's what we have to do
01:14:00
immediately as soon as we create a slot and also
01:14:04
after any manipulations we must here
01:14:06
call this event accordingly that I
01:14:09
what I'm doing here is calling the update function
01:14:12
update slot function
01:14:27
and now I offer it all
01:14:30
comment let's start here
01:14:32
this is this place we are a little
01:14:35
Let's comment, I'll write here what we
01:14:38
let's drive away, I'll write that we drive away everything
01:14:42
inventory slots in a cycle
01:14:59
we run through all inventory slots in cycle a
01:15:02
also next we create widgets here
01:15:06
cells we write an array and add to
01:15:08
widget
01:15:09
inventory that is what we do I it
01:15:11
I also highlight this part and write that
01:15:14
is it we create cell widgets or
01:15:21
you can say slots let's write
01:15:23
slots, then we write them into an array and
01:15:36
add an inventory widget
01:15:43
like this after which I click
01:15:46
compal and compal and safe and in fact we are this
01:15:49
the function is almost finished
01:15:52
what we have to do now is calculate it
01:15:54
these columns and columns and columns and
01:15:58
lines
01:15:59
what we are doing now
01:16:01
accordingly let's we are here now
01:16:03
we must first create here
01:16:05
variable slot ru
01:16:07
that is, how many slots should we have
01:16:11
in one line, that is, we write it
01:16:14
now the slot is like this
01:16:23
the variable must be of type integer
01:16:27
so it's like an integer and I'm here
01:16:30
I suggest writing down 5 because like us
01:16:33
I just saw this size
01:16:36
times ideal for 5 slots in
01:16:40
line five slots line
01:16:42
accordingly I created this one here
01:16:44
variable and then we create a new one
01:16:47
function which I call get
01:16:50
that is, in turn I write here as
01:16:54
get low I'm creating a get low function here
01:16:58
this function must have two inputs
01:17:02
parameter and one exiting, that is, like
01:17:06
we can see here that is she should
01:17:08
firstly it must accept the index
01:17:11
mother index and quantity this is
01:17:14
translation is a variable slot
01:17:16
what are we doing I'm creating two inboxes
01:17:19
parameter I these incoming parameters
01:17:22
I call it like ray yandex and slot sparrow
01:17:27
I write that this is our array index type
01:17:33
there must be an integer pit slot and
01:17:40
slot-o-pol this way too
01:17:44
we must also have an integer type
01:17:49
rain should be an output parameter
01:17:51
also a type of integer which is called
01:17:54
already on the floor like this ken roll
01:18:00
what we do next is very simple here, and we
01:18:04
must
01:18:05
in this function divide only
01:18:09
divide
01:18:10
as a fleet we should divide this like this
01:18:13
array array Yandex and slot row that is, but
01:18:17
we have to split this 1
01:18:19
as if completely, that is, we must
01:18:22
It’s easy to get exactly the same results
01:18:24
that is, what am I doing here I am writing the fleet I
01:18:27
here I write fleet and here I write divide
01:18:30
there I call the function fleet divide by
01:18:33
fleet but we will divide the integer
01:18:35
and as a result we will still write
01:18:38
only the whole part, that is, the fractional part
01:18:40
with us it will fall as it happens
01:18:42
why does this happen is a question for
01:18:44
mathematics, that is, it just works out
01:18:46
how to calculate so that we have
01:18:50
a certain number of slots
01:18:51
and if we want some
01:18:54
there was a certain number of slots
01:18:57
in the line accordingly how to calculate
01:19:00
what index should be in what place
01:19:02
accordingly, here we are now
01:19:05
function that calculates the location
01:19:07
exactly in the line
01:19:09
that is, I take and connect this here
01:19:12
this is what I connect here and the result is
01:19:16
I also connect to the output, that is, we have
01:19:19
should look like this
01:19:21
way on this and this pound
01:19:24
almost created just the last thing
01:19:26
this should be a drinking function so that we don't
01:19:28
I had to hang it on the nodes
01:19:30
accordingly we created the get function
01:19:32
low
01:19:33
and then I close this function and I
01:19:37
I'm creating another function that I
01:19:39
I call get feces, that is, to receive
01:19:41
column column number I see here get
01:19:47
columns if I'm not mistaken then she
01:19:51
Callum looks like this and that's it
01:19:57
right that should also be
01:20:00
your function first and also
01:20:01
it must have two input parameters
01:20:04
which is called as the same as ray
01:20:09
index as well as ray yandex and slot
01:20:15
spearow this way and ray yandex and
01:20:23
words and also must be outgoing
01:20:25
a parameter called yang stake here
01:20:32
so what do we do next
01:20:35
further further we need to come here
01:20:42
add a function such as division with
01:20:47
stay and
01:20:48
we are just interested in staying
01:20:52
we do what it should look like
01:20:54
what do we do I call this function
01:20:56
how how de vision hall and wonder
01:21:02
this is how I call this one
01:21:04
next function I connect ray yandex
01:21:08
here as a dividend and then a slot
01:21:11
sparrow as a divisor if I'm not mistaken
01:21:14
I think I’m not mistaken and here’s what follows
01:21:17
this remainder we put in the column
01:21:21
why is this already a question for a mathematician because
01:21:23
that's how it works, I did this function myself
01:21:26
didn't invent here and blind and and
01:21:30
I looked and this is the function
01:21:35
Well, if you think about it logically then
01:21:37
she's just all that
01:21:39
and he thinks this is part of us a little
01:21:41
mathematics so it will already be
01:21:44
we should count exactly the columns, that is
01:21:46
This is the function we will be calculating
01:21:48
columns what we do next next I
01:21:51
I'm closing this one
01:21:52
then I close this function
01:21:56
I'm going back to Henry's function
01:21:58
generate slot widget and then we take
01:22:05
get low function
01:22:07
hang it here next get callum hang it
01:22:11
here and what we do here
01:22:16
here we provide the v-ray index just the same
01:22:20
just this local variable
01:22:23
this local variable local
01:22:25
index but so that it's like this here
01:22:28
don't drag it all too far, I'll take it from here
01:22:31
I add it here and I also add
01:22:35
this variable here further into the slot
01:22:39
sparrow we, in turn, add a sparrow slot
01:22:42
that is, here we must write how much
01:22:44
we want just the same slots in the line
01:22:51
and also here I add a slot on this
01:22:55
in fact, we are just ready ready
01:23:01
a set of functions that determines how much
01:23:03
need how to automatically calculate
01:23:06
which slot which lot index goes to
01:23:09
which line and which column
01:23:12
then all we have left is this
01:23:14
comment and I write that this is us
01:23:19
set them by slot set them by inventory slot
01:23:30
arrangement in columns and rows
01:23:39
their arrangement in columns and rows on
01:23:43
we're completely done with this
01:23:47
this function and what remains for us is this
01:23:50
functions hang on the event constructs I
01:23:54
I'm calling here
01:23:55
I call the event contract here and then
01:24:02
here I hang the function generate slot
01:24:05
widget that is immediately after
01:24:08
we have an event construct like
01:24:11
only we create this widget
01:24:13
widget
01:24:14
inventory immediately with us automatically
01:24:17
slots are generated and I write that this is us
01:24:20
we generate a fleet and this way
01:24:26
in a similar way only to us
01:24:28
a little even simpler, we are also here in one
01:24:32
from the following lessons most likely in
01:24:33
next lesson we will also be here
01:24:36
add and cart that is also with us
01:24:39
still naive constructs along with this
01:24:41
more functions will also be added
01:24:44
generating a cart like this
01:24:46
So with this I want to go back
01:24:50
into the presentation and see what we have
01:24:54
we just finished it completely
01:24:56
third point we have finished creating
01:24:59
logic and code for the widget
01:25:02
inventory and what we still have left is
01:25:04
creating widget display logic
01:25:07
inventory on the screen and call and rather
01:25:10
opening and closing this very thing
01:25:12
inventory
01:25:13
what are we doing let's go back
01:25:16
back here back here we go back to
01:25:19
engine and start creating something like
01:25:23
spawn for this very widget widget
01:25:27
will not spawn on us
01:25:30
after all, a new element and it will be
01:25:32
be added to the canvas panel of our
01:25:35
the main main course of which we have long
01:25:37
created a long time ago if I go to the folder and
01:25:40
here we have main had just like this
01:25:43
this is the one
01:25:44
hide it doesn't matter
01:25:46
okay, just like that, in the canvas pencil case
01:25:51
this main move, that is, here we have
01:25:53
that would be the logic
01:25:58
accordingly, we now have this one
01:26:00
canvas pencil case needs to be placed here
01:26:03
check mark what is this
01:26:04
from to fish in order for us
01:26:07
could contact him after
01:26:10
we checked the box here and the spheres were
01:26:12
my this very main had we can now
01:26:15
close already
01:26:16
then we need to return to
01:26:18
inventory
01:26:20
you need to go back to the bluprint inventory itself
01:26:22
I come in Prince I open Pepe's inventory
01:26:25
and here we need to create a new one
01:26:28
function which will be called as
01:26:31
circles from inventory and
01:26:32
widget, that is, itself from the very
01:26:36
bluprint itself
01:26:37
inventory we will now spawn and
01:26:40
add a panel to canvas to canvas
01:26:42
inventory widget panel I'm creating here
01:26:45
a new function that I call like me
01:26:48
I call it how the widgett inventories affect
01:26:58
this way and here the first thing we
01:27:03
should do is call the function here
01:27:07
krait widget I'm calling a function here
01:27:12
client widget and we will call
01:27:16
inventory we will call our
01:27:20
we must submit the inventory here immediately
01:27:23
ourselves, that is, we are in print
01:27:25
inventory and accordingly should go here
01:27:28
submit in general like this get
01:27:32
reference to sell like this and further
01:27:38
then what you get is just the same
01:27:42
the resulting inventory object is this one
01:27:45
we write directly to the variable i
01:27:47
I click here about the mold Vera had and I
01:27:50
I call it like pinov w
01:27:55
byd
01:27:58
this is how I call it like in wpf
01:28:02
this is for everyone and we comment, I write that it’s us
01:28:05
create an inventory widget and record
01:28:08
it into a variable like this
01:28:22
create an inventory visit and record it
01:28:24
into a variable
01:28:26
after which we must open it
01:28:29
since since
01:28:32
despite the fact that we immediately create it
01:28:34
but it must be created but we must not
01:28:35
see him that is when we enter
01:28:37
the game is being created by us but by us
01:28:39
is as if immediately hidden therefore
01:28:42
what are we doing at this very facility
01:28:45
I call a function such as set everywhere
01:28:48
pylori I call the function set visa white
01:28:52
and select hidden here like this
01:28:55
that is, we are
01:28:56
hide I also want to comment on this
01:28:59
what we are turning off here what we are
01:29:02
turn off visibility
01:29:08
inventory
01:29:09
I write that we are turning off visibility
01:29:12
inventory
01:29:13
after we created it and hid it
01:29:16
we just need to add it
01:29:19
here is that software, the canvas foam from Maine
01:29:22
according to what we are doing here
01:29:25
we already have in blu print inventory we
01:29:28
in advance just like that
01:29:30
created a variable which
01:29:33
previous lesson which stores
01:29:36
which stores a link to a link to
01:29:40
main had here he is we have me here
01:29:42
I call this same main to move on
01:29:46
canvas is now available to us
01:29:49
foam 0
01:29:50
I select here get canvas foam zero
01:29:53
after which I call the function on
01:29:57
adding a new element there like this
01:30:01
until child toucan you this way I
01:30:06
I call the function and child toucan you
01:30:09
and accordingly in content in content we
01:30:12
we add just our widget
01:30:16
our created screw widgets row let's
01:30:18
I did it like this
01:30:28
and that is, accordingly we create
01:30:31
inventory widget, write it to
01:30:34
variable then turn it off
01:30:36
visibility and then immediately add it and
01:30:40
add it to the canvas panel, what do we do?
01:30:43
need further further in order to
01:30:45
its size was displayed correctly so that
01:30:48
it wasn't blown all over the screen like that
01:30:50
sometimes it is necessary here on here
01:30:53
this panel canvas object needs
01:30:56
call a function such as a set like this
01:31:02
function like set out a site is important
01:31:06
function and and here you need to put
01:31:08
tick and and you need to call this project for
01:31:11
so that it doesn't get blown all over there
01:31:13
sometimes it happens to the screen not sometimes but
01:31:15
it happens and the last thing we should do is
01:31:18
do this indicate the position in the canvas
01:31:21
panels on the screen to indicate
01:31:24
sit down position must be called like this
01:31:26
function like set position such function
01:31:31
like the set position and right here
01:31:34
add a position on the screen where we want
01:31:37
this is to add that is, essentially it is a canvas
01:31:40
we have the panel for the whole size
01:31:42
change the screen size and accordingly
01:31:45
we must register somewhere in which
01:31:49
We won’t write everything in narrow coordinates
01:31:51
no coordinates it will be on the left
01:31:53
upper corner that is, we are in the 2000s
01:31:55
coordinates spawn here we have
01:31:57
function set position submit here needed
01:32:00
two 2d vectors, that is, a structure of two
01:32:04
fleet of variables or not even fleet I
01:32:06
I click here you need three lines
01:32:08
really the fleet and we need it here
01:32:10
submit here we need to submit value in
01:32:14
what point horizontally and vertically
01:32:17
verticals where to place where on the screen
01:32:20
place exactly what is being created
01:32:22
us widget initially what we do for
01:32:26
to get the center basically
01:32:29
done as the get function is called
01:32:33
function getview board says
01:32:36
accordingly, it is also issued here
01:32:39
this is the corpse
01:32:40
cheers in the sense that gives us our
01:32:43
resolution that is, we have full hd 1920 on
01:32:47
1080
01:32:48
then accordingly here it is issued for
01:32:51
in order to spawn in order to
01:32:53
spawn in the center we are already with this
01:32:55
encountered in one of the previous
01:32:57
lessons in order to do something
01:32:59
get screen center coordinates
01:33:02
you just need to divide by 2 that is
01:33:04
you need to divide the width by 2 or rather
01:33:07
show size horizontally divide
01:33:09
by 2 and also divide vertically by 2
01:33:12
so here I take the fleet divided into
01:33:16
fleet the same thing I duplicate here
01:33:20
we will do the same here and here
01:33:23
we divide by 1.3
01:33:27
well, for example, I want me a little
01:33:29
so that it is slightly shifted to the right then
01:33:34
there is so that it is not in the center but slightly offset
01:33:35
to the right and on the game I take
01:33:39
I’ll divide by two and accordingly this
01:33:42
the resulting value is the resulting value
01:33:45
I add the value here again here
01:33:49
so this is how we have it
01:33:53
it turns out that we will add
01:33:57
it turns out that we are creating a widget
01:33:58
inventory that we record it further
01:34:01
here is the variable after we
01:34:03
we wrote it into a variable, we turn it off
01:34:07
its visibility after we
01:34:08
turned off visibility, we add it to main
01:34:11
had in canvas panel further technical
01:34:15
function to prevent it from being blown all over
01:34:17
screen and further function set position set
01:34:21
raised to ask
01:34:25
set the location to in this case I
01:34:28
I take the location there a little bit in the center
01:34:30
shifted shifted to the right and I'm this
01:34:34
I highlight everything, I highlight it all and
01:34:37
I comment that we are what we are
01:34:40
add it to the screen
01:34:42
its in the sense of an inventory widget
01:34:49
this is how we add it to
01:34:51
screen and essentially, well, even if we can
01:34:57
add writer but it's not necessarily us
01:35:01
a writer of notes can give here and in fact
01:35:03
We have already completed this function, and then
01:35:07
when we created this function and
01:35:09
the last thing we need to do is we can
01:35:10
close it already, we can close it too
01:35:13
construction I don’t need to go to the port
01:35:15
accordingly, the last thing we need is
01:35:17
do it hang her on event begin
01:35:20
glue as we remember and war gameplay
01:35:23
us works in two modes if we
01:35:25
create a new game then we will resize it
01:35:27
create this widget of so many slots
01:35:30
there's a slot [ __ ] we need
01:35:32
and if we have this loading game and
01:35:34
saved files then we were initially still at
01:35:38
during the creation of this there was
01:35:41
bluprint and we sent equipment here for
01:35:44
there from the character from where we are from
01:35:47
created we already supplied the value in
01:35:49
slot in small slot if from golosin
01:35:51
in short, we remember it accordingly that
01:35:53
we need to do this further next
01:35:55
function wings inventory squeals we
01:35:57
we hang it up like creating a new game and so on
01:36:01
and to load the game from the save therefore
01:36:05
I take here I call here as well as here
01:36:09
I also call the wings then enter and
01:36:10
widget also for loading games into
01:36:13
the result we already have
01:36:15
a completely finished system when
01:36:19
spawn inventory we from the staff and in general
01:36:23
from the controller we will spawn a character from
01:36:27
character ah yes from peres controller
01:36:30
we will perform a character from a character
01:36:33
spawn inventory inventory doesn't matter
01:36:36
can load both from slots from slot
01:36:39
saved and as new new
01:36:41
games further accordingly
01:36:46
accordingly this bluprint
01:36:48
inventory in turn spawns a widget
01:36:52
bluprint inventory widget
01:36:54
blueprint and on
01:36:55
the king spawns an inventory widget a widget
01:36:58
inventory in turn will spawn slots
01:37:00
that is, our system is so complex
01:37:02
already there so let's go back
01:37:05
for the presentation in this way with us
01:37:09
it turns out that we are already
01:37:10
and that we have already finished creating logic
01:37:14
for which we have already finished the fourth
01:37:16
point that is the creation of logic
01:37:18
display I see this inventory on the screen
01:37:20
that is, we have just created
01:37:22
all the logic for spawning
01:37:24
that is, we enter the game here
01:37:26
bluprint is automatically created
01:37:28
blueprint inventory
01:37:30
We have inventory automatically
01:37:31
automatically creates an inventory widget and
01:37:34
everything works for us
01:37:36
the last thing we have left is the fifth
01:37:38
point five point in which we must
01:37:41
create a curling iron to display and
01:37:43
hiding on a rag pressing a key then
01:37:46
there is when we press
01:37:47
so that we can on the key for example oh well
01:37:50
he's like inventory up
01:37:51
so that on any key we can
01:37:53
let's show let's show now let's
01:37:56
let's go back and start
01:37:58
to the last point if we want
01:38:00
check if everything is correct
01:38:02
it works we can basically now
01:38:03
We can't even wait to launch the game now
01:38:07
when it loads and we can
01:38:10
see that we don't have any here
01:38:12
errors, yes, that is, we can see that
01:38:14
We don’t have such mistakes, we’re all successful
01:38:17
it creates what we do next next
01:38:21
now we need to create two functions
01:38:24
functions
01:38:25
function show inventors which will be like
01:38:28
would display inventory yes it us
01:38:31
hidden she will do it not hidden
01:38:33
1 in addition there are also technical things
01:38:36
there is also a need for a mouse cursor for example
01:38:38
show yes, that is, you need to open it
01:38:40
show mouse cursor like this
01:38:43
close function, that is, hide until
01:38:45
make it hidden and also remove the cursor
01:38:47
mice, what are we going to do now?
01:38:48
accordingly I create a new one here
01:38:50
a function that I call like a show
01:38:55
inventory and like this also
01:38:59
so that here she doesn’t get confused, I
01:39:02
I suggest adding a category right away
01:39:04
what is our category, it will be a show
01:39:07
other
01:39:08
inter and this way what is it
01:39:14
our categories are called Hyde Show
01:39:16
inventory and if on the frame and then like this
01:39:18
and hide and when we show
01:39:22
inventory according to what we do
01:39:25
Well, first of all, we are purely for
01:39:28
there is no need to do this for safety
01:39:29
we can check for validity we can
01:39:32
call a function or even a macro and crash
01:39:35
this way and check what's in
01:39:37
first of all we check what if
01:39:39
we already have bluprint inventory that it is
01:39:43
valid yes in this case we are going
01:39:46
next we have to check the status as we
01:39:48
remember we have different ones in our inventory
01:39:51
statuses and this is done accordingly
01:39:53
for this reason I already spoke in the previous
01:39:55
in the lesson this is done for the reason that
01:39:57
if for example we have now moved
01:40:00
something in the cart and we have it now
01:40:02
inventory and is in deletion status
01:40:04
that we couldn't for example there or
01:40:07
let's say throwing away what we couldn't
01:40:09
click what we threw away and so far we have here
01:40:12
this ejection window is open so as not to
01:40:15
could we use it and then
01:40:16
throw it away and then pick it up again
01:40:18
use that is, so that all these bugs
01:40:21
we'll nip it in the bud right away
01:40:23
created a status variable which
01:40:26
has different
01:40:27
which have different eat date modes
01:40:32
closet this is when the inventory is hidden up in free
01:40:35
this is when it's just open further and
01:40:37
Destroy Alpin window this is if we
01:40:40
dragged to the cart and we have
01:40:42
the question is that we are in
01:40:43
the process of deleting something and dropping an item
01:40:46
window this is accordingly when we
01:40:48
I'm also causing some emissions here
01:40:50
switch candles
01:40:52
I connect the inventory and status here
01:40:56
here and right away I want here
01:40:58
comment that this is a check
01:41:00
inventory status
01:41:07
so this is our test
01:41:10
status
01:41:11
inventory after which we create
01:41:14
We will only have inventory if
01:41:17
it’s closed here, that’s what’s being done
01:41:20
to prevent all banks then
01:41:23
yes, if we have it hidden, we take it differently
01:41:26
winters wbf and what we do I immediately
01:41:31
calling the function calling the function set set
01:41:37
in the Larin language and if it is closed in our country
01:41:40
then I do it
01:41:42
openly I make him a fool's visa that is
01:41:45
displayed that is, I want this too
01:41:48
comment I want to write that we
01:41:50
enable inventory visibility
01:41:59
this is how we include it here
01:42:02
inventory visibility
01:42:03
after that we need to display
01:42:06
mouse cursor what do we do first
01:42:08
queue for call get player controller
01:42:13
this is how I call get player
01:42:16
controller on it I call the function with show mouse
01:42:21
cursor yes, that is, we show the cursor
01:42:23
mice I ticked the important not box here
01:42:26
forget, here we are showing the mouse cursor
01:42:28
we also still have a mode in us, yes then
01:42:32
There is game only we call another function
01:42:36
we call the set in food game mod function
01:42:39
and you are thark and immediately game and
01:42:46
you are set input mod game and you are
01:42:49
that is, so that we can ask
01:42:51
priority on some widget
01:42:54
and here in this very widget that we
01:42:58
we want to set its focus here
01:43:01
I serve our main had like this
01:43:06
way and also I uncheck the box here
01:43:11
here I uncheck the box and immediately do the same
01:43:14
I comment on everything and write what we include
01:43:16
mouse and focus on widget
01:43:27
this is how we turn on the mouse
01:43:30
and focus on the widget
01:43:32
after which after which we are left with
01:43:36
All that remains is to change this one
01:43:38
status that is, if we had a closet
01:43:41
that is, it’s closed, now I’m calling
01:43:44
the status variable is set to write and we change
01:43:47
status is open for that is, we have it
01:43:50
they opened it and showed it to us
01:43:53
I put it open here
01:43:55
up in free and you can basically do the task
01:43:57
vikern not it returns not this way
01:44:08
so we just created
01:44:10
function we just created a function
01:44:13
which will display our inventory
01:44:16
that is, we first check
01:44:17
we check the validity, well, they created it
01:44:20
this widget that shows it next
01:44:22
check the status purely for the gods
01:44:24
to fix various of these same bugs
01:44:28
then we turn on its visibility we
01:44:30
display display further
01:44:32
turn on the mouse and the ability for this mouse
01:44:35
it's like clicking with this mouse
01:44:37
visits and change status
01:44:39
that is, this is how we created
01:44:41
function show inventory and which will
01:44:44
show and inter and then we can close and
01:44:47
also create another function which
01:44:49
we will call it in a similar way only this time
01:44:51
Hyde inventory like this and also
01:44:56
don't forget to add a category show
01:44:59
inventory, that is, this function will already be
01:45:01
on the contrary, this function will already hide
01:45:04
from us this very inventory
01:45:06
then we do essentially the same thing I
01:45:09
call up inventory here
01:45:11
here is this inventory widget next
01:45:13
I check and tell you not to do it
01:45:16
definitely but I want to do it
01:45:18
we check the validity and merged us there
01:45:21
we are also checking the status here
01:45:23
thus get the status next switch
01:45:27
it is correct winters status if it is valid
01:45:30
only in this case only in this case
01:45:34
in case we will only hide it
01:45:36
only when he only when
01:45:40
it is open and free, that is, only
01:45:42
then come to us in opengl es mode, why?
01:45:45
for example, so that this does not happen
01:45:47
that we have an open window, let’s say it’s open
01:45:50
removing an item or throwing it away we
01:45:52
closed inventory and closing
01:45:55
We have inventory just like we have logic
01:45:57
hiding the mouse as a result we have a mouse
01:46:00
we closed the amber the amber closed the mouse
01:46:03
We lost this widget for example
01:46:05
yes this widget when which
01:46:07
asks how many items do you want
01:46:09
delete them or you
01:46:11
and are you even sure about deleting
01:46:13
In general, yes, we will have this widget
01:46:15
there won't be a mouse on the screen, but it will work out
01:46:17
so that this doesn't happen, we're the best
01:46:20
do the same, I call this one
01:46:22
most
01:46:23
inventory widget calling the set function
01:46:26
visas are white this way only in
01:46:29
if it's open I'll leave it in
01:46:32
abundance on the tunic, yes, that is, I have it
01:46:35
I hide it very much the same way we are everything
01:46:37
should comment I write what it is
01:46:39
us checking inventory status
01:46:46
so this is our test
01:46:48
inventory status
01:46:51
so this is where we hide the widget
01:46:56
inventory
01:47:14
this way, that is, we hide
01:47:16
next visit inventory
01:47:18
next thing we have to do is we
01:47:19
must remove the mouse, that is, in principle
01:47:23
we can even pass it into this function
01:47:25
show inventory and here or maybe this
01:47:31
just copy everything a little
01:47:33
correct it, yes I'll copy it a little
01:47:35
Only we will open the mouse, I'm here
01:47:38
I’m already removing the checkbox and also this one
01:47:40
I delete the function and call it here z z
01:47:47
game only that set in but mod game
01:47:50
he is somewhere, my focus is only transferred
01:47:52
accordingly I connect to the game here
01:47:54
here like this here and I this is all
01:48:00
I comment that we are we remove the cursor
01:48:03
mice and focus on the game that it is us
01:48:06
remove the mouse cursor and focus on
01:48:14
the game like this and the last thing
01:48:17
what do we have to do here to update it?
01:48:19
status I take the status variable
01:48:22
I fall on the recording and here I change the mode
01:48:28
on clause well and also well and also
01:48:35
it is not necessary to add black before it
01:48:37
but preferably according to this
01:48:39
So we just created a function
01:48:42
which is the opposite, which hides
01:48:45
inventory
01:48:46
what should we do next to
01:48:49
so that it is convenient for us to click on
01:48:52
key and immediately it that is, if we we
01:48:55
press one key and it is executed according to
01:48:57
queue two functions show and hide function
01:49:00
show and hi accordingly what we should
01:49:03
next do next we must create
01:49:07
function so let me close this one
01:49:10
next we need to create a function that
01:49:12
will be called the hyde show flip flop then
01:49:15
eat one first, then a friend and let's
01:49:18
now let's see that is
01:49:20
to a function which will be called as
01:49:22
Hyde show and equipment
01:49:31
flip flop I called it that myself maybe
01:49:34
long title doesn't matter category either
01:49:37
there is show equipment and here what it will be
01:49:39
very simple logic, that is, we take
01:49:41
status like this status further
01:49:45
call switch for inventory and status
01:49:48
like this after which after which
01:49:53
we after which and in the event that we have
01:49:59
inventory
01:50:00
if we are one of us now the inventory is hidden
01:50:02
then we call the show inventory function
01:50:06
and this is how we function
01:50:08
show inventory and if we have inventory
01:50:10
is open then we call the hide function
01:50:16
inventory like this if you have
01:50:18
open then we will hide it here
01:50:24
so yes that is then we will
01:50:26
hide it, what can we do next?
01:50:30
after we created this function we
01:50:34
immediately to perform this function
01:50:36
can we now create a character?
01:50:40
the character just came right away
01:50:42
execution of an event, that is, event is pressed
01:50:45
per key will perform not any of these
01:50:48
show or hide functions will be performed
01:50:50
Hyde show function here it is flip flop here
01:50:52
this is the function we see now
01:50:54
and just in turn he and this
01:50:58
this button will open and close
01:51:00
this very inventory, that is, like this
01:51:02
We will have a system, but in principle first
01:51:05
than to go here we can still in amber like
01:51:07
we remember we have this one here
01:51:10
button hide inventory yes that's why we
01:51:13
we can immediately call event here we can
01:51:16
you don’t see the curl but it doesn’t matter event and
01:51:18
liked yes I call and liked and what are we
01:51:21
what we do is just call bluprint
01:51:23
inventory baby inventory RF and I'm here
01:51:26
calling the function
01:51:27
hobby and 2
01:51:28
three why hyde well because this one
01:51:30
close button it can it is available
01:51:32
only when it's open and then it's like
01:51:34
there can be no other options and that's all
01:51:36
there we are, so one more button
01:51:38
we put I write that we are hiding it I write
01:51:45
that we are hiding inventory
01:51:47
this way, well, the last thing we
01:51:50
we do this we go inside the character
01:51:53
Thorson gp bluprint start basket rector
01:51:57
further in the graph we look for event keys and I
01:52:02
I'm writing I'm writing
01:52:05
oh-wey board to keyboard here we have oh
01:52:09
and what do we do next next we're on
01:52:15
our on the link to our inventory here
01:52:17
we have inventory and by the way what is it
01:52:19
called and grindr and they are the inventory of the Russian Federation but
01:52:22
it's actually not that important and here we go
01:52:24
this on the inventory itself we call like
01:52:27
times such as this function of the hide show and
01:52:30
printers
01:52:31
flip flop that's all yes
01:52:35
we just have to comment out that
01:52:37
yes, I highlight all this and comment that
01:52:39
this is our opening
01:52:45
closing inventory like this and
01:52:51
That's basically it, let's go back
01:52:54
into the presentation and that's it, we're just you and
01:52:58
finished the fifth and last point
01:53:00
today's lesson that is, we are finished
01:53:03
creating logic for display and
01:53:05
hiding amber at the press of a key
01:53:08
Now we have it all working great
01:53:11
let us before summing up
01:53:14
let's check this again, that is
01:53:17
now we can go into the game
01:53:19
I click new game I click new game
01:53:24
like this and when I click
01:53:27
oh key as we see we have
01:53:31
inventory let me be here
01:53:35
so let me press play again
01:53:37
I'll take it like this in full screen
01:53:39
I press new game and as we see I
01:53:43
I press a key
01:53:45
oh and we have inventory we
01:53:47
let's use a little hidden curl
01:53:49
a second so let's take a turnip for a second
01:53:53
I’ll remove it this way and how we
01:53:56
we see we have it and ours works great
01:53:59
inventory when we press the close button we
01:54:02
we can close it also I can
01:54:04
queue how many times should I press the key
01:54:06
and like this one two times two times two him
01:54:09
bar 1 1 1 1 as we see we can
01:54:12
open and close
01:54:14
inventory is still at the moment
01:54:17
we don't have any logic that would make this one
01:54:20
which would also add slots to
01:54:22
which would also add an item and here it is
01:54:24
just adding items for use
01:54:26
selecting items this will be just
01:54:29
the topic of our next lesson is
01:54:34
in the same way as we see here
01:54:37
the inventory is already fully working so I
01:54:40
I can probably open it on my brother on webcam
01:54:44
returned to the presentation and as we see
01:54:46
what we just created in this tutorial
01:54:50
function the main function which we
01:54:53
gives which gives us to receive
01:54:56
slot information
01:54:58
next we created a slot widget then we
01:55:01
created an inventory widget after which we
01:55:03
created
01:55:04
logic for spawning this widget that is
01:55:07
this widget now also appears
01:55:10
I'll give it that is, he was already sleeping with us
01:55:12
appears and we also created the logic
01:55:15
when pressing the key close to
01:55:19
or by pressing a key and we have
01:55:23
inventory closes or opens
01:55:25
so our lesson came to an end at
01:55:29
in turn, as always, I want
01:55:33
express gratitude to the project sponsor
01:55:34
on patreon for being us
01:55:37
support and say what you always say
01:55:41
I say that if you liked the lesson
01:55:44
if you found it useful, put it
01:55:47
likes subscribe to the channel and
01:55:49
press the bell so as not to
01:55:51
skip new videos and see you again

Description:

In this video tutorial i'm gonna show you how to create inventory in Unreal Engine 4.

Preparing download options

popular icon
Popular
hd icon
HD video
audio icon
Only sound
total icon
All
* — If the video is playing in a new tab, go to it, then right-click on the video and select "Save video as..."
** — Link intended for online playback in specialized players

Questions about downloading video

mobile menu iconHow can I download "Game Development / Unreal Engine 4 tutorial / #26 - how to create inventory. Widgets. Part 2." video?mobile menu icon

  • http://unidownloader.com/ website is the best way to download a video or a separate audio track if you want to do without installing programs and extensions.

  • The UDL Helper extension is a convenient button that is seamlessly integrated into YouTube, Instagram and OK.ru sites for fast content download.

  • UDL Client program (for Windows) is the most powerful solution that supports more than 900 websites, social networks and video hosting sites, as well as any video quality that is available in the source.

  • UDL Lite is a really convenient way to access a website from your mobile device. With its help, you can easily download videos directly to your smartphone.

mobile menu iconWhich format of "Game Development / Unreal Engine 4 tutorial / #26 - how to create inventory. Widgets. Part 2." video should I choose?mobile menu icon

  • The best quality formats are FullHD (1080p), 2K (1440p), 4K (2160p) and 8K (4320p). The higher the resolution of your screen, the higher the video quality should be. However, there are other factors to consider: download speed, amount of free space, and device performance during playback.

mobile menu iconWhy does my computer freeze when loading a "Game Development / Unreal Engine 4 tutorial / #26 - how to create inventory. Widgets. Part 2." video?mobile menu icon

  • The browser/computer should not freeze completely! If this happens, please report it with a link to the video. Sometimes videos cannot be downloaded directly in a suitable format, so we have added the ability to convert the file to the desired format. In some cases, this process may actively use computer resources.

mobile menu iconHow can I download "Game Development / Unreal Engine 4 tutorial / #26 - how to create inventory. Widgets. Part 2." video to my phone?mobile menu icon

  • You can download a video to your smartphone using the website or the PWA application UDL Lite. It is also possible to send a download link via QR code using the UDL Helper extension.

mobile menu iconHow can I download an audio track (music) to MP3 "Game Development / Unreal Engine 4 tutorial / #26 - how to create inventory. Widgets. Part 2."?mobile menu icon

  • The most convenient way is to use the UDL Client program, which supports converting video to MP3 format. In some cases, MP3 can also be downloaded through the UDL Helper extension.

mobile menu iconHow can I save a frame from a video "Game Development / Unreal Engine 4 tutorial / #26 - how to create inventory. Widgets. Part 2."?mobile menu icon

  • This feature is available in the UDL Helper extension. Make sure that "Show the video snapshot button" is checked in the settings. A camera icon should appear in the lower right corner of the player to the left of the "Settings" icon. When you click on it, the current frame from the video will be saved to your computer in JPEG format.

mobile menu iconWhat's the price of all this stuff?mobile menu icon

  • It costs nothing. Our services are absolutely free for all users. There are no PRO subscriptions, no restrictions on the number or maximum length of downloaded videos.