server-beta
server-beta copied to clipboard
Some requested changes by @Y-Less
@Y-Less proposed some changes in his PR in #377 most of them are accepted, but I reverted a few before merging, so we can discuss about them and not be a reason to hold and keep that PR open. All these reverted changes are now here to be discussed about, and later on create a PR for it and do required and chosen changes.
TextDrawStyle was changed to TextDrawFont
Currently not called TextDrawFont in master branch, but it's what @Y-Less was offering.
That was done by @Y-Less because he thinks this way people using SDK and known to samp dev environment can understand it better.
Me and @Cheaterman on the other hand had different opinion on this, thinking a change due to old term usage in Pawn scripting API of samp is not really necessary and we can now use new and proper terms in our SDK, keeping what we promised backward compatible along side with it (Pawn scripting API), as a step to future plans and having consistent and proper naming, without hurting our backward compatibility goal at the moment
onPlayerClose(Player)TextDraw was offered
Y_Less also offered to use onPlayerClose(Player)TextDraw as the event name for when player "cancels" textdraw selection, I've renamed it to onPlayerCancel(Player)TextDrawSelection for now, and put this up for discussion so we can decide
In my opinion, "close textdraw" has no meaning, even to those who know what it does it just doesn't sound right, and newcomers won't necessarily understand it at first glance, what does closing a textdraw even mean? even if we talk about in game behavior, it doesn't "close" or hide anything, it simply exists selection state, hence being renamed to "cancel textdraw selection"
Renaming toggleOtherNameTag to useNameTag, but it's confusing and nowhere near being self explanatory
While many others are changed and followed the same style, and are now in master branch, I don't think this one is helping anyone
maybe toggle isn't the best word, but yet useNameTag is very confusing, for being a method of IPlayer
what does player.useNameTag supposed to do? who's name tag is it going to hide? for who? hence keeping it as toggleOtherNameTag for now, so we can decide what to call it
You already (and accurately) represented my opinion on the TextDrawStyle thing.
The "close" textdraw is interesting, IMO it's not mostly problematic for the reasons you highlight but also because there's several ways to cancel selection state (while "closing" TDs sound like it mostly refers to pressing escape).
About the nametag... I hate (with a burning passion) the SAMP naming scheme where toggle* doesn't actually toggle anything, and it actually is a setter that takes a boolean arg. setOtherNametagVisible is what I'd personally go with, or something along those lines? (useNameTag isn't clearing up any confusion, if anything I agree that it's less descriptive...)
The main reason I didn't want to use onPlayerCancelPlayerTextDrawSelection was just the length. It is extremely verbose. I was trying to find a balance between length and pithyness. However, since we've increased the function name limit in pawn this is less of an issue.