@@ -152,7 +152,7 @@ sub do_about()
152
152
print "This program is free software; you can use it " ;
153
153
print "redistribute it and/or modify it under the terms of the " ;
154
154
print "GNU General Public License version 2 as published by " ;
155
- print "the Free Software Foundation." + chr( 10 )
155
+ print "the Free Software Foundation."
156
156
print
157
157
color colText
158
158
server_info()
162
162
163
163
sub do_setup()
164
164
local frm
165
+ local fontId = int(env( "fontId" ))
166
+ local loadModules = int(env( "loadModules" ))
167
+
168
+ color colText, colBkGnd
169
+ cls
170
+ at 0 , char_h * 6
171
+ print "Inconsolata:"
172
+ print " Copyright 2006 The Inconsolata Project"
173
+ print " http://scripts.sil.org/OFL"
174
+ print "Envy Code R:"
175
+ print " http://damieng.com/envy-code-r"
176
+ print "Ubuntu:"
177
+ print " https://ubuntu.com/legal/font-licence"
178
+ at 0 , char_h * 1
179
+ local w = char_w * 14.5
180
+ local h = char_h * 4.5
181
+ local x = char_w / 2
182
+ local y = char_h / 2
183
+ rect x, y, w * 2 , h + y * 2 . 5
184
+ dim frm.inputs( 4 )
185
+ frm.inputs( 0 ).type = "label"
186
+ frm.inputs( 0 ).label = "Select display font:"
187
+ frm.inputs( 0 ).x = char_w
188
+ frm.inputs( 1 ).type = "list"
189
+ frm.inputs( 1 ).value = "Inconsolata|Envy Code R|UbuntuMono"
190
+ frm.inputs( 1 ).selectedIndex = iff(fontId in [0 , 1 , 2 ], fontId, 0 )
191
+ frm.inputs( 1 ).x = char_w * 1 . 5
192
+ frm.inputs( 1 ).y = char_h * 2 . 2
193
+ frm.inputs( 1 ).height = char_h * 3 + 4
194
+ frm.inputs( 1 ).width = char_w * 12
195
+ frm.inputs( 2 ).type = "button"
196
+ frm.inputs( 2 ).backgroundColor = colBkGnd
197
+ frm.inputs( 2 ).color = colText
198
+ frm.inputs( 2 ).label = "OK"
199
+ frm.inputs( 2 ).value = "OK"
200
+ frm.inputs( 2 ).x = -(char_w * 2 . 5 )
201
+ frm.inputs( 2 ).y = -char_h
202
+ frm.inputs( 3 ).type = "button"
203
+ frm.inputs( 3 ).backgroundColor = colBkGnd
204
+ frm.inputs( 3 ).color = colText
205
+ frm.inputs( 3 ).label = "Cancel"
206
+ frm.inputs( 3 ).value = "cancel"
207
+ frm.inputs( 3 ).x = -(char_w * . 75 )
208
+
209
+ frm = form(frm)
210
+ while 1
211
+ frm.doEvents()
212
+ if (frm.value == "OK" ) then
213
+ exit loop
214
+ elseif (frm.value == "cancel" ) then
215
+ goto exitFunc
216
+ endif
217
+ wend
218
+ fontId = frm.inputs( 1 ).selectedIndex
219
+
220
+ cls
221
+ at 0 , char_h * 1
222
+ rect x, y, w * 2 , h + y * 2 . 5
223
+ frm.inputs( 0 ).label = "Extension modules:"
224
+ frm.inputs( 1 ).value = "Ignore|Load"
225
+ frm.inputs( 1 ).selectedIndex = iff(loadModules == 1 , 1 , 0 )
226
+ frm = form(frm)
227
+ while 1
228
+ frm.doEvents()
229
+ if (frm.value == "OK" ) then
230
+ exit loop
231
+ elseif (frm.value == "cancel" ) then
232
+ goto exitFunc
233
+ endif
234
+ wend
235
+ loadModules = frm.inputs( 1 ).selectedIndex
165
236
166
237
color colText, colBkGnd
167
238
cls
@@ -188,45 +259,30 @@ sub do_setup()
188
259
env( "serverToken=" + token)
189
260
endif
190
261
191
- color colText, colBkGnd
192
- cls
193
- print "Web service port number: " + env( "serverSocket" )
194
- print
195
- print boldOn + "Select display font."
196
- print boldOff
197
- print "Envy Code R:"
198
- print " http://damieng.com/envy-code-r"
199
- print "Inconsolata:"
200
- print " Copyright 2006 The Inconsolata Project"
201
- print " http://scripts.sil.org/OFL"
202
- print "Ubuntu:"
203
- print " https://ubuntu.com/legal/font-licence"
204
- print
205
- dim frm.inputs( 1 )
206
- frm.inputs( 0 ).type= "list"
207
- frm.inputs( 0 ).value= "Inconsolata|Envy Code R|UbuntuMono"
208
- frm.inputs( 0 ).selectedIndex=env( "fontId" )
209
- frm.inputs( 0 ).height=TXTH( "Q" )* 3 + 4
210
- frm.inputs( 0 ).width=TXTW( "Q" )* 12
211
- frm = form(frm)
212
- frm.doEvents()
213
- env( "fontId=" + frm.inputs( 0 ).selectedIndex)
262
+ env( "fontId=" + fontId)
263
+ env( "loadModules=" + loadModules)
214
264
215
265
local msg = "You must restart SmallBASIC for this change to take effect."
216
266
wnd.alert(msg, "Restart required" )
267
+
268
+ label exitFunc
217
269
clear_screen()
218
270
end
219
271
220
272
sub server_info()
221
273
local serverSocket = env( "serverSocket" )
222
274
local ipAddr = env( "IP_ADDR" )
275
+ local loadModules = int(env( "loadModules" ))
223
276
224
277
if (len(serverSocket) > 0 && int(serverSocket) > 1023 && int(serverSocket) < 65536 && len(ipAddr)) then
225
278
serverSocket = ipAddr + ":" + serverSocket
226
279
print boldOff + "Web Service: " + boldOn + serverSocket
227
280
print boldOff + "Access token: " + boldOn + env( "serverToken" )
228
- print boldOff
281
+ print boldOff ;
229
282
fi
283
+
284
+ print "Extension modules: " + boldOn + iff(loadModules == 2 , "Active" , iff(loadModules == 1 , "Enabled" , "Disabled" ))
285
+ print boldOff
230
286
end
231
287
232
288
func fileCmpFunc0(l, r)
@@ -667,9 +723,9 @@ sub main
667
723
frm.inputs << bn_files
668
724
frm.inputs << bn_online
669
725
frm.inputs << bn_scratch
670
- if (!is_sdl) then
726
+ ' if (!is_sdl) then
671
727
frm.inputs << bn_setup
672
- endif
728
+ ' endif
673
729
frm.inputs << bn_about
674
730
listFiles frm, path, sortDir, basList
675
731
frm = form(frm)
0 commit comments