@@ -40,12 +40,8 @@ Gui.addPage(`
4040 <div class="">
4141 <h2 access="false" id="control-274549">GUI Settings</h2></div>
4242 <div class="formbuilder-radio-group form-group field-radio-group-background-color">
43- <label for="radio-group-background-color" class="formbuilder-radio-group-label">Background Color</label>
43+ <label for="radio-group-background-color" class="formbuilder-radio-group-label">Primary Color</label>
4444 <div class="radio-group">
45- <div class="formbuilder-radio">
46- <input name="radio-group-background-color" access="false" id="radio-group-background-color-0" value="white" type="radio" checked="checked">
47- <label for="radio-group-background-color-0">White</label>
48- </div>
4945 <div class="formbuilder-radio">
5046 <input name="radio-group-background-color" access="false" id="radio-group-background-color-1" value="black" type="radio">
5147 <label for="radio-group-background-color-1">Black</label>
@@ -54,22 +50,13 @@ Gui.addPage(`
5450 <input name="radio-group-background-color" access="false" id="radio-group-background-color-2" value="pink" type="radio">
5551 <label for="radio-group-background-color-2">Pink</label>
5652 </div>
57- </div>
58- </div>
59- <div class="formbuilder-radio-group form-group field-radio-group-text-color">
60- <label for="radio-group-text-color" class="formbuilder-radio-group-label">Text Color</label>
61- <div class="radio-group">
62- <div class="formbuilder-radio">
63- <input name="radio-group-text-color" access="false" id="radio-group-text-color-1" value="black" type="radio" checked="checked">
64- <label for="radio-group-text-color-1">Black</label>
65- </div>
6653 <div class="formbuilder-radio">
67- <input name="radio-group-text -color" access="false" id="radio-group-text -color-0 " value="white " type="radio">
68- <label for="radio-group-text -color-0">White </label>
54+ <input name="radio-group-background -color" access="false" id="radio-group-background -color-3 " value="green " type="radio">
55+ <label for="radio-group-background -color-3">Green </label>
6956 </div>
70- <div class="formbuilder-radio">
71- <input name="radio-group-text -color" access="false" id="radio-group-text -color-2 " value="pink " type="radio">
72- <label for="radio-group-text -color-2">Pink </label>
57+ <div class="formbuilder-radio">
58+ <input name="radio-group-background -color" access="false" id="radio-group-background -color-3 " value="purple " type="radio">
59+ <label for="radio-group-background -color-3">Purple </label>
7360 </div>
7461 </div>
7562 </div>
@@ -86,40 +73,24 @@ function changeSiteValues(querySelector, newValue) {
8673 }
8774}
8875
89- function changeBgColor ( color ) {
90- Gui . document . body . style [ "background-color" ] = color ;
91- }
92-
93- function changeTxtColor ( color ) {
94- Gui . document . body . style [ "color" ] = color ;
95- }
96-
9776function openGui ( ) {
98- Gui . open ( ( ) => {
99- // "Click" listener for the "Change Value" button
100- Gui . smartEvent ( "button-change-value" , ( ) => {
101- const querySelector = Gui . getValue ( "text-query-selector" ) ;
102- const newValue = Gui . getValue ( "text-new-value" ) ;
77+ Gui . open ( ( ) => {
78+ // "Click" listener for the "Change Value" button
79+ Gui . smartEvent ( "button-change-value" , ( ) => {
80+ const querySelector = Gui . getValue ( "text-query-selector" ) ;
81+ const newValue = Gui . getValue ( "text-new-value" ) ;
10382
104- changeSiteValues ( querySelector , newValue ) ;
105- } ) ;
83+ changeSiteValues ( querySelector , newValue ) ;
84+ } ) ;
10685
107- // "Change" listener for the background color radio group
108- const bgColorRadio = "radio-group-background-color" ;
109- Gui . smartEvent ( bgColorRadio , ( ) => {
110- const color = Gui . getData ( bgColorRadio ) ;
86+ // "Change" listener for the primary color radio group
87+ const bgColorRadio = "radio-group-background-color" ;
88+ Gui . smartEvent ( bgColorRadio , ( ) => {
89+ const color = Gui . getData ( bgColorRadio ) ;
11190
112- changeBgColor ( color ) ;
113- } ) ;
114-
115- // "Change" listener for the text color radio group
116- const txtColorRadio = "radio-group-text-color" ;
117- Gui . smartEvent ( txtColorRadio , ( ) => {
118- const color = Gui . getData ( txtColorRadio ) ;
119-
120- changeTxtColor ( color ) ;
121- } ) ;
122- } ) ;
91+ Gui . setPrimaryColor ( color ) ;
92+ } ) ;
93+ } ) ;
12394}
12495
12596const openBtn = document . createElement ( "button" ) ;
0 commit comments