Hello Guest

Author Topic: Extra tiny feature request  (Read 4812 times)

1dayitwillmake

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 10
    • View Profile
Extra tiny feature request
« on: May 31, 2014, 08:23:10 pm »
I have a tiny feature request, which from what I can tell and tested should really not cause any issues.

In tk2dUIProgressBar could the paremter 'initializedSlicedSpriteDimensions' be made public?
A use case for this, is you have a progress bar which will be resized (or even sized once during set up), and you'd like to basically mark it as dirty so the 'fullSlicedSpriteDimensions' are recalculated.

Since that's all it really does, it doesn't seem like it'd have any side effects - what do you say?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Extra tiny feature request
« Reply #1 on: May 31, 2014, 09:00:31 pm »
I could but it sounds like an annoyance more than anything else? It would probably be better to simply copy the class, rename it and have your own version. There are a lot of little things like this I would like to change, but I am terrified it will break someones special case behaviour somewhere.

1dayitwillmake

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Extra tiny feature request
« Reply #2 on: May 31, 2014, 09:57:23 pm »
I could see your concern, in this case that value is only ever read and set internally. All existing uses of this this class, aren't even reading that value in any case.

However I still see your concern, just because from reading the forums it seems like that is always the constant fear that a new change will break something which I can totally understand. So I will simply 'extend' the class and add a 'SetDirty' method that simply flips that boolean.

Maybe set the parameter to protected as a compromise, keeping it basically private?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Extra tiny feature request
« Reply #3 on: May 31, 2014, 10:54:16 pm »
protected is fine :)
Setting it to public has the side effect of making it serializable which has side effects.