Skip to content

fix: Add proxy options to Settings UI#240

Open
1208nn wants to merge 1 commit intoqrrk:masterfrom
1208nn:master
Open

fix: Add proxy options to Settings UI#240
1208nn wants to merge 1 commit intoqrrk:masterfrom
1208nn:master

Conversation

@1208nn
Copy link
Copy Markdown

@1208nn 1208nn commented Mar 30, 2026

This pull request makes a small improvement to the SettingsUI by ensuring that the proxy options are dynamically added to the proxy option dropdown list when the UI is initialized.

  • UI Enhancement:
    • In scripts/SettingsUI.gd, the _ready() function now adds all available proxy options from _proxy_options to the ProxyOptionList UI element, ensuring the dropdown is populated correctly.

Generated By AI

Copilot AI review requested due to automatic review settings March 30, 2026 15:44
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Improves the Settings UI initialization by ensuring the proxy OptionButton is populated at runtime so the saved proxy setting can be selected correctly.

Changes:

  • Populate ProxyOptionList from _proxy_options during _ready().
  • Select the persisted proxy option index after populating the dropdown.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/SettingsUI.gd
Comment on lines +50 to +51
for option in _proxy_options:
%ProxyOptionList.add_item(option)
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

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

ProxyOptionList is being populated with the raw internal values (off/on/download), which will show those identifiers in the UI instead of the localized/user-friendly strings already present in text/*/settings_tab.csv (e.g. obtn_proxy_option_off/on/download). Consider clearing the OptionButton first and adding translated display labels (while keeping the mapping to _proxy_options for persistence).

Suggested change
for option in _proxy_options:
%ProxyOptionList.add_item(option)
%ProxyOptionList.clear()
for option in _proxy_options:
var label := tr("obtn_proxy_option_" + option)
%ProxyOptionList.add_item(label)

Copilot uses AI. Check for mistakes.
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.

2 participants