PureBasic logo in all my software
- marcoagpinto
- Addict
- Posts: 940
- Joined: Sun Mar 10, 2013 3:01 pm
- Location: Portugal
- Contact:
PureBasic logo in all my software
Hello!
Now, all things that I develop with a GUI will have:
Help > About PureBasic
Now, all things that I develop with a GUI will have:
Help > About PureBasic
- marcoagpinto
- Addict
- Posts: 940
- Joined: Sun Mar 10, 2013 3:01 pm
- Location: Portugal
- Contact:
Re: PureBasic logo in all my software
Thanks, djes and Fred, both for sending me the big logo + the "Z" one.djes wrote:Nice !
Re: PureBasic logo in all my software
Good idea to leave some reference to extend PB popularity.
I'm not writing programs used by lot of ppl, but anyway will do it wherever possible, probably by "non-tradionally" using one of the fields in a file version block [some field which is always shown in explorer of any Windows version, starting from XP]
I'm not writing programs used by lot of ppl, but anyway will do it wherever possible, probably by "non-tradionally" using one of the fields in a file version block [some field which is always shown in explorer of any Windows version, starting from XP]
"W̷i̷s̷h̷i̷n̷g o̷n a s̷t̷a̷r"
-
- Enthusiast
- Posts: 495
- Joined: Tue Oct 14, 2014 12:09 pm
Re: PureBasic logo in all my software
is-it possible to have the source of thi about box ?
Thanks in advance
Thanks in advance
- marcoagpinto
- Addict
- Posts: 940
- Joined: Sun Mar 10, 2013 3:01 pm
- Location: Portugal
- Contact:
Re: PureBasic logo in all my software
Here it is:loulou2522 wrote:is-it possible to have the source of thi about box ?
Thanks in advance
Somewhere at the start of the program:
Code: Select all
; Current PureBasic information
Global current_version_purebasic$="5.44 LTS"
Global current_release_date_purebasic$="6.Dec.2016"
Code: Select all
; About PureBasic window
;
; V1.0 - 9/FEB/2017
;
Procedure about_purebasic()
If OpenWindow(#WINDOW_ABOUT_PUREBASIC,0,0,320+100+200-15-30-10-10-5,200-50+100+10+3+20+10-10,"About PureBasic",#PB_Window_WindowCentered,WindowID(#WINDOW_MAIN))=#False : MessageRequester("Error", "Can't open a window.") : EndIf
DisableWindow(#WINDOW_MAIN,#True)
; Big logo 407x133 pixels
ImageGadget(#IMAGE_WINDOW_ABOUT_PUREBASIC,10,10,407,130,ImageID(31))
; Z logo 130x130 pixels
ImageGadget(#IMAGE_WINDOW_ABOUT_PUREBASIC_2,GadgetX(#IMAGE_WINDOW_ABOUT_PUREBASIC)+GadgetWidth(#IMAGE_WINDOW_ABOUT_PUREBASIC)+5,10,130,130,ImageID(32))
; Editor Gadget with PureBasic information
EditorGadget(#EDITOR_WINDOW_ABOUT_PUREBASIC,10,GadgetY(#IMAGE_WINDOW_ABOUT_PUREBASIC)+GadgetHeight(#IMAGE_WINDOW_ABOUT_PUREBASIC)+5,407+130-3-2-1,100+10-10,#PB_Editor_ReadOnly)
t$=""
t$+"Coded using PureBasic "+current_version_purebasic$+" - "+current_release_date_purebasic$+#CRLF$
t$+Chr(34)+"Feel the ..Pure.. Power"+Chr(34)+#CRLF$
t$+"© 1998-2017 Fantaisie Software."+#CRLF$
t$+"http://www.purebasic.com"
SetGadgetText(#EDITOR_WINDOW_ABOUT_PUREBASIC,t$)
; OKAY button
ButtonGadget(#BUTTON_WINDOW_ABOUT_PUREBASIC_OKAY,(320+100+200)/2-100+10,20+3+200-40-50+100+10+10+10-10,90,20+2+1,"OK")
; Add keyboard shortcuts
AddKeyboardShortcut(#WINDOW_ABOUT_PUREBASIC,#PB_Shortcut_Escape,1000)
AddKeyboardShortcut(#WINDOW_ABOUT_PUREBASIC,#PB_Shortcut_Return,1003)
; Wait for the user to press the OKAY button
okay=#False
Repeat
event=WaitWindowEvent()
; Pressed the close window gadget (Ubuntu) OR <ENTER> or <ESC>
If (event=#PB_Event_CloseWindow) Or (event=#PB_Event_Menu And EventMenu()=1003) Or (event=#PB_Event_Menu And EventMenu()=1000)
okay=#True
EndIf
Select event
Case #PB_Event_Gadget
Select EventGadget()
; OKAY button
Case #BUTTON_WINDOW_ABOUT_PUREBASIC_OKAY
okay=#True
EndSelect
EndSelect
Until okay=#True
; Close the About window and activate the main window
DisableWindow(#WINDOW_MAIN,#False)
CloseWindow(#WINDOW_ABOUT_PUREBASIC)
EndProcedure
Re: PureBasic logo in all my software
Okay, I think I speak for everyone here when I ask: why the heck do you code your numbers like that?
Code: Select all
#WINDOW_ABOUT_PUREBASIC,0,0,320+100+200-15-30-10-10-5,200-50+100+10+3+20+10-10,"About PureBasic"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Re: PureBasic logo in all my software
It's nice to share the source code, thank you
- marcoagpinto
- Addict
- Posts: 940
- Joined: Sun Mar 10, 2013 3:01 pm
- Location: Portugal
- Contact:
Re: PureBasic logo in all my software
Simple answer: I code the GUI by eye, which means I add and remove pixels until I get the right size. That is why I take hours to draw simple stuff.Dude wrote:Okay, I think I speak for everyone here when I ask: why the heck do you code your numbers like that?
Code: Select all
#WINDOW_ABOUT_PUREBASIC,0,0,320+100+200-15-30-10-10-5,200-50+100+10+3+20+10-10,"About PureBasic" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Re: PureBasic logo in all my software
If you change
to
What you get : No global variables and always the right compiler version and copyright year
What you lost : the suffix "LTS" if it's present and the release date of the compiler
Without manual changes....
Code: Select all
t$+"Coded using PureBasic "+current_version_purebasic$+" - "+current_release_date_purebasic$+#CRLF$
t$+Chr(34)+"Feel the ..Pure.. Power"+Chr(34)+#CRLF$
t$+"© 1998-2017 Fantaisie Software."+#CRLF$
Code: Select all
t$+"Coded using PureBasic "+InsertString(Str(#PB_Compiler_Version), ".", 2)+#CRLF$
t$+Chr(34)+"Feel the ..Pure.. Power"+Chr(34)+#CRLF$
t$+"© 1998-"+Str(Year(Date()))+" Fantaisie Software."+#CRLF$
What you lost : the suffix "LTS" if it's present and the release date of the compiler
Without manual changes....
- marcoagpinto
- Addict
- Posts: 940
- Joined: Sun Mar 10, 2013 3:01 pm
- Location: Portugal
- Contact:
Re: PureBasic logo in all my software
Both logo images:
1) text:
2) Z (transparency):
1) text:
2) Z (transparency):
Re: PureBasic logo in all my software
The built-in form designer would save you those hours. Just use it to size and position the gadgets as desired, then simply cut & paste the auto-generated gadget placements into your code.marcoagpinto wrote:I code the GUI by eye, which means I add and remove pixels until I get the right size. That is why I take hours to draw simple stuff.Code: Select all
#WINDOW_ABOUT_PUREBASIC,0,0,320+100+200-15-30-10-10-5,200-50+100+10+3+20+10-10,"About PureBasic"
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel
- Zebuddi123
- Enthusiast
- Posts: 794
- Joined: Wed Feb 01, 2012 3:30 pm
- Location: Nottinghamshire UK
- Contact:
Re: PureBasic logo in all my software
Hi marcoagpinto Hope you dont mind as its a good idea for promoting PB Ive made a module for my own use and will post it here.
Zebuddi.
Just include the module call
Example usage:
Module_PBAboutInfo.pbi --- Code to large Images included as bin data. download @ https://www.dropbox.com/s/57hr5gcknhl8h ... o.pbi?dl=0
Zebuddi.
Just include the module call
Code: Select all
about_purebasic(iParentWinID.i, sMsg.s, bGadgetType.b = 0, iWinColor.i =$6E7E94, iGadgetColor.i = $AEFBF7); Disables parent window & displays About Window. sMsg Adds a small message above the pb message in the editor window
Example usage:
Code: Select all
XIncludeFile "Module_PBAboutInfo.pbi"
UseModule PBAboutInfo
Global Window_0
Global Button_0
Procedure OpenWindow_0(x = 0, y = 0, width = 135, height = 65)
Window_0 = OpenWindow(#PB_Any, x, y, width, height, "AboutPB", #PB_Window_SystemMenu|#PB_Window_ScreenCentered)
Button_0 = ButtonGadget(#PB_Any, 0, 0, 135, 65, "Press")
EndProcedure
Procedure Window_0_Events(event)
Select event
Case #PB_Event_CloseWindow
ProcedureReturn #False
Case #PB_Event_Menu
Select EventMenu()
EndSelect
Case #PB_Event_Gadget
Select EventGadget()
Case Button_0
PBAboutInfo::about_purebasic(Window_0, "hello world from Zebbudi.", 1, $FFFFE0, $6BB7BD)
EndSelect
EndSelect
ProcedureReturn #True
EndProcedure
OpenWindow_0()
Repeat
event = WaitWindowEvent()
Until Window_0_Events(event) = #False
End
Module_PBAboutInfo.pbi --- Code to large Images included as bin data. download @ https://www.dropbox.com/s/57hr5gcknhl8h ... o.pbi?dl=0
Last edited by Zebuddi123 on Fri Feb 17, 2017 3:12 am, edited 1 time in total.
malleo, caput, bang. Ego, comprehendunt in tempore
- marcoagpinto
- Addict
- Posts: 940
- Joined: Sun Mar 10, 2013 3:01 pm
- Location: Portugal
- Contact:
Re: PureBasic logo in all my software
@Zebuddi
It looks fantastic!
I like the text centred!
It looks fantastic!
I like the text centred!
- marcoagpinto
- Addict
- Posts: 940
- Joined: Sun Mar 10, 2013 3:01 pm
- Location: Portugal
- Contact:
Re: PureBasic logo in all my software
@Zebuddi
How do I centre the lines in an EditorGadget?
EDIT: I saw your source code and it uses an: #ES_CENTER (but it doesn't come in the PB documentation)
How do I centre the lines in an EditorGadget?
EDIT: I saw your source code and it uses an: #ES_CENTER (but it doesn't come in the PB documentation)