ROGCC: refactor many more parts of the PPT settings

This commit is contained in:
Luke Jones
2025-02-04 17:48:52 +13:00
parent 5833a011ce
commit 16700e55f4
6 changed files with 69 additions and 59 deletions

View File

@@ -265,6 +265,7 @@ export component PageSystem inherits Rectangle {
minimum: SystemPageData.ppt_pl1_spl.min;
maximum: SystemPageData.ppt_pl1_spl.max;
value: SystemPageData.ppt_pl1_spl.current;
enabled <=> SystemPageData.enable_ppt_group;
has_reset: true;
cb_do_reset => {
SystemPageData.cb_default_ppt_pl1_spl();
@@ -282,6 +283,7 @@ export component PageSystem inherits Rectangle {
minimum: SystemPageData.ppt_pl2_sppt.min;
maximum: SystemPageData.ppt_pl2_sppt.max;
value: SystemPageData.ppt_pl2_sppt.current;
enabled <=> SystemPageData.enable_ppt_group;
has_reset: true;
cb_do_reset => {
SystemPageData.cb_default_ppt_pl2_sppt();
@@ -299,6 +301,7 @@ export component PageSystem inherits Rectangle {
minimum: SystemPageData.ppt_pl3_fppt.min;
maximum: SystemPageData.ppt_pl3_fppt.max;
value: SystemPageData.ppt_pl3_fppt.current;
enabled <=> SystemPageData.enable_ppt_group;
has_reset: true;
cb_do_reset => {
SystemPageData.cb_default_ppt_pl3_fppt();
@@ -315,6 +318,7 @@ export component PageSystem inherits Rectangle {
minimum: SystemPageData.ppt_fppt.min;
maximum: SystemPageData.ppt_fppt.max;
value: SystemPageData.ppt_fppt.current;
enabled <=> SystemPageData.enable_ppt_group;
has_reset: true;
cb_do_reset => {
SystemPageData.cb_default_ppt_fppt();
@@ -332,6 +336,7 @@ export component PageSystem inherits Rectangle {
minimum: SystemPageData.ppt_apu_sppt.min;
maximum: SystemPageData.ppt_apu_sppt.max;
value: SystemPageData.ppt_apu_sppt.current;
enabled <=> SystemPageData.enable_ppt_group;
has_reset: true;
cb_do_reset => {
SystemPageData.cb_default_ppt_apu_sppt();
@@ -349,6 +354,7 @@ export component PageSystem inherits Rectangle {
minimum: SystemPageData.ppt_platform_sppt.min;
maximum: SystemPageData.ppt_platform_sppt.max;
value: SystemPageData.ppt_platform_sppt.current;
enabled <=> SystemPageData.enable_ppt_group;
has_reset: true;
cb_do_reset => {
SystemPageData.cb_default_ppt_platform_sppt();
@@ -366,6 +372,7 @@ export component PageSystem inherits Rectangle {
minimum: SystemPageData.nv_dynamic_boost.min;
maximum: SystemPageData.nv_dynamic_boost.max;
value: SystemPageData.nv_dynamic_boost.current;
enabled <=> SystemPageData.enable_ppt_group;
has_reset: true;
cb_do_reset => {
SystemPageData.cb_default_nv_dynamic_boost();
@@ -383,6 +390,7 @@ export component PageSystem inherits Rectangle {
minimum: SystemPageData.nv_temp_target.min;
maximum: SystemPageData.nv_temp_target.max;
value: SystemPageData.nv_temp_target.current;
enabled <=> SystemPageData.enable_ppt_group;
has_reset: true;
cb_do_reset => {
SystemPageData.cb_default_nv_temp_target();

View File

@@ -12,6 +12,7 @@ export component RogItem inherits Rectangle {
export component SystemSlider inherits RogItem {
in property <string> title;
in property <string> text;
in-out property <bool> enabled;
in-out property <float> value;
in-out property <float> minimum;
in-out property <float> maximum;
@@ -27,6 +28,7 @@ export component SystemSlider inherits RogItem {
alignment: LayoutAlignment.stretch;
padding-left: 10px;
TouchArea {
enabled <=> root.enabled;
clicked => {
slider.value += 1;
if slider.value > slider.maximum {
@@ -57,6 +59,7 @@ export component SystemSlider inherits RogItem {
// alignment: LayoutAlignment.end;
padding-right: 20px;
slider := Slider {
enabled <=> root.enabled;
maximum: root.maximum;
minimum: root.minimum;
value <=> root.value;
@@ -150,6 +153,7 @@ export component SystemSlider inherits RogItem {
reset := HorizontalBox {
if (has_reset): StandardButton {
kind: StandardButtonKind.reset;
enabled <=> root.enabled;
clicked => {
reset_popup.show();
}