Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Commit

Permalink
Merge pull request #111 from CptWesley/improve-advanced-settings
Browse files Browse the repository at this point in the history
  • Loading branch information
CptWesley authored Oct 21, 2021
2 parents 8806f7c + f069a01 commit 1d6eade
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 24 deletions.
3 changes: 2 additions & 1 deletion overwolf/src/AppSettings/pages/FriendSettingsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ export default function FriendSettingsPage(props: IAppSettingsPageProps) {
</label>
</div>
<details>
<summary title={t('settings.friend.advancedTooltip')} className={sharedClasses.summary} >{t('settings.friend.advanced')}</summary>
<summary title={t('settings.advancedTooltip')} className={sharedClasses.summary} >{t('settings.advanced')}</summary>
<p className={sharedClasses.setting}>{t('settings.advancedTooltip')}</p>
<div className={sharedClasses.setting}>
<label className={sharedClasses.textbox} title={t('settings.friend.customServerUrlTooltip')}>
<input
Expand Down
30 changes: 17 additions & 13 deletions overwolf/src/AppSettings/pages/OverlaySettingsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,6 @@ export default function OverlaySettingsPage(props: IAppSettingsPageProps) {
{t('settings.overlay.compassMode')}
</label>
</div>
<div className={classes.setting}>
<label className={classes.range} title={t('settings.overlay.opacityTooltip')}>
<input
type='range'
value={settings.opacity}
min='0.1'
max='1'
step='0.05'
onChange={e => updateSimpleSetting('opacity', e.currentTarget.valueAsNumber)}
/>
{t('settings.overlay.opacity')}
</label>
</div>
<div className={classes.setting}>
<label className={classes.select} title={t('settings.overlay.shapeTooltip')}>
<select
Expand All @@ -48,5 +35,22 @@ export default function OverlaySettingsPage(props: IAppSettingsPageProps) {
{t('settings.overlay.shape')}
</label>
</div>
<details>
<summary title={t('settings.advancedTooltip')} className={classes.summary} >{t('settings.advanced')}</summary>
<p className={classes.setting}>{t('settings.advancedTooltip')}</p>
<div className={classes.setting}>
<label className={classes.range} title={t('settings.overlay.opacityTooltip')}>
<input
type='range'
value={settings.opacity}
min='0.1'
max='1'
step='0.05'
onChange={e => updateSimpleSetting('opacity', e.currentTarget.valueAsNumber)}
/>
{t('settings.overlay.opacity')}
</label>
</div>
</details>
</>;
}
5 changes: 4 additions & 1 deletion overwolf/src/Frame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ export default function Frame(props: IProps) {

const dynamicStyling: React.CSSProperties = {};
if (isTransparentSurface) {
dynamicStyling.opacity = appContextSettings.opacity;
const opacity = appContextSettings.opacity;
if (opacity < 0.95) {
dynamicStyling.opacity = opacity;
}
}

return (
Expand Down
6 changes: 3 additions & 3 deletions overwolf/src/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
"settings": {
"title": "Settings",
"open": "Open this menu at any time by right-clicking.",
"advanced": "Advanced Settings",
"advancedTooltip": "Settings for advanced users. Only change them if you know what you are doing.",
"window": {
"_": "This window",
"transparentHeader": "Transparent header",
Expand Down Expand Up @@ -61,7 +63,7 @@
"compassMode": "Overlay Compass Mode",
"compassModeTooltip": "Enabling will make the player always face north and rotates the map around the player, like a classic minimap.",
"opacity": "Overlay Opacity",
"opacityTooltip": "Determines the opacity of the overlay.",
"opacityTooltip": "Determines the opacity of the overlay. This setting might impact your performance significantly.",
"shape": "Overlay Shape",
"shapeTooltip": "Determines the shape of the overlay.",
"shapeRectangular": "Rectangular",
Expand All @@ -83,8 +85,6 @@
"friends": "Your friends",
"friendsTooltip": "List of your friends. One friend code per line.",
"regenerate": "Generate a new friend code if you don't want to let certain people trace you any longer.",
"advanced": "Advanced Settings",
"advancedTooltip": "Settings for advanced users. Only change them if you know what you are doing.",
"customServerUrl": "Server endpoint URL",
"customServerUrlTooltip": "The URL of the server endpoint that you want to connect to. Leave blank for default server."
}
Expand Down
2 changes: 0 additions & 2 deletions overwolf/src/locales/es/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@
"friends": "Tus amigos",
"friendsTooltip": "Lista de tus amigos. Uno por linea.",
"regenerate": "Genera un nuevo código si quieres dejar de compartir tu ubicación con las personas que ya tienen tu código.",
"advanced": "Configuración avanzada",
"advancedTooltip": "Opciones para usuarios avanzados. Solo cambia esta configuración si estás seguro de lo que estás haciendo.",
"customServerUrl": "URL del servidor",
"customServerUrlTooltip": "La URL del endpoint al que deseas conectarte. Déjelo en blanco para user el servidor predeterminado."
}
Expand Down
4 changes: 2 additions & 2 deletions overwolf/src/locales/nl/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
"settings": {
"title": "Instellingen",
"open": "Open dit scherm wanneer u wilt door op de kaart op de rechter muisknop te klikken.",
"advanced": "Geavanceerde Instellingen",
"advancedTooltip": "Instellingen voor geavanceerde gebruikers. Verander ze alleen als je weet wat je doet.",
"window": {
"_": "Dit venster",
"transparentHeader": "Doorzichtige titelbalk",
Expand Down Expand Up @@ -83,8 +85,6 @@
"friends": "Jouw vrienden",
"friendsTooltip": "Lijst van vrienden. Eén vriend code per regel.",
"regenerate": "Genereer een nieuwe vriend code als je niet meer wilt dat sommige mensen je kunnen volgen.",
"advanced": "Geavanceerde Instellingen",
"advancedTooltip": "Instellingen voor geavanceerde gebruikers. Verander ze alleen als je weet wat je doet.",
"customServerUrl": "Server endpoint URL",
"customServerUrlTooltip": "De URL van de server waar je mee wilt verbinden. Leeg laten om gebruik te maken van de standaard server."
}
Expand Down
4 changes: 2 additions & 2 deletions overwolf/src/locales/ro/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
"settings": {
"title": "Setări",
"open": "Deschide acest meniu prin clic-dreapta.",
"advanced": "Setări avansate",
"advancedTooltip": "Setări pentru jucători avansați. Schimbă-le doar dacă știi ce faci.",
"window": {
"_": "Această fereastră",
"transparentHeader": "Antet transparent",
Expand Down Expand Up @@ -83,8 +85,6 @@
"friends": "Prietenii tăi",
"friendsTooltip": "Lista prietenilor tăi. Un cod al unui prieten pe linie.",
"regenerate": "Genrează un cod nou al unui prieten dacă vrei ca diverși oameni să nu îți mai poată accesa datele.",
"advanced": "Setări avansate",
"advancedTooltip": "Setări pentru jucători avansați. Schimbă-le doar dacă știi ce faci.",
"customServerUrl": "Server endpoint URL",
"customServerUrlTooltip": "URL-ul pentru server endpoint la care vrei să te conectezi. Lasă necompletat pentru serverul standard."
}
Expand Down

0 comments on commit 1d6eade

Please sign in to comment.