How do you plan to implement it? The current solution with ScreenMode property has got a dependency to the optiondialog, as well as being backwards compatible which I want to be as far as possible. Perhaps two new properties CustomScreenWidth, CustomScreenHeight. If set to zero (default) they are ignored?
I was planning to use a boolean checkbox to determine whether or not you want to overwrite the ScreenMode property .. but testing if the values are set to zero would do the trick too.
By the way, I'm trying to add a zptInteger2i type ( or something based on TZPointi ), no luck so far .. but I guess that's just a matter of diving into the source a little further. If worse comes to worse I'll just go with 2 integer fields as you described.
Yes adding a new datatype is pretty hairy and require lots of small changes in many places so I would advice against that . Just from the top of my head you need changes in: streaming, gui, set value, set default value etc etc. And it adds up to a significant amount of code growth so I don't add datatypes unless absolutely necessary. Go for two separate integers is my suggestion.
The current zptInteger field is slightly iffy too though, as you can just input float's / decimals. I assume the value does get converted / cast to a integer?
The value is always cast to an integer. You should notice it if you enter a value, leave the field, and then return. It should not accept any other characters than numbers and "-", but it is a bit messy to add that kind of validation to a delphi TEdit control so I haven't bothered yet.