Dialog style
#1

Hey, I just stumbled upon something interesting regarding dialogs. My question is how is it done?

They managed to make one of the dialog's button play a timer, I personally thought dialogs were static :/ There are no signs of the dialog actually being hid and shown again when counting down. Is it actually a textdraw or am I missing something? I also like the 2 straight lines in there, it just makes me wonder how it's done so smoothly

Reply
#2

I'm guessing it's a textdraw.

It's too big to be a dialog.
Reply
#3

Yea that was one of my guesses as well but when you hover that button it's exactly like when you hover a actual dialog button, it slightly goes above and the borders get red
Reply
#4

They could just be using the same colors as SA:MPs default with SelectTextdraw's hovercolor.
Reply
#5

That's just a normal dialog.. what are you on.. they're showing the dialog each second. I used to do this as well.
Reply
#6

Does it have a smooth output when you do it each second? I haven't tried it myself yet, just curious
Reply
#7

I was actually wrong. Must of been thinking of something else.

It is a dialog: https://i.gyazo.com/8fc1a1d238903102...1495d58231.mp4

It's only noticeable if you press F6 to open the chat box. It'll disappear and reappear.
Reply
#8

It is a dialog. The button there showing a timer is nothing but a formatted string
format(str, sizeof str, "%d", Timer);
Where the integer "Timer" lowers in a callback called every second.
Reply
#9

it's textdraw
Reply
#10

Quote:
Originally Posted by TonyII
Посмотреть сообщение
Does it have a smooth output when you do it each second? I haven't tried it myself yet, just curious
If it is the exact same dialog with the exact same text then you don't notice any difference. I actually ran into this a few days ago because it bugged one of my systems. I had a dialog show up when a player picked up a pickup but as long as the player was standing in the pickup the dialog would get triggered again every two seconds. I didn't even notice this until I added a sound for triggering the dialog. It kept going "beep, beep, beep" which is how I ultimately knew that the dialog kept triggering.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)