2016 Update

This commit is contained in:
Tina Müller 2016-12-05 22:15:40 +01:00
parent 948b86eafa
commit dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions

View file

@ -1,32 +1,27 @@
Global Window_0
Global Window_0_Text_0
Global Window_0_Button_1
Global Clicks, txt$
Define window_0
Define window_0_Text_0, window_0_Button_1
Define clicks, txt$, flags
Procedure OpenWindow_Window_0()
Protected flags=#PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_TitleBar|#PB_Window_WindowCentered
Window_0 = OpenWindow(#PB_Any, 408, 104, 280, 45, "Simple windowed application", flags)
If Window_0
SmartWindowRefresh(Window_0, #True)
Window_0_Text_0 = TextGadget(#PB_Any, 5, 5, 165, 20, "There have been no clicks yet")
Window_0_Button_1 = ButtonGadget(#PB_Any, 190, 10, 85, 30, "Click me")
EndIf
EndProcedure
flags = #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_ScreenCentered
window_0 = OpenWindow(#PB_Any, 408, 104, 280, 45, "Simple windowed application", flags)
If window_0
SmartWindowRefresh(window_0, #True)
window_0_Text_0 = TextGadget(#PB_Any, 5, 5, 165, 20, "There have been no clicks yet")
window_0_Button_1 = ButtonGadget(#PB_Any, 190, 10, 85, 30, "Click me")
OpenWindow_Window_0()
Repeat
Select WaitWindowEvent()
Case #PB_Event_Gadget
Select EventGadget()
Case Window_0_Text_0
Case Window_0_Button_1
Clicks+1
txt$="You Clicked "+Str(Clicks)+" time"
If Clicks>1: txt$+"s": EndIf
SetGadgetText(Window_0_Text_0,txt$)
EndSelect
Case #PB_Event_CloseWindow
End
EndSelect
ForEver
Repeat
Select WaitWindowEvent()
Case #PB_Event_Gadget
Select EventGadget()
Case window_0_Text_0
Case window_0_Button_1
clicks + 1
txt$ = "You Clicked " + Str(clicks) + " time"
If clicks > 1: txt$ + "s": EndIf
SetGadgetText(window_0_Text_0, txt$)
EndSelect
Case #PB_Event_CloseWindow
End
EndSelect
ForEver
EndIf