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

Add settings #85

Merged
merged 9 commits into from
May 5, 2023
Merged

Add settings #85

merged 9 commits into from
May 5, 2023

Conversation

Athozus
Copy link
Member

@Athozus Athozus commented May 4, 2023

This is a merge request, according to #51, to add settings to the mod. Currently there are not the sounds/trash settings like I did on the issue, cause it's not yet implemented (will be in few days).

Some interesting infos :

  • It is in the menu "Options" which replace the About button, and this menu has two tabs : Settings and About, maybe Help in the future.
  • It uses an entry.settings with following syntax :
{
name = "setting",
value = "itsvalue", -- could be boolean, int or string
}

Closes #51

@Athozus Athozus added the Enhancement New feature or request label May 4, 2023
@Athozus Athozus added this to the 1.2.0 milestone May 4, 2023
@Athozus
Copy link
Member Author

Athozus commented May 4, 2023

Quick screenshot
screenshot_20230504_122935

storage.lua Outdated Show resolved Hide resolved
storage.lua Outdated Show resolved Hide resolved
storage.lua Outdated Show resolved Hide resolved
Copy link
Member

@BuckarooBanzay BuckarooBanzay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't test but looks good 👍 (thanks for addressing the table/list thing)

@Athozus
Copy link
Member Author

Athozus commented May 4, 2023

I have a quick issue reported by @Bastrabun. On some servers, when you press escape, it is still there. It is due to the mail.show_settings() at the end of the events checking, I would like to remove it, but when I move it into if fields.reset you have to change of formspec and go again to settings to see the settings reseted. So, I would like to know if there is an event like if escape_pressed, to avoid that weird behaviour.

@BuckarooBanzay
Copy link
Member

you could use the button_exit[] or an explicit "save"-field to check for, but other than that, no clue sorry :/

@Athozus
Copy link
Member Author

Athozus commented May 4, 2023

Yeah at first I would like to do that but I think that checkboxes can't give their values when there aren't toggled.

ui/inbox.lua Outdated Show resolved Hide resolved
ui/outbox.lua Outdated Show resolved Hide resolved
ui/outbox.lua Outdated Show resolved Hide resolved
S-S-X
S-S-X previously approved these changes May 4, 2023
Copy link
Member

@S-S-X S-S-X left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but also didn't actually test anything.

@Athozus Athozus added the WIP label May 4, 2023
@Athozus
Copy link
Member Author

Athozus commented May 4, 2023

LGTM but also didn't actually test anything.

Nope, I have to find a way to get checkboxes values while pressing Save (not the event related to the checkbox itself).

@S-S-X S-S-X dismissed their stale review May 4, 2023 19:48

Review again when ready for review.

@Athozus Athozus removed the WIP label May 5, 2023
@Athozus
Copy link
Member Author

Athozus commented May 5, 2023

This one is fixed, I merge so (I used selected_idxs finally :D).

@Athozus Athozus merged commit 720029a into master May 5, 2023
@Athozus Athozus deleted the settings branch May 6, 2023 19:31
@Athozus Athozus restored the settings branch September 9, 2023 18:39
@Athozus Athozus deleted the settings branch April 15, 2024 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add settings
3 participants