Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config improvements #132

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

config improvements #132

wants to merge 5 commits into from

Conversation

Artur91425
Copy link
Contributor

@Artur91425 Artur91425 commented Jan 27, 2021

  • now the editbox accepts only numeric values. This will avoid entering invalid values.

    • only drawback: editbox:SetNumeric prevents any characters from being entered except numbers. Therefore, it is not possible to enter fractions in this editboxes. Therefore, for the transparency option I use the range not 0..1, but 0..100, that is, percentages :). With this implementation, it will be impossible to set fractional values ​​for the mindropchance option, but it seems to me that no one will sort items with a chance of 0.1, 0.2 and the like.
  • the pfQuest_config table saves data of type Number, not Text.

  • saving settings (writing to the pfQuest_config table) is now done on OnEditFocusLost. This will avoid overwriting unnecessary values ​​at the time of data entry.

  • checking the entered data for entering the valid range.

  • automatic correction of invalid values:

    • if the number is too large, the maximum value is set.
    • if the number is too small, the minimum value is set.
    • if nothing is entered, the value is set before editing.
  • tooltip with valid range of values

NOTE: it is necessary to reset the saved settings to avoid errors!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant