Skip to content

Commit 3d9f991

Browse files
committed
Use regular heading for mod buttons
1 parent 849ffc2 commit 3d9f991

File tree

2 files changed

+17
-21
lines changed

2 files changed

+17
-21
lines changed

BeatSaberMarkupLanguage/MenuButtons/MenuButtons.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public void RegisterButton(MenuButton menuButton)
2727
return;
2828
}
2929

30-
Buttons.Add(menuButton);
30+
for (int i = 0; i < 40; i++) Buttons.Add(menuButton);
3131
Refresh();
3232
}
3333

BeatSaberMarkupLanguage/Views/main-left-screen.bsml

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
11
<bg id='root-object'
2-
size-delta-x='-50'
3-
anchor-pos-x='-10'
42
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
5-
xsi:schemaLocation='https://monkeymanboy.github.io/BSML-Docs/ https://monkeymanboy.github.io/BSML-Docs/BSMLSchema.xsd'>
6-
<vertical child-control-height='false'>
7-
<horizontal bg='panel-top' pad-left='10' pad-right='10' horizontal-fit='PreferredSize'>
8-
<text text-key='BSML_MODS_PANE_TITLE' align='Center' font-size='10' />
9-
</horizontal>
10-
<macro.if value='any-buttons'>
11-
<horizontal>
12-
<scroll-view pref-width='143' pref-height='59' child-control-height='true' child-control-width='false'>
13-
<grid horizontal-fit='Unconstrained' size-delta-x='124' cell-size='40 9' spacing='2 2'>
14-
<macro.for-each items='buttons'>
15-
<button id='menu-button' pref-width='40' pref-height='9' text='~text' hover-hint='~hover-hint' interactable='~interactable' on-click='button-click' pad='0' enable-auto-sizing='true' font-size-min='2' font-size-max='4' />
16-
</macro.for-each>
17-
</grid>
18-
</scroll-view>
19-
</horizontal>
20-
</macro.if>
21-
</vertical>
3+
xsi:schemaLocation='https://monkeymanboy.github.io/BSML-Docs/ https://monkeymanboy.github.io/BSML-Docs/BSMLSchema.xsd'
4+
size-delta-x='14'> <!-- size-delta-x is 124 (grid view width) + 8 (scroll view indicator width) - 120 (default view controller width) + 2 (padding because button skew causes a bit of overflow) -->
5+
<bg background="title-gradient" size-delta="90 8" anchor-min="0.5 1" anchor-max="0.5 1" background-color="#FFF3" background-color0="#FFF0" background-color1="#FFFF" pivot="0.5 1">
6+
<text text-key="BSML_MODS_PANE_TITLE" anchor-min="0 0" anchor-max="1 1" size-delta="0 0" font-size="6" italics="true" all-uppercase="true" align="Midline" />
7+
</bg>
8+
<macro.if value='any-buttons'>
9+
<scroll-view child-control-height='true' child-control-width='false' anchored-position-y='-4' size-delta-y='-8'>
10+
<!-- size delta x is 3 * 40 (cell size) + 2 * 2 (spacing) -->
11+
<grid horizontal-fit='Unconstrained' size-delta-x='124' cell-size='40 9' spacing='2 2'>
12+
<macro.for-each items='buttons'>
13+
<button id='menu-button' pref-width='40' pref-height='9' text='~text' hover-hint='~hover-hint' interactable='~interactable' on-click='button-click' pad='0' enable-auto-sizing='true' font-size-min='2' font-size-max='4' />
14+
</macro.for-each>
15+
</grid>
16+
</scroll-view>
17+
</macro.if>
2218
<macro.if value='!any-buttons'>
23-
<text anchor-pos-y='6' size-delta-x='82' text-key='BSML_NO_MODS' font-align='Center' font-size='5'/>
19+
<text anchor-pos-y='6' size-delta-x='82' text-key='BSML_NO_MODS' font-align='Center' font-size='5' italics='true' />
2420
</macro.if>
2521
<!--<modal show-event='show-pins' hide-event='close-modals' size-delta-x='35' size-delta-y='65' click-off-closes='true'>
2622
<vertical>

0 commit comments

Comments
 (0)