; PureBasic Visual Designer v3.80 build 1249 ;- Window Constants ; Enumeration #Window_Opts #Window_Startup #Prep_Host #Window_Chat #Window_Join EndEnumeration ;- Gadget Constants ; Enumeration #Options #Gadget_1 #Flag #Add_Type #Add_Flag #Del_Item #Save #Load #Exit #SaveAS #GLoad #Help #About #Gadget_14 #GameList #Host_Game #Search #New_Game #Del_Game #SU_About #SU_Exit #Gadget_22 #SG_Name #Gadget_24 #MyISP #Gadget_26 #SG_Player #Gadget_28 #Gadget_29 #ProxyISP #Gadget_31 #UsePort #Gadget_33 #Gadget_34 #Total_Flags #Host_Method #Gadget_37 #Gadget_38 #Gadget_39 #Gadget_40 #Map_Type #Game_type #Display_Opts #Post_Game #HO_Exit #SH_About #Chat_List #Out_Chat #Send_Chat #Player_List #Gadget_53 #Bump_Player #Launch #Room_Exit #Clear_Chat #Gadget_58 #Gadget_59 #Join_TFlags #JD_Opts #Gadget_63 #Refresh #Fix_Options #Join_Game #Join_Exit #Join_Help #Join_About #Gadget_71 #Join_Flag #Host_Help #JD_Flag #Observers EndEnumeration Procedure Open_Window_Opts() If OpenWindow(#Window_Opts, 225, 235, 569, 266, #PB_Window_TitleBar | #PB_Window_ScreenCentered , "Options for game >") If CreateGadgetList(WindowID()) TreeGadget(#Options, 5, 25, 470, 205, #PB_Tree_AlwaysShowSelection | #PB_Tree_NoButtons | #PB_Tree_CheckBoxes) GadgetToolTip(#Options, "Options as listed in config file") TextGadget(#Gadget_1, 5, 5, 120, 20, "Game Options") StringGadget(#Flag, 5, 235, 290, 25, "") GadgetToolTip(#Flag, "/f description") ButtonGadget(#Add_Type, 300, 235, 85, 25, "Add Type") GadgetToolTip(#Add_Type, "Type of game option") ButtonGadget(#Add_Flag, 390, 235, 85, 25, "Add Flag") GadgetToolTip(#Add_Flag, "Actual game flag") ButtonGadget(#Del_Item, 480, 235, 85, 25, "Remove Entry") GadgetToolTip(#Del_Item, "Remove entry from list") ButtonGadget(#Save, 480, 25, 85, 25, "Save") GadgetToolTip(#Save, "Save Settings") ButtonGadget(#Load, 480, 85, 85, 25, "Load") GadgetToolTip(#Load, "Load game options") ButtonGadget(#Exit, 480, 145, 85, 25, "Exit") GadgetToolTip(#Exit, "Exit setting without save") ButtonGadget(#SaveAS, 480, 55, 85, 25, "Save As") GadgetToolTip(#SaveAS, "Save settings as new") ButtonGadget(#GLoad, 480, 115, 85, 25, "Default") GadgetToolTip(#GLoad, "Load generic game options") ButtonGadget(#Help, 480, 175, 85, 25, "Help") GadgetToolTip(#Help, "Launch notepad text help") ButtonGadget(#About, 480, 205, 85, 25, "About") GadgetToolTip(#About, "Norm wrote this") EndIf EndIf EndProcedure Procedure Open_Window_Startup() If OpenWindow(#Window_Startup , 326, 255, 366, 227, #PB_Window_TitleBar | #PB_Window_ScreenCentered , "Select a game to play") If CreateGadgetList(WindowID()) TextGadget(#Gadget_14, 5, 5, 85, 15, "Game List") ListViewGadget(#GameList, 5, 20, 260, 200) GadgetToolTip(#GameList, "List of supported games") ButtonGadget(#Host_Game, 275, 20, 85, 25, "Host Game") GadgetToolTip(#Host_Game, "Host selected game") ButtonGadget(#Search, 275, 55, 85, 25, "Search") GadgetToolTip(#Search, "Search for a game to join") ButtonGadget(#New_Game, 275, 90, 85, 25, "Add Game") GadgetToolTip(#New_Game, "Configure support for a new game") ButtonGadget(#Del_Game, 275, 125, 85, 25, "Delete Game") GadgetToolTip(#Del_Game, "Remove support for a selected game") ButtonGadget(#SU_About, 275, 160, 85, 25, "About") GadgetToolTip(#SU_About, "Norm did this") ButtonGadget(#SU_Exit, 275, 195, 85, 25, "Exit") GadgetToolTip(#SU_Exit, "Exit") EndIf EndIf EndProcedure Procedure Open_Prep_Host() If OpenWindow(#Prep_Host, 219, 247, 581, 243, #PB_Window_TitleBar | #PB_Window_ScreenCentered , "Host Options") If CreateGadgetList(WindowID()) TextGadget(#Gadget_22, 5, 10, 105, 20, "Session Game Name") StringGadget(#SG_Name, 110, 5, 130, 20, "MyGame") GadgetToolTip(#SG_Name, "The name that you will call this game") TextGadget(#Gadget_24, 250, 10, 55, 20, "Your ISP#") StringGadget(#MyISP, 305, 5, 125, 20, "") GadgetToolTip(#MyISP, "Your ISP address, change if not correct") TextGadget(#Gadget_26, 5, 40, 100, 20, "Player Name") StringGadget(#SG_Player, 110, 35, 130, 20, "MyName") GadgetToolTip(#SG_Player, "Your name while in this game") TextGadget(#Gadget_28, 435, 10, 30, 20, "Port#") TextGadget(#Gadget_29, 250, 40, 55, 20, "Proxy ISP#") StringGadget(#ProxyISP, 305, 35, 125, 20, "") GadgetToolTip(#ProxyISP, "ISP of proxy if used") TextGadget(#Gadget_31, 435, 40, 25, 20, "Port#") StringGadget(#UsePort, 470, 5, 45, 20, "") GadgetToolTip(#UsePort, "Default Port, leave blank if not known") StringGadget(#Gadget_33, 470, 35, 45, 20, "") GadgetToolTip(#Gadget_33, "Proxy port if used") TextGadget(#Gadget_34, 5, 70, 100, 20, "Commandline Flags") StringGadget(#Total_Flags, 110, 65, 405, 20, "") GadgetToolTip(#Total_Flags, "All flags called to host game") ComboBoxGadget(#Host_Method, 110, 95, 405, 160) GadgetToolTip(#Host_Method, "Select how the games will connect") TextGadget(#Gadget_37, 5, 100, 100, 15, "Host Method") TextGadget(#Gadget_38, 5, 160, 100, 15, "Map Type") TextGadget(#Gadget_39, 5, 190, 95, 15, "Game Type") TextGadget(#Gadget_40, 5, 220, 90, 15, "Display Option") ComboBoxGadget(#Map_Type, 110, 155, 405, 135) GadgetToolTip(#Map_Type, "Select a Map to play on") ComboBoxGadget(#Game_type, 110, 185, 405, 120) GadgetToolTip(#Game_type, "Select a game type to play") ComboBoxGadget(#Display_Opts, 110, 215, 405, 115) GadgetToolTip(#Display_Opts, "Pick a display option") ButtonGadget(#Post_Game, 525, 5, 50, 50, "Post Game", #PB_Button_MultiLine) GadgetToolTip(#Post_Game, "Inform server that you are wanting players") ButtonGadget(#HO_Exit, 525, 65, 50, 50, "Exit", #PB_Button_MultiLine) ButtonGadget(#SH_About, 525, 125, 50, 50, "About") GadgetToolTip(#SH_About, "Norm Wrote this") TextGadget(#Gadget_71, 5, 130, 100, 15, "Client Method") ComboBoxGadget(#Join_Flag, 110, 125, 405, 165) GadgetToolTip(#Join_Flag, "How other players join") ButtonGadget(#Host_Help, 525, 185, 50, 50, "Help") EndIf EndIf EndProcedure Procedure Open_Window_Chat() If OpenWindow(#Window_Chat, 222, 209, 574, 318, #PB_Window_TitleBar | #PB_Window_ScreenCentered , "Chat Window") If CreateGadgetList(WindowID()) ListViewGadget(#Chat_List, 5, 5, 450, 275) StringGadget(#Out_Chat, 5, 290, 370, 20, "") GadgetToolTip(#Out_Chat, "Place your chat here") ButtonGadget(#Send_Chat, 380, 285, 75, 25, "Send") GadgetToolTip(#Send_Chat, "Click to send chat string") ListViewGadget(#Player_List, 465, 20, 100, 145) GadgetToolTip(#Player_List, "Player List") TextGadget(#Gadget_53, 465, 5, 100, 15, "Players") ButtonGadget(#Bump_Player, 465, 195, 100, 25, "Bump Player") GadgetToolTip(#Bump_Player, "Remove player from room") ButtonGadget(#Launch, 465, 225, 100, 25, "Launch Game") GadgetToolTip(#Launch, "Launch game with current players") ButtonGadget(#Room_Exit, 465, 255, 100, 25, "Exit") GadgetToolTip(#Room_Exit, "Exit game room") ButtonGadget(#Clear_Chat, 465, 285, 100, 25, "Clear_Chat") GadgetToolTip(#Clear_Chat, "Clear chat window") CheckBoxGadget(#Observers, 465, 170, 100, 20, "Permit Observers") GadgetToolTip(#Observers, "if checked, players can join the game after launch") EndIf EndIf EndProcedure Procedure Open_Window_Join() If OpenWindow(#Window_Join, 179, 247, 660, 243, #PB_Window_TitleBar | #PB_Window_ScreenCentered , "Select a game to join") If CreateGadgetList(WindowID()) ListIconGadget(#Gadget_58, 5, 5, 585, 150, "", 0) TextGadget(#Gadget_59, 5, 190, 75, 20, "Display Options") StringGadget(#Join_TFlags, 80, 160, 510, 20, "") GadgetToolTip(#Join_TFlags, "Flags to join a game") ComboBoxGadget(#JD_Opts, 80, 185, 510, 120) GadgetToolTip(#JD_Opts, "Supported Display Options") TextGadget(#Gadget_63, 5, 215, 60, 20, "Join Flag") ButtonGadget(#Refresh, 595, 5, 60, 30, "Refresh") GadgetToolTip(#Refresh, "Re-scan for games") ButtonGadget(#Fix_Options, 595, 45, 60, 30, "Options") GadgetToolTip(#Fix_Options, "Update flags for selected game") ButtonGadget(#Join_Game, 595, 85, 60, 30, "Join") GadgetToolTip(#Join_Game, "Join selected game") ButtonGadget(#Join_Exit, 595, 125, 60, 30, "Exit") ButtonGadget(#Join_Help, 595, 165, 60, 30, "Help") GadgetToolTip(#Join_Help, "Some tips here") ButtonGadget(#Join_About, 595, 205, 60, 30, "About") GadgetToolTip(#Join_About, "Norm did this") StringGadget(#JD_Flag, 80, 215, 510, 20, "", #PB_String_ReadOnly) GadgetToolTip(#JD_Flag, "How to join a game") EndIf EndIf EndProcedure ; ExecutableFormat= ; EOF