These are chat archives for ikkentim/SampSharp

6th
Oct 2016
Florian van Dillen
@fvandillen
Oct 06 2016 14:39
Any idea how you could use a color as default parameter? http://prntscr.com/cqkdm4
Tim Potze
@ikkentim
Oct 06 2016 16:19
Afaik you cant
Florian van Dillen
@fvandillen
Oct 06 2016 18:07
Doesn't the TablistDialog have a way to put a title on each column as well? Do you know what it's named?
Tim Potze
@ikkentim
Oct 06 2016 18:08
ill quickly look it up
Number 5
Tim Potze
@ikkentim
Oct 06 2016 18:08
public TablistDialog(string caption, IEnumerable<string> columns, string button1, string button2 = null)
thats the construtor
columns is the column headings
Florian van Dillen
@fvandillen
Oct 06 2016 18:09
Oh, I thought it needed a count as int
Thx, will use this :)
Tim Potze
@ikkentim
Oct 06 2016 18:09
you can either use count for headerless or the headings for with header
Florian van Dillen
@fvandillen
Oct 06 2016 18:11
How would you initialise the IEnumerable on the same line?
Tim Potze
@ikkentim
Oct 06 2016 18:12
what do you mean ? new[] {"foo", "bar"} ?
Florian van Dillen
@fvandillen
Oct 06 2016 18:12
Yes, that's what I meant
Tim Potze
@ikkentim
Oct 06 2016 18:12
It's a simple array initializer
arrays are enumerables as well
Florian van Dillen
@fvandillen
Oct 06 2016 18:13
That's the kind of experience I don't have haha
Tim Potze
@ikkentim
Oct 06 2016 18:13
:p
Florian van Dillen
@fvandillen
Oct 06 2016 18:13
Stuff you learn only by doing it :D
Works like a charm tho! http://prntscr.com/cqn74o
Tim Potze
@ikkentim
Oct 06 2016 18:14
:)
I'm atm cleaning up the VS debugger :)
Florian van Dillen
@fvandillen
Oct 06 2016 18:15
Using a lot of dialogs for the group/faction management ingame
Pretty much every other aspect in the gamemode needs the group system
Since a group can own cars, items, houses, whatever
By allowing advanced control over permissions, a faction leader can influence the gameplay of all his members
Florian van Dillen
@fvandillen
Oct 06 2016 19:32
@ikkentim
new PlayerTextDraw(player, x, y, "_")
                    {
                        UseBox = true,
                        Width = x + width - 4.0f,
                        Height = 0.0f,
                        LetterWidth = 1.0f,
                        LetterHeight = height / 10,
                        BoxColor = 0x00000000 | (color & 0x000000FF)
                    };
What values are presently being used for LetterWidth and LetterHeight?
Tim Potze
@ikkentim
Oct 06 2016 19:32
default?
Florian van Dillen
@fvandillen
Oct 06 2016 19:32
Never mind, found lettersize as vector2
You merged the two properties into LetterSize
Tim Potze
@ikkentim
Oct 06 2016 19:33
ah yes
forgot to put that in change notes i think
Florian van Dillen
@fvandillen
Oct 06 2016 19:33
Was porting your old ProgressBar gist into my gamemode
Tim Potze
@ikkentim
Oct 06 2016 19:33
:)
Florian van Dillen
@fvandillen
Oct 06 2016 19:33
Will send you an updated gist when finished
Tim Potze
@ikkentim
Oct 06 2016 19:33
Thanks :)
Florian van Dillen
@fvandillen
Oct 06 2016 19:33
Needs some updating with the Vector2's everywhere
Tim Potze
@ikkentim
Oct 06 2016 19:34
Yea haven't looked at that for a while
need to create a .UI package at some point
maybe there are a few more things that could be useful
Florian van Dillen
@fvandillen
Oct 06 2016 19:34
Oh, I can't use the new keyword in a object initliazer such as above, right?
Tim Potze
@ikkentim
Oct 06 2016 19:34
in what context do you mean?
Florian van Dillen
@fvandillen
Oct 06 2016 19:34
Well in the above code, I need to merge LetterWidth and LetterHeight into a new Vector2
IIRC, you can't use new in the above code
Tim Potze
@ikkentim
Oct 06 2016 19:35
LetterSize = new Vector2(1,2) should just work
Florian van Dillen
@fvandillen
Oct 06 2016 19:36
Works ye
Florian van Dillen
@fvandillen
Oct 06 2016 19:46
Could it be some code is missing from the progressbar gist?
Tim Potze
@ikkentim
Oct 06 2016 19:46
not sure
what would it be?
Florian van Dillen
@fvandillen
Oct 06 2016 19:46
Everything is fine except for the fact it can't handle the Dispose method
tried adding : IDisposable to my class, but it keeps complaining
It doesn't like your override dispose method: http://prntscr.com/cqohqc
Tim Potze
@ikkentim
Oct 06 2016 19:49
inherrit from Disposable and replace CheckDisposure with AssertNotDisposed
Florian van Dillen
@fvandillen
Oct 06 2016 19:50
Tim Potze
@ikkentim
Oct 06 2016 19:50
IsDisposed i think
Florian van Dillen
@fvandillen
Oct 06 2016 19:50
Yup, ty
Going to give my new code a test run now
Tim Potze
@ikkentim
Oct 06 2016 19:51
(:
Florian van Dillen
@fvandillen
Oct 06 2016 19:56
When I no longer need the progressbar, should I call dispose or hide?
Tim Potze
@ikkentim
Oct 06 2016 19:56
Dispose
Florian van Dillen
@fvandillen
Oct 06 2016 19:56
Cool
Florian van Dillen
@fvandillen
Oct 06 2016 20:04
Meh, doesn't really show a progress bar at all
Tim Potze
@ikkentim
Oct 06 2016 20:05
:/
Florian van Dillen
@fvandillen
Oct 06 2016 20:05
Probably got the values mixed up when initalizing it
Too tired lol
I mean, this should be good right?
// Test: Setup a nice progress bar!
                                player.testprogress = new ProgressBar(player, 10.0f, 10.0f, 0.0f);
                                player.testprogress.Show();
Tim Potze
@ikkentim
Oct 06 2016 20:07
yea, i guess so :/
Florian van Dillen
@fvandillen
Oct 06 2016 20:08
Mmm, doesn't show anything. Not sure what causes it
No exceptions in the console so that's good :P
Tim Potze
@ikkentim
Oct 06 2016 20:08
or not, depending how you look at it :p
Florian van Dillen
@fvandillen
Oct 06 2016 20:08
Exactly haha
Florian van Dillen
@fvandillen
Oct 06 2016 21:05
Did you by any chance put zonenames into the framework?
Tim Potze
@ikkentim
Oct 06 2016 21:18
No afaik not
SomeDevil
@SomeDevil
Oct 06 2016 21:30
@fvandillen did you fix progressbar?
Florian van Dillen
@fvandillen
Oct 06 2016 21:31
Not yet, I can't get it to appear. Probably not creating it the right way @SomeDevil
SomeDevil
@SomeDevil
Oct 06 2016 21:31
I can send you my updated version tomorrow
Florian van Dillen
@fvandillen
Oct 06 2016 21:31
Can't get my head around it yet. Working on porting some of my older code.
Oh nice!
Florian van Dillen
@fvandillen
Oct 06 2016 21:52
Got pretty much all my to-do shit done for tonight :) Time for some series
The base gamemode is coming along rather nicely, I must say
The other devs who are still working on the 5.0 version of our gamemode are mad at me because C# has much better performance
I think a lot of the performance comes from nhibernate which is efficient at querying as opposed to their custom queries that they have to write themselves