-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Mainmenu: Clean up and improve advanced settings dialogues #7802
Conversation
Improvements: 1. Formspec size and description box are calculated last 2. Width and height are now adjustable per setting type 3. Error message (dialogdata.error_message) shortens the description field and is placed below 4. Add more spacing for larger fonts 5. More comments and extensible by setting different height and width values
for index, value in ipairs(setting.values) do | ||
-- translating value is not possible, since it's the value | ||
-- that we set the setting to | ||
formspec = formspec .. core.formspec_escape(value) .. "," | ||
if get_current_value(setting) == value then | ||
selected_index = index | ||
break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about breaking from the loop, surely all possible values must be added to the dropdown?
Screenshots with game window 1024x600 (default) and all other relevant settings default. ^ Flags ^ v3f ^ path/filepath It's good that all the wasted space has been removed. The noise param formspecs are more compact. |
formspec .. | ||
"button[" .. width / 2 - 2.5 .. "," .. height - 0.25 .. ";2.5,0.75;btn_done;" .. | ||
fgettext("Save") .. "]" .. | ||
"button[" .. width / 2 .. "," .. height - 0.25 .. ";2.5,0.75;btn_cancel;" .. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Button height can't be less than 1, height is always 1 for buttons and non-1 values cause bugs.
Looks good generally i'm close to approving. |
👍 |
@SmallJoker next perhaps we can detect Android and reduce the size of the int/float formspec (and perhaps bool and enum too) for that platform? |
@paramat Rather check why the GUI is scaled so badly. The font usually displayed right on Android, but the formspec size does not seem to be adjusted well to the maximal height and width of the screen. |
The main menu pages scale with game window size, but each setting value edit formspec doesn't, certainly this needs investigation. |
@SmallJoker did this fix #5831 ? |
…7802) Improvements: 1. Formspec size and description box are calculated last 2. Width and height are now adjustable per setting type 3. Error message (dialogdata.error_message) shortens the description field and is placed below 4. Add more spacing for larger fonts 5. More comments and extensible by setting different height and width values
Improvements:
Settings for screenshot below:
2D-Noise, the free spot on the bottom is for the abs
Boolean/enum input:
Basic field input with wrong format:
Designed to supersede #7791