mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-02 13:23:27 +08:00
Removing ConfigCheckBox (will add it back after a few fixes)
This commit is contained in:
parent
de086a8a3f
commit
967bebf80b
@ -7,7 +7,6 @@ from __future__ import annotations
|
|||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
import ba
|
import ba
|
||||||
from bastd.ui.config import ConfigCheckBox
|
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
pass
|
pass
|
||||||
@ -101,14 +100,15 @@ class PluginSettingsWindow(ba.Window):
|
|||||||
)
|
)
|
||||||
|
|
||||||
self._y_position -= 70
|
self._y_position -= 70
|
||||||
self._enable_new_plugins_check_box = ConfigCheckBox(
|
self._enable_new_plugins_check_box = ba.checkboxwidget(
|
||||||
parent=self._root_widget,
|
parent=self._root_widget,
|
||||||
position=(65, self._y_position),
|
position=(65, self._y_position),
|
||||||
size=(350, 60),
|
size=(350, 60),
|
||||||
configkey='Auto Enable New Plugins',
|
value=ba.app.config['Auto Enable New Plugins'],
|
||||||
displayname=ba.Lstr(resource='AutoEnableNewPluginsText'),
|
text=ba.Lstr(resource='AutoEnableNewPluginsText'),
|
||||||
scale=1.0,
|
scale=1.0,
|
||||||
maxwidth=430
|
maxwidth=430,
|
||||||
|
on_value_change_call=self._update_value
|
||||||
)
|
)
|
||||||
|
|
||||||
def _enable_all_plugins(self) -> None:
|
def _enable_all_plugins(self) -> None:
|
||||||
@ -135,6 +135,11 @@ class PluginSettingsWindow(ba.Window):
|
|||||||
color=(1.0, 0.5, 0.0),
|
color=(1.0, 0.5, 0.0),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def _update_value(self, val: bool) -> None:
|
||||||
|
cfg = ba.app.config
|
||||||
|
cfg['Auto Enable New Plugins'] = val
|
||||||
|
cfg.apply_and_commit()
|
||||||
|
|
||||||
def _do_back(self) -> None:
|
def _do_back(self) -> None:
|
||||||
# pylint: disable=cyclic-import
|
# pylint: disable=cyclic-import
|
||||||
from bastd.ui.settings.plugins import PluginWindow
|
from bastd.ui.settings.plugins import PluginWindow
|
||||||
|
|||||||
@ -221,8 +221,6 @@ void AppConfig::SetupEntries() {
|
|||||||
// (default to internal keyboard on iircade; not elsewhere)
|
// (default to internal keyboard on iircade; not elsewhere)
|
||||||
bool_entries_[BoolID::kAlwaysUseInternalKeyboard] =
|
bool_entries_[BoolID::kAlwaysUseInternalKeyboard] =
|
||||||
BoolEntry("Always Use Internal Keyboard", g_buildconfig.iircade_build());
|
BoolEntry("Always Use Internal Keyboard", g_buildconfig.iircade_build());
|
||||||
bool_entries_[BoolID::kAutoEnableNewPlugins] =
|
|
||||||
BoolEntry("Auto Enable New Plugins", true);
|
|
||||||
bool_entries_[BoolID::kShowFPS] = BoolEntry("Show FPS", false);
|
bool_entries_[BoolID::kShowFPS] = BoolEntry("Show FPS", false);
|
||||||
bool_entries_[BoolID::kTVBorder] =
|
bool_entries_[BoolID::kTVBorder] =
|
||||||
BoolEntry("TV Border", g_platform->IsRunningOnTV());
|
BoolEntry("TV Border", g_platform->IsRunningOnTV());
|
||||||
|
|||||||
@ -60,7 +60,6 @@ class AppConfig {
|
|||||||
kFullscreen,
|
kFullscreen,
|
||||||
kKickIdlePlayers,
|
kKickIdlePlayers,
|
||||||
kAlwaysUseInternalKeyboard,
|
kAlwaysUseInternalKeyboard,
|
||||||
kAutoEnableNewPlugins,
|
|
||||||
kShowFPS,
|
kShowFPS,
|
||||||
kTVBorder,
|
kTVBorder,
|
||||||
kKeyboardP2Enabled,
|
kKeyboardP2Enabled,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user