#💬 _olgierdʹs Feedback

1 messages · Page 1 of 1 (latest)

dry leafBOT
thick mirage
#

Plz open source

#

🔥

thick jolt
#

HEAT

stiff nest
thick mirage
stiff nest
#

i have to add things that will be dynamic

#

not hardcoded

#

like config

#

for icons and titles

#

so you can set whatever you want

#

cause currently its just a table in main script.

thick mirage
#

I wanna know how you did that drop down thingy

stiff nest
#

im just storing number in variable called curr_y

#

which refers tu current_y

thick mirage
#

I think I can do a hacky solution by putting invisible frames inside ui list layout

stiff nest
#

Yes you can, i did that at first

thick mirage
#

Which in theory should be much more customizable

stiff nest
#

but then i decided to not use that

thick mirage
stiff nest
#

the fact that you have to use invisible frames for each notification

#

and animate it

#

not performant, and i dont like it

#

i just have 2 tables

#

notifications, and to_remove

#

when notification lifetime is gone it just plays animation and removes it

#

and Im updaing curr_y by iterating each notification

#

pretty simple

#

(+ 15 is just the gap, i will also make it )

#

and i have to keep that in curr_y and stuff cause notification y size is based on the text size cause im not scaling text to frame but frame to text cause text gets wrapped

thick mirage
#

When it’s removed it plays the animation then shifts every thing down?

stiff nest
#

like im iterating through 2 tables

#

both contain notifications

#

the second table is called to_remove

#

so im putting old notifications here

#

and then its iterating through'em

#

plays anim and destroyes

#

instance

#

then removes it from first table

thick mirage
#

curr_y is per notification right?

stiff nest
#

wym

#

self.curr_y = number

#

but im using singeleton in this case so its
instance.curr_y

thick mirage
#

So uh how do you know where to shift the notifs to

stiff nest
#

iterating through first table

thick mirage
#

I think I get you now

#

So that tables acts like a stack thingy

#

First item goes to the top and so on

stiff nest
#

they just stuck under eachother

#

if there is only 1 notif then it has nothing to stack on

#

so im chekcing if the table lenght == 1

#

so yea kind of

#

but you gave me idea

#

some time ago i made queue lib

#

i may be able to use it here

#

to make this process even coller

thick mirage
#

{
[1] = {},
[2] = {}
}
I think with this setup I can get the previous notification and stack on that

stiff nest
#

yes i do that

#
  table.insert(instance.notifications, {instance = notification, expire_at = tick() + lifetime, is_playing = false, is_destroying = false})
thick mirage
#

What’s with the curr y then

stiff nest
#

it iterates through instance.notifications and update it

#

by doing curr,y = curr.y + absoulteSize.Y + GAP

thick mirage
stiff nest
#

not really, imagine that there are 5 notifications and the third one gets removed

#

nvm

#

that dumb example

#

idk it may

#

i would have to test

#

but im too lazy now

#

i have not spend lots of time thinking about the best way and structure

#

as i said i made it in about 30 minutes