Skip to content

Commit 0aef9b2

Browse files
committed
Revert "Add button reference to onPress of BUTTON option"
This reverts commit 3d0b58f.
1 parent 301d901 commit 0aef9b2

3 files changed

Lines changed: 2 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
### Added
88

9-
- Added `button: sc.ButtonGui` to `onPress` of `BUTTON` option
109
- Added new mod option field `noNamePadding` that disables the padding after the option name
1110
- `INPUT_FIELD` can now have a name
1211

src/gui/options/option-elements/button.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ modmanager.gui.Options.BUTTON = ig.GuiElementBase.extend({
2121
this.button = new sc.ButtonGui(option.name)
2222
if (option.onPress) {
2323
this.button.onButtonPress = () => {
24-
option.onPress.call(option, this.button)
24+
option.onPress.call(option)
2525
}
2626
}
2727

src/mod-options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ interface INFO {
106106

107107
interface BUTTON {
108108
type: 'BUTTON'
109-
onPress: (this: GuiOption, button: sc.ButtonGui) => void
109+
onPress: (this: GuiOption) => void
110110
}
111111

112112
interface JSON_DATA extends OptionChangeable {

0 commit comments

Comments
 (0)