jss2a98aj / BugTorch

Bug-fixes for Minecraft 1.7.10
MIT License
34 stars 18 forks source link

Add option to remove "Open to LAN" & "Super Secret Settings" buttons #21

Closed kotmatross28729 closed 9 months ago

kotmatross28729 commented 1 year ago

I can’t say exactly what this is for, but I need it to avoid the OfflineAuth error: https://github.com/trollogyadherent/OfflineAuth/issues/15

Also available in config, disabled by default

Here's how it works in the game: Before:

Desktop Screenshot 2023 07 25 - 19 54 08 22

After:

Desktop Screenshot 2023 07 25 - 19 45 27 41

jss2a98aj commented 1 year ago

This looks good at a glance. I will merge it in and test when I prep for the next update.

Roadhog360 commented 1 year ago

You should make it gray out the buttons, instead of completely removing them. This way it doesn't appear as there are gaps in the UI button placement

kotmatross28729 commented 1 year ago

@Roadhog360, do you want the buttons to just not be clickable? in this case, I can make it possible to both remove the buttons completely, and just make them unclickable nothing if the base config looks a bit...big?

I've added a separate category that looks like this:

 buttons {
     # Disable the Broadcast Settings button from the options menu. [default: false]
    B:DisableBroadcastSettingsButton=false

    # Disable the Open to LAN button from the game menu. [default: false]
    B:DisableLANButton=false

    # Disable the Super Secret Settings button from the options menu. [default: false]
    B:DisableSuperSecretSettingsButton=false

    # Remove the Broadcast Settings button from the options menu. [default: false]
    B:removeBroadcastSettingsButton=false

    # Remove the Open to LAN button from the game menu. [default: false]
    B:removeLANButton=false

    # Remove the Super Secret Settings button from the options menu. [default: false]
    B:removeSuperSecretSettingsButton=false
 } 

Here's what happens if the first 3 values ​​are true: 11Снимок 1111Снимок

good or not?

kotmatross28729 commented 1 year ago

Anyway I'll add the commit here for now, if there's something wrong, tell me and I can open the pull request again