FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
PureBasic-Randomizer/src/UserInterfaceBoys.pb at master · jdevfullstack-projects/PureBasic-Randomizer · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
jdevfullstack-projects
/
PureBasic-Randomizer
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
3
Code
Issues
0
Pull requests
0
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
PureBasic-Randomizer
/
src
/
UserInterfaceBoys.pb
Copy path
More file actions
More file actions
Latest commit
History
History
History
74 lines (56 loc) · 2.3 KB
Breadcrumbs
PureBasic-Randomizer
/
src
/
UserInterfaceBoys.pb
Copy path
File metadata and controls
74 lines (56 loc) · 2.3 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
XIncludeFile "ArrayData.pbi"
NewList indexArray.i()
;the increment everytime the program
;is run until such time it is already
;greater than 25
addToItself.i = 0
Enumeration
#WINDOW_1
#LISTVIEW_1
#TEXT_GADGET_1
#BUTTON_GADGET_1
#BUTTON_GADGET_2
EndEnumeration
#WINDOWS_FLAGS = #PB_Window_SystemMenu | #PB_Window_ScreenCentered
If OpenWindow(#WINDOW_1, 0, 0, 420, 120, "RANDOM SELECTION BOYS", #WINDOWS_FLAGS)
TextGadget(#TEXT_GADGET_1, 5, 10, 400, 30, "RANDOM LEARNERS:")
ButtonGadget(#BUTTON_GADGET_1, 230 , 0, 85, 40, "RUN!")
ButtonGadget(#BUTTON_GADGET_2, 320, 0, 85, 40, "CLEAR")
ListViewGadget(#LISTVIEW_1, 10, 40, 400, 68)
SetGadgetFont(#WINDOW_1, FontID(LoadFont(#PB_Any,"Century Gothic", 12)))
SetGadgetFont(#LISTVIEW_1, FontID(LoadFont(#PB_Any,"Century Gothic", 40)))
SetGadgetFont(#TEXT_GADGET_1, FontID(LoadFont(#PB_Any,"Comic Sans MS", 16)))
SetGadgetFont(#BUTTON_GADGET_1, FontID(LoadFont(#PB_Any,"Century Gothic", 18)))
SetGadgetFont(#BUTTON_GADGET_2, FontID(LoadFont(#PB_Any,"Century Gothic", 18)))
For x.b = 0 To 24
AddElement(indexArray())
indexArray() = x
Next
RandomizeList(indexArray())
DisableGadget(#BUTTON_GADGET_2, 1)
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_Gadget
Select EventGadget()
;run button
Case #BUTTON_GADGET_1
DisableGadget(#BUTTON_GADGET_1, 1)
DisableGadget(#BUTTON_GADGET_2, 0)
If addToItself >= 25
MessageRequester("ATTENTION: ", "Nothing left, program will exit.")
Break
EndIf
SelectElement(indexArray(), addToItself)
AddGadgetItem(#LISTVIEW_1, 0, classNumberBoys(indexArray()))
SetGadgetState(#LISTVIEW_1, 0)
addToItself.i = addToItself + 1
;clear button, proceed to the next random number
Case #BUTTON_GADGET_2
DisableGadget(#BUTTON_GADGET_1, 0)
RemoveGadgetItem(#LISTVIEW_1, 0)
DisableGadget(#BUTTON_GADGET_2, 1)
EndSelect
EndSelect
Until Event = #PB_Event_CloseWindow
EndIf
Back
|
FazBrowse Home
|
New Git URL