Skip to content

Commit

Permalink
more UI stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBlackParrot committed Jan 3, 2025
1 parent e994408 commit 68d48e0
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 52 deletions.
10 changes: 5 additions & 5 deletions NoteTweaks/UI/BSML/ExtraPanel.bsml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@

<tab tags="tabs" tab-name="About">
<modifier-container child-expand-width="true" horizontal-fit="PreferredSize" spacing="3">
<vertical background="round-rect-panel" bg-color="#FFFFFF" vertical-fit="PreferredSize" pref-height="24" pad-top="3" pad-bottom="3" pad-left="6" pad-right="6">
<vertical background="round-rect-panel" bg-color="#FFFFFF" vertical-fit="PreferredSize" pref-height="22" pad-top="3" pad-bottom="3" pad-left="6" pad-right="6">
<horizontal child-align="MiddleCenter">
<text text="~version" font-size="12" align="Center" font-color="#CBADFF" rich-text="true"/>
</horizontal>
<horizontal child-align="MiddleCenter">
<text text="~gameVersion" font-size="6" align="Center" font-color="#FFFFFF" rich-text="true"/>
<text text="~gameVersion" font-size="5" align="Center" font-color="#FFFFFF" rich-text="true"/>
</horizontal>
</vertical>

<vertical background="round-rect-panel" bg-color="#FFFFFF" vertical-fit="PreferredSize" pref-height="16" pad-top="3" pad-bottom="3" pad-left="6" pad-right="6">
<vertical background="round-rect-panel" bg-color="#FFFFFF" vertical-fit="PreferredSize" pref-height="13" pad-top="3" pad-bottom="3" pad-left="6" pad-right="6">
<horizontal child-align="MiddleCenter">
<text text="~author" font-size="6" align="Center" font-color="#CBADFF" rich-text="true"/>
<text text="~author" font-size="4" align="Center" font-color="#CBADFF" rich-text="true"/>
</horizontal>
<horizontal child-align="MiddleCenter">
<clickable-text text="~projectHome" font-size="3" align="Center" font-color="#FFFFFF" rich-text="true" on-click="openProjectHome"/>
<clickable-text text="~projectHome" font-size="2.5" align="Center" font-color="#FFFFFF" rich-text="true" on-click="openProjectHome"/>
</horizontal>
</vertical>
</modifier-container>
Expand Down
99 changes: 53 additions & 46 deletions NoteTweaks/UI/BSML/Settings.bsml
Original file line number Diff line number Diff line change
Expand Up @@ -48,56 +48,63 @@

<tab tags="tabs" tab-name="Symbols">
<vertical vertical-fit="PreferredSize" pref-height="70" pref-width="100" anchored-position-x="4">
<scroll-view spacing="0" pref-height="70" child-expand-width="true">
<toggle-setting apply-on-change="true" value="EnableFaceGlow" text="Enable Glowing Face Symbols"
<vertical spacing="2" vertical-fit="PreferredSize" pad-left="1" pad-right="1" pref-width="100" child-control-height="false">
<toggle-setting apply-on-change="true" value="EnableFaceGlow" text="Enable Glowing Face Symbols" bind-value="true"
hover-hint="Show glow around symbols"/>

<horizontal><text text="-----" font-size="4" color="#00000000"/></horizontal>

<color-setting apply-on-change="true" value="LeftFaceColor" text="Left Face Symbol Color"
hover-hint="Color of arrows and dots themselves"/>
<slider-setting apply-on-change="true" value="LeftFaceColorNoteSkew" text="Skew Towards Note Color"
min="0.0" max="1.0" increment="0.01" show-buttons="true" formatter="PercentageFormatter"
hover-hint="Skew symbol colors towards the note color"/>
<toggle-setting apply-on-change="true" value="NormalizeLeftFaceColor" text="Normalize Color Brightness"
hover-hint="Normalizes the brightness of the face color by the highest RGB component"/>

<horizontal><text text="-----" font-size="4" color="#00000000"/></horizontal>
<tab-selector tab-tag="symbolTabs" id="symbolTabSelector"/>
</vertical>

<color-setting apply-on-change="true" value="LeftFaceGlowColor" text="Left Glow Color"
hover-hint="Color of the glow around face symbols"/>
<slider-setting apply-on-change="true" value="LeftFaceGlowColorNoteSkew" text="Skew Towards Note Color"
min="0.0" max="1.0" increment="0.01" show-buttons="true" formatter="PercentageFormatter"
hover-hint="Skew glow colors towards the note color"/>
<toggle-setting apply-on-change="true" value="NormalizeLeftFaceGlowColor" text="Normalize Color Brightness"
hover-hint="Normalizes the brightness of the glow color by the highest RGB component"/>
<slider-setting apply-on-change="true" value="LeftGlowIntensity" text="Glow Intensity"
min="0.01" max="3.0" increment="0.01" show-buttons="true" formatter="PercentageFormatter"
hover-hint="Intensity of glow on face symbols"/>
<vertical vertical-fit="PreferredSize" pref-height="45" pref-width="100">
<tab tags="symbolTabs" tab-name="Left">
<scroll-view spacing="0" pref-height="55" child-expand-width="true">
<color-setting apply-on-change="true" value="LeftFaceColor" text="Left Face Symbol Color"
hover-hint="Color of arrows and dots themselves"/>
<slider-setting apply-on-change="true" value="LeftFaceColorNoteSkew" text="Skew Towards Note Color"
min="0.0" max="1.0" increment="0.01" show-buttons="true" formatter="PercentageFormatter"
hover-hint="Skew symbol colors towards the note color"/>
<toggle-setting apply-on-change="true" value="NormalizeLeftFaceColor" text="Normalize Color Brightness"
hover-hint="Normalizes the brightness of the face color by the highest RGB component"/>

<horizontal><text text="-----" font-size="4" color="#00000000"/></horizontal>
<horizontal><text text="-----" font-size="4" color="#00000000" active="~EnableFaceGlow"/></horizontal>

<color-setting apply-on-change="true" value="LeftFaceGlowColor" text="Left Glow Color" active="~EnableFaceGlow"
hover-hint="Color of the glow around face symbols"/>
<slider-setting apply-on-change="true" value="LeftFaceGlowColorNoteSkew" text="Skew Towards Note Color" active="~EnableFaceGlow"
min="0.0" max="1.0" increment="0.01" show-buttons="true" formatter="PercentageFormatter"
hover-hint="Skew glow colors towards the note color"/>
<toggle-setting apply-on-change="true" value="NormalizeLeftFaceGlowColor" text="Normalize Color Brightness" active="~EnableFaceGlow"
hover-hint="Normalizes the brightness of the glow color by the highest RGB component"/>
<slider-setting apply-on-change="true" value="LeftGlowIntensity" text="Glow Intensity" active="~EnableFaceGlow"
min="0.01" max="3.0" increment="0.01" show-buttons="true" formatter="PercentageFormatter"
hover-hint="Intensity of glow on face symbols"/>
</scroll-view>
</tab>

<color-setting apply-on-change="true" value="RightFaceColor" text="Right Face Symbol Color"
hover-hint="Color of arrows and dots themselves"/>
<slider-setting apply-on-change="true" value="RightFaceColorNoteSkew" text="Skew Towards Note Color"
min="0.0" max="1.0" increment="0.01" show-buttons="true" formatter="PercentageFormatter"
hover-hint="Skew symbol colors towards the note color"/>
<toggle-setting apply-on-change="true" value="NormalizeRightFaceColor" text="Normalize Color Brightness"
hover-hint="Normalizes the brightness of the face color by the highest RGB component"/>

<horizontal><text text="-----" font-size="4" color="#00000000"/></horizontal>

<color-setting apply-on-change="true" value="RightFaceGlowColor" text="Right Glow Color"
hover-hint="Color of the glow around face symbols"/>
<slider-setting apply-on-change="true" value="RightFaceGlowColorNoteSkew" text="Skew Towards Note Color"
min="0.0" max="1.0" increment="0.01" show-buttons="true" formatter="PercentageFormatter"
hover-hint="Skew glow colors towards the note color"/>
<toggle-setting apply-on-change="true" value="NormalizeRightFaceGlowColor" text="Normalize Color Brightness"
hover-hint="Normalizes the brightness of the glow color by the highest RGB component"/>
<slider-setting apply-on-change="true" value="RightGlowIntensity" text="Glow Intensity"
min="0.01" max="3.0" increment="0.01" show-buttons="true" formatter="PercentageFormatter"
hover-hint="Intensity of glow on face symbols"/>
</scroll-view>
<tab tags="symbolTabs" tab-name="Right">
<scroll-view spacing="0" pref-height="50" child-expand-width="true">
<color-setting apply-on-change="true" value="RightFaceColor" text="Right Face Symbol Color"
hover-hint="Color of arrows and dots themselves"/>
<slider-setting apply-on-change="true" value="RightFaceColorNoteSkew" text="Skew Towards Note Color"
min="0.0" max="1.0" increment="0.01" show-buttons="true" formatter="PercentageFormatter"
hover-hint="Skew symbol colors towards the note color"/>
<toggle-setting apply-on-change="true" value="NormalizeRightFaceColor" text="Normalize Color Brightness"
hover-hint="Normalizes the brightness of the face color by the highest RGB component"/>

<horizontal><text text="-----" font-size="4" color="#00000000" active="~EnableFaceGlow"/></horizontal>

<color-setting apply-on-change="true" value="RightFaceGlowColor" text="Right Glow Color" active="~EnableFaceGlow"
hover-hint="Color of the glow around face symbols"/>
<slider-setting apply-on-change="true" value="RightFaceGlowColorNoteSkew" text="Skew Towards Note Color" active="~EnableFaceGlow"
min="0.0" max="1.0" increment="0.01" show-buttons="true" formatter="PercentageFormatter"
hover-hint="Skew glow colors towards the note color"/>
<toggle-setting apply-on-change="true" value="NormalizeRightFaceGlowColor" text="Normalize Color Brightness" active="~EnableFaceGlow"
hover-hint="Normalizes the brightness of the glow color by the highest RGB component"/>
<slider-setting apply-on-change="true" value="RightGlowIntensity" text="Glow Intensity" active="~EnableFaceGlow"
min="0.01" max="3.0" increment="0.01" show-buttons="true" formatter="PercentageFormatter"
hover-hint="Intensity of glow on face symbols"/>
</scroll-view>
</tab>
</vertical>
</vertical>
</tab>

Expand Down
5 changes: 4 additions & 1 deletion NoteTweaks/UI/SettingsViewController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace NoteTweaks.UI
[HotReload(RelativePathToLayout = "BSML.Settings.bsml")]
internal class SettingsViewController : BSMLAutomaticViewController
{
private PluginConfig _config;
private static PluginConfig _config;
public string PercentageFormatter(float x) => x.ToString("0%");
public string PreciseFloatFormatter(float x) => x.ToString("F3");
public string AccFormatter(int x) => (x + 100).ToString();
Expand All @@ -23,13 +23,16 @@ private void Construct(PluginConfig config)
_config = config;
}

[UIValue("EnableFaceGlow")]
protected bool EnableFaceGlow
{
get => _config.EnableFaceGlow;
set
{
_config.EnableFaceGlow = value;
NotePreviewViewController.UpdateVisibility();

NotifyPropertyChanged();
}
}

Expand Down

0 comments on commit 68d48e0

Please sign in to comment.