pfQuest
pfQuest copied to clipboard
config improvements
-
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!