BCF is a library built for Blitz 3D & 2D programmers, and it was made in order to easily build user interfaces for your 3D or 2D projects.
This library
is Free of use, and is, in it's actual state of development, working well, and
for any questions or problem we can help you on Blitz3dfr's forum http://www.blitz3dfr.com
and of course, we can only help you if you haven't modified the library's source
code !
Otherwise then just good luck debugging it :)
The only thing we ask is that you mention BCF in your application, since we spent many hours working on it, for your pleasure ? So please use the command : BCF_AboutBCF() in your software, thanks a lot !
Actual Version :
- BCF Version 3.0 Build 1.01
What changes in 3.00 ? :
- Refresh speed up ! X2
- Nice change in GUI
- Screen selector plugin
- Pop Up menu plugin
- Color selector plugin
- Many bugs removed
Special thanks :
We personally
thank ourselves for working on this project, nico and me ! And of course we
both thank our wives for their patience during the long coding hours spent on
this project. I'd like to specially thank Nicolas Poursin, since this version
would never got so far without his help !
And finally I thank myself for having the idea of creating BCF !
And special thank to ZOU for the english
translation ... and thanks to all my customers ... for debugging ;)
BCF interface related commands :
BCF_InitBCF(Localization,GuiStyle)
Allows you to initialize the BCF interface, it must be declared at the beginning of the application.
The localization
option can be initialised to 1=french and 2=english (used for internal requester
and plugin ! you can know what is this parameter with using : print BCF_Localization
(return 1 or 2).
The GuiStyle parameter can change de gui look (1,2,3). You can know what is
the BCF style by dumping the BCF_GuiStyle variable (ex : print BCF_GuiStyle)
Example :
Include "Inc_BCF.bb"
Graphics3D 640,480,16,0
SetBuffer BackBuffer()
BCF_InitGui(2,1) ; Init BCF style 3 and english langage and 3D normal
BCF_KillBCF()
Allows you to free the memory used by BCF interface, usually
declared at the end of the application.
Example :
BCF_KillBCF()
End
BCF_RenderBCF()
Allows you to manage BCF's interface, it has to be used in the main loop, after the 'UpdateWorld/RenderWorld' but before the 'Flip'.
Example :
While Not
KeyDown( 1 )
UpdateWorld
RenderWorld
BCF_RenderBCF()
Flip
Wend
BCF_AboutBCF()
Shows a dialog box on the version of BCF 2.0.
Example :
Include "Inc_BCF.bb"
Graphics3D 640,480,16,0
SetBuffer BackBuffer()
BCF_InitGui(1,1)
Camera=CreateCamera()
BCF_AboutBCF()
BCF_EnableGadget(GadgetID, Enable)
You can disable or enable a gadget, the parameters are :
GadgetID
= Button id, bitmap button id, combobox id, icon id, checkbox id
Enable = True or False
BCF_SetVisible(GadgetId, View)
You can show or hide a gadget, the parameters are :
GadgetID
= Gadget ID
View = True or False
BCF_Init3DMouse(Style)
Initialises the mouse, has to be declared at the beginning of the application.
Style = Mouse cursor's style, for now there are 4 different cursors types.
Example :
Include "Inc_BCF.bb"
Graphics3D 640,480,16,0
SetBuffer BackBuffer()
BCF_InitGui(1,2)
BCF_Init3DMouse(3)
Allows you to stop displaying the mouse cursor. If you want to make it visible again, use the BCF_Init3DMouse() command.
BCF_CreateWindow(Px,Py,Tx,Ty,Style,Icon,Label$,Minimize,Close,Lock)
Creates a window, the parameters are :
Px= X position of the window
Py= Y position of the window
Tx= Width of the window
Ty= Height of the window
Style = Allows you to choose the window style, use BCF_GuiStyle.
Icon = Allows you to select an icon for the title bar, for now there are 5 different icons.
Label$ =
Defines the title bar's text.
Minimize = Defines whether the window has a reduction gadget or not (True or
False).
Close =
Defines whether the window has a closing gadget or not (True or False).
Lock = Defines whether the window can move.
BCF_LockWindow(WinID,Lock)
With this function you can lock a window.
Id= Window
Id.
Lock=True ou False
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
BCF_LockWindow(MyWindow,True)
Début
BCF_Window(Id)
Tells whether a window is opened or not, the parameters are :
Id= Window Id.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF Version 2.0")
If BCF_Window(
MyWindow)=True then
Print "The window is opened"
endif
BCF_GetWindowX(Id)
Returns the X position of a window, the parameters are :
Id= Window Id.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
PosX=BCF_GetWindowX(MyWindow)
BCF_GetWindowY(Id)
Returns the Y position of a window, the parameters are :
Id= Window Id.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
PosY=BCF_GetWindowY(MyWindow)
BCF_GetWindowWidth(Id)
Returns the width of a window, the parameters are :
Id= Window Id.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
Largeur=BCF_GetWindowWidth(MyWindow)
Returns the height of a window, the parameters are :
Id= Window Id.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
Hauteur=BCF_GetWindowHeight(MyWindow)
BCF_ChangeWindowLabel(Id,Label$)
Allows you to change the title text of a window, the parameters are :
Id = Window Id.
Label$ = New title text
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
BCF_ChangeWindowLabel(MyWindow,"New title")
BCF_ChangeWindowPosition(Id,Px,Py)
Allows you to change the X and Y position of a window, the parameters are :
Id = Window Id.
Px = New X position.
Py = New Y position.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
BCF_ChangeWindowPosition(MyWindow,100,100)
BCF_TestWindowsMinimized(Id)
Allows to check if a window is minimized, the parameters are :
Id=Window
Id.
Example :
Mafenetre=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
Test=BCF_TestWindowsMinimized(Mafenetre)
BCF_MinimizeWindow(Id)
Allows you minimize a window, the parameters are :
Id=Window
Id.
Example
:
Mafenetre=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
BCF_MinimizeWindow(Mafenetre)
BCF_MaximizeWindow(Id)
Allows you maximize a window, the parameters are :
Id=Window
Id.
Example :
Mafenetre=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
BCF_MaximizeWindow(Mafenetre)
BCF_MaximizeAllWindow()
Maximize all the windows.
BCF_MinimizeAllWindow()
Minimize all the windows.
BCF_KillWindow(Id)
Destroys a window and all its gadgets (buttons, sliders, combos...), the parameters are :
Id = Window Id.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
BCF_KillWindow(MyWindow)
BCF_TestLastWindow()
You can check if a windows is present on the screen, return True or False :
Exemple :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF Version 2.0",True,True)
While Not KeyDown(1) Or BCF_TestLastWindow()=True ; If some window are on the
screen return False, if not window return True
.......
Wend
BCF_CreateButton(WinId,Px,Py,Tx,Ty,Label$)
Creates a button, the parameters are :
WindId = Window Id, or False if you want the button directly on the screen.
Px = X position of the button.
Py = Y position of the button.
Tx = Width of the button.
Ty = Height of the button.
Label$ = Defines the button text.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
Button0=BCF_CreateButton(MyWindow,10,90,200,20,"My exit button")
BCF_TestButton(Id)
Tests if the user has clicked on a button, the parameters are :
Id = Button Id.
Example :
Button0=BCF_CreateButton(MyWindow,10,90,200,20,"My exit button")
If BCF_TestButton(Button0)
Then
End
EndIf
BCF_TestButtonPressed(Id)
Tests if the user is clicking on a button, the parameters are :
Id = Button Id.
Example :
Button0=BCF_CreateButton(MyWindow,10,90,200,20,"My exit button")
If BCF_TestButtonPressed(Button0)
Then
Zoom#=Zoom#+0.1
EndIf
BCF_ChangeButtonLabel(Id,Label$)
Changes the button text, the parameters are :
Id = Button Id.
Label$ = New button label.
Example :
Button0=BCF_CreateButton(MyWindow,10,90,200,20,"My
exit button")
BCF_ChangeButtonLabel(Button0,"My label")
INFORMATION : This command need to redraw all BCF controls ! and consume many
FPS ! must be used one time ! not all the time !
BCF_ChangeButtonPosition(Id,Px,Py)
Changes the button position, the parameters are :
Id = Button Id.
Px,PY = New button position.
Example :
Button0=BCF_CreateButton(MyWindow,10,90,200,20,"My
exit button")
BCF_ChangeButtonPosition(Button0,Rnd(500),Rnd(500))
BCF_CreateButtonToolTip(ButtonID,ToolTip$)
Add a tooltip on a button:
Id = Button Id.
ToolTip$ = The tooltip text.
Example :
Button0=BCF_CreateButton(MyWindow,10,90,200,20,"Save
as")
BCF_CreateButtonToolTip(Button0,"With this button you can save the file")
BCF_DisableButtonToolTip(ButtonID)
Remove a tooltip on a button:
ButtonId = Button Id.
Destroys a button, the parameters are :
Id = Button Id.
Example :
Button0=BCF_CreateButton(MyWindow,10,90,200,20,"My
exit button")
BCF_KillButton(Button0)
Home
BCF_CreateBitmapButton(WinId,Px,Py,Image$,BorderStyle)
Creates a bitmap button, the parameters are :
WindId = Window Id, or False if you want the bitmap button directly on the screen.
Px = X position of the bitmap button.
Py = Y position of the bitmap button.
Image$ =
Defines the bitmap button.
BorderStyle = 0 no border,1 with border
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
Button0=BCF_CreateBitmapButton(MyWindow,10,90,"C:\Tmp\Button01.bmp",0)
BCF_CreateBitmapButtonToolTip(ButtonID,ToolTip$)
Add a tooltip on a bitmap button:
Id = Button Id.
ToolTip$ = The tooltip text.
Example :
Button0=BCF_CreateBitmapButton(MyWindow,10,90,"C:\Tmp\Button01.bmp",0)
BCF_CreateBitmapButtonToolTip(Button0,"With this button you can save the
file")
BCF_DisableBitmapButtonToolTip(ButtonID)
Remove a tooltip on a bitmap button:
ButtonId = Button Id.
BCF_ChangeBitmapButtonPosition(Id,Px,Py)
Changes the bitmap button position, the parameters are :
Id = Button Id.
Px,PY = New bitmap button position.
Example :
Button0=BCF_CreateBitmapButton(MyWindow,10,90,"C:\Tmp\Button01.bmp",0)
BCF_ChangeButtonPosition(Button0,Rnd(500),Rnd(500))
BCF_TestBitmapButton(Id)
Tests if the user has clicked on a bitmap button, the parameters are :
Id = Button Id.
Example :
Button0=BCF_CreateBitmapButton(MyWindow,10,90,"C:\Tmp\Button01.bmp",BCF_GuiStyle)
If BCF_TestBitmapButton(Button0)
Then
End
EndIf
BCF_TestBitmapButtonPressed(Id)
Tests if the user is clocking on a bitmap button, the parameters are :
Id = Button Id.
Example :
Button0=BCF_CreateBitmapButton(MyWindow,10,90,"C:\Tmp\Button01.bmp",BCF_GuiStyle)
If BCF_TestBitmapButtonPressed(Button0)
Then
Zoom#=Zoom#+0.1
EndIf
Destroys a bitmap button, the parameters are :
Id = Button Id.
Example :
Button0=BCF_CreateBitmapButton(MyWindow,10,90,"C:\Tmp\Button01.bmp",BCF_GuiStyle)
BCF_KillBitmapButton(Button0)
BCF_CreateColorIcon(WinID,Px,Py,Tx,Ty,BCF_Color,BCF_GuiStyle)
You can create color icon gadget.
WindId = Window Id, or False if you want the slider directly on the screen.
Px = X position of the color icon.
Py = Y position of the color icon.
Tx = Width of the color icon.
Ty = Height of the color icon.
Example :
Button03=BCF_CreateColorIcon(MaFenetre,5,70,20,20,MyColor03,BCF_GuiStyle)
See : Exemple - BCF Simple Color Button.bb
BCF_ChangeColorIcon(Id,BCF_Color)
This function can change the color icon color, you must use BCF system color.
Id=Color icon ID.
Example :
Button03=BCF_CreateColorIcon(MaFenetre,5,70,20,20,MyColor03,BCF_GuiStyle)
BCF_ChangeColorIcon(Button03,MyColor03)
See : Exemple - BCF Simple Color Button.bb
BCF_CreateSlider(WinId,Px,Py,Tx,Ty,Min#,Max#,Value#,Integer,Label$,Style,
Red,Green,Blue)
Creates a Slider that allows the user to dynamically change a value (integer or not), the parameters are :
WindId = Window Id, or False if you want the slider directly on the screen.
Px = X position of the slider.
Py = Y position of the slider.
Tx = Width of the slider.
Ty = Height of the slider.
Min# = Minimum value of the slider.
Max# = Maximum value of the slider.
Value# = Default displayed slider value.
Integer = Defines whether the slider returns an integer value (True) or a float (False).
Label$ = Slider Text.
Style = Defines the slider style, 1=Normal 3D bar, 2= gradated bar
Red,Green,Blue = Slider color.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
Slider1=BCF_CreateSlider(MyWindow,10,40,150,20,-5,5,1,True,"Rotation",2,50,255,50)
Changes the slider text, the parameters are :
Id = Slider Id.
Label$ = Slider Text.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
Slider1=BCF_CreateSlider(MyWindow,10,40,150,20,-5,5,1,True,"Rotation",2,50,255,50)
BCF_ChangeSliderLabel(Slider1,"Move")
Changes the slider value, the parameters are :
Id = Slider Id.
Value = New slider value.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
Slider1=BCF_CreateSlider(MyWindow,10,40,150,20,-5,5,1,True,"Rotation",2,50,255,50)
BCF_ChangeSliderValue(Slider1,3)
BCF_TestSlider#(Id)
Tests the slider result, the parameters are :
Id = Slider Id.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
Slider1=BCF_CreateSlider(MyWindow,10,40,150,20,-5,5,1,True,"Rotation",2,50,255,50)
While Not KeyDown( 1 )
UpdateWorld
RenderWorld
Rotation#=BCF_TestSlider#(Slider1)
TurnEntity Objet,Rotation#,Rotation#,Rotation#
BCF_RenderBCF()
Flip
Wend
BCF_KillSlider(Id)
Destroys a slider, the parameters are :
Id = Slider Id.
Example :
Slider1=BCF_CreateSlider(MyWindow,10,40,150,20,-5,5,1,True,"Rotation",2,50,255,50)
BCF_KillSlider(Slider1)
BCF_CreateCheckBox(WinId,Px,Py,State,Label$)
Creates a ‘Yes / No’ button, the parameters are :
WindId = Window Id, or False if you want the button directly on the screen.
Px = X position of the button.
Py = Y position of the button.
State = CheckBox state (0 = Unchecked, 1 = Checked).
Label$ = Defines the CheckBox text.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
Check1=BCF_CreateCheckBox(MyWindow,10,10,0,"Random colors ?")
BCF_ChangeCheckboxLabel(Id,Label$)
Changes the CheckBox label, the parameters are :
Id = CheckBox Id.
Label$ = New CheckBox Text.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
Check1=BCF_CreateCheckBox(MyWindow,10,10,0,"Random colors ?")
BCF_ChangeCkeckboxLabel(Check1,"Non random colors ?")
Changes the CheckBox state, the parameters are :
Id = CheckBox Id.
State = CheckBox state, 0 = Unchecked, 1 = Checked.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
Check1=BCF_CreateCheckBox(MyWindow,10,10,0,"Random colors ?")
BCF_ChangeCkeckboxState(Check1,1)
BCF_KillCheckBox(Id)
Destroys a CheckBox, the parameters are :
Id = CheckBox Id.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
Check1=BCF_CreateCheckBox(MyWindow,10,10,0,"Random colors ?")
BCF_KillCheckBox(Check1)
Progress bar related commands :
BCF_CreateGauge(WinId,Px,Py,Tx,Ty,Value,Max,Label$,Style,Red,Green,Blue)
Creates a progress bar from 0 to 100%, the parameters are :
WindId = Window Id, or False if you want the gauge directly on the screen.
Px = X Position of the gauge.
Py = Y Position of the gauge.
Tx = Width of the gauge.
Ty = Height of the gauge.
Value = Actual gauge value.
Max = Maximum gauge value.
Label$ = Defines the gauge text.
Style = Gauge style : 1 = 3D flat, 2 = Gradated bar.
Red,Green,Blue = Defines the gauge color.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
Gauge1=BCF_CreateGauge(MyWindow,10,160,150,20,0,6000,"Lecture du fichier",1,50,255,50)
Changes the gauge progress value, from 0 to 100%, the parameters are :
Id = Gauge Id.
Value = New gauge value.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
Gauge1=BCF_CreateGauge(MyWindow,10,160,150,20,0,6000,"File reading progress…",1,50,255,50)
BCF_ChangeGaugeValue(Gauge1,3000)
Remark : The displayed number will be 50%
BCF_CreateInfoText(Px,Py,Tx,Ty,Style,Label$)
Creates an InfoText, it is a overlapping 3D frame that contains text, (so it displays over any gadget), and so you can use it to display FPS, or the mouse position, or any other information. They are like LabelText but aren’t linked to a window. The parameters are :
Px = X Position of the InfoText.
Py = Y Position of the InfoText.
Tx = Width of the InfoText.
Ty = Height of the InfoText.
Style = InfoText Style : 1=Flat 3D background, 2=Gradated 3D background.
Label$ = Text displayed in the InfoText.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
Info=BCF_CreateInfoText(0,0,150,20,1,"X position of the mouse : "+MouseX())
BCF_ChangeInfoTextLabel(Id,Label$)
Changes the InfoText's text, the parameters are :
Id = InfoText ID.
Label$ = New InfoText text.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
Info=BCF_CreateInfoText(0,0,150,20,1,"Text number one”)
BCF_ChangeInfoTextLabel(Info,"New text")
Changes the InfoText's position, the parameters are :
Id = InfoText Id.
Px = X Position of the InfoText.
Py = Y Position of the InfoText.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
Info=BCF_CreateInfoText(0,0,150,20,1,"Text number one")
BCF_ChangeInfoTextPosition(Info,50,50)
BCF_CreateLabelText(WinId,Px,Py,Label$,Align,Style)
Creates a LabelText, it is a text dynamically changeable, linked to a window, the parameters are :
WindId = Window Id, or False if you want the LabelText directly on the screen.
Px = X Position of the LabelText.
Py = Y Position of the LabelText.
Label$ = Defines the text of the LabelText, you can create a multiline LabeLText by inserting a “|”.
Align = Defines the alignment of the LabelText, 1 = Left, 2 = Centered
Style = Defines the LabelText style, 1 = Normal text, 2 = Shaded text.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
label4 = BCF_CreateLabelText(MyWindow,3,210,"Text selection|separated by
a line",1,1)
Changes the text of a LabelText, the parameters are :
Id = LabelText Id.
Label$ = New text of the LabelText.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
label4 = BCF_CreateLabelText(MyWindow,3,210,"Text selection|separated by
a line",1,2)
BCF_ChangeLabelTextLabel(label4,"New text")
Changes the alignment of a LabelText, the parameters are :
Id = LabelText Id.
Align = Defines the alignment of the LabelText, 1 = Left, 2 = Centered.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
label4 = BCF_CreateLabelText(MyWindow,3,210,"Text selection|separated by
a line",1,2)
BCF_ChangeLabelTextAlign(label4,2)
BCF_ChangeLabelTextStyle(Id,Style)
Changes the style of a LabelText, the parameters are :
Id = LabelText Id.
Style = New LabelText style, 1 = Normal text, 2 = Shaded text.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
label4 = BCF_CreateLabelText(MyWindow,3,210,"Text selection|separated by
a line",1,2)
BCF_ChangeLabelTextStyle(label4,1)
BCF_ChangeLabelTextPosition(Id,Px,Py)
Changes the position of a LabelText, the parameters are :
Id = LabelText Id.
Px = New X position.
Py = New Y position.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
label4 = BCF_CreateLabelText(MyWindow,3,210,"Text selection|separated by
a line",1,2)
BCF_ChangeLabelTextPosition(label4,50,50)
BCF_KillLabelText(Id)
Destroys a LabelText, the parameters are :
Id = LabelText Id.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
label4 = BCF_CreateLabelText(MyWindow,3,210,"Text selection|separated by
a line",1,2)
BCF_KillLabelText(label4)
BCF_GetLabelTextLabel$(Id)
Return the labeltext label, the parameters are :
Id = LabelText Id.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
label4 = BCF_CreateLabelText(MyWindow,3,210,"Text selection|separated by
a line",1,2)
A$=BCF_GetLabelTextLabel$(label4)
BCF_CreateInputBox(WinId,Px,Py,Label$,MaxLen,CapsOnly,Type_Input,MaxVisChar)
Creates an editable text field, very useful to input text or values, the parameters are :
WindId = Window Id, or False if you want the InputBox directly on the screen.
Px = X Position of the InputBox.
Py = Y Position of the InputBox.
Label$ = Defines the text of the InputBox.
MaxLen = Defines the maximal amount of characters of the InputBox.
CapsOnly
= Defines whether all text will be converted into Caps or not. True = Caps,
False= Capital letters and small letters.
Type_Input=Define the inputbox type (1=All character's, 2=Only integer's,3=Only
float)
MaxVisChar=Define the width of the input box.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
Input2=BCF_CreateInputBox(MyWindow,3,30,"Please input your text",80,False,1,20)
BCF_ChangeInputBoxLabel(Id,Label$)
Changes the text of a InputBox, the parameters are :
Id = InputBox Id.
Label$ = New InputBox Text.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
Input2=BCF_CreateInputBox(MyWindow,3,30,"Please input your text",19,False)
BCF_ChangeInputBoxLabel(Input2,"Hiya")
BCF_CreateListBox(WinId,Px,Py,Tx,Ty)
Creates a list with a scroller in which you can insert text fields, this kind of list can be really useful to let the user pick an option (screen resolution for example), the parameters are :
WindId = Window Id, or False if you want the ListBox directly on the screen.
Px = X Position of the ListBox.
Py = Y Position of the ListBox.
Tx = Width of the ListBox.
Ty = Height of the ListBox.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
List=BCF_CreateListBox(MyWindow,3,5,180,142)
BCF_AddListBoxItem( Id , Label$ )
Creates an item in a ListBox, the parameters are :
Id = ListBox Id.
Label$ = Item text that you want to add.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
List=BCF_CreateListBox(MyWindow,3,5,180,142)
BCF_AddListBoxItem( List, "Color type n°1")
BCF_AddListBoxItem( List, "Color type n°2")
BCF_AddListBoxItem( List, "Color type n°3")
BCF_AddListBoxItem( List, "Color type n°4")
BCF_AddListBoxItem( List, "Color type n°5")
BCF_KillListBoxItem(Id,Label$)
Deletes an item from a ListBox, the parameters are :
Id = ListBox Id.
Label$ = Text of the item you want to delete.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
List=BCF_CreateListBox(MyWindow,3,5,180,142)
BCF_AddListBoxItem( List, "Color type n°1")
BCF_AddListBoxItem( List, "Color type n°2")
BCF_AddListBoxItem( List, "Color type n°3")
BCF_AddListBoxItem( List, "Color type n°4")
BCF_AddListBoxItem( List, "Color type n°5")
BCF_KillListBoxItem( List, "Color type n°3")
BCF_ClearListBox(Id)
Deletes all the items of a ListBox, the parameters are :
Id = ListBox Id.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
List=BCF_CreateListBox(MyWindow,3,5,180,142)
BCF_AddListBoxItem( List, "Color type n°1")
BCF_AddListBoxItem( List, "Color type n°2")
BCF_AddListBoxItem( List, "Color type n°3")
BCF_AddListBoxItem( List, "Color type n°4")
BCF_AddListBoxItem( List, "Color type n°5")
BCF_ClearListBox( List )
BCF_SelectedListBoxValue(Id,Label$)
With this command you can pre-select an tiem, the parameters are :
Id = ListBox Id.
Label$ = ListBox label.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF Version 2.0")
List=BCF_CreateListBox(MyWindow,3,5,180,142)
BCF_AddListBoxItem( List, "Color type n°1")
BCF_AddListBoxItem( List, "Color type n°2")
BCF_AddListBoxItem( List, "Color type n°3")
BCF_AddListBoxItem( List, "Color type n°4")
BCF_AddListBoxItem( List, "Color type n°5")
BCF_SelectedListBoxValue( Liste , "Type de couleur n°3" )
BCF_KillListBox( Id )
Destroys a ListBox, the parameters are :
Id = ListBox Id.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
List=BCF_CreateListBox(MyWindow,3,5,180,142)
BCF_AddListBoxItem( List, "Color type n°1")
BCF_AddListBoxItem( List, "Color type n°2")
BCF_AddListBoxItem( List, "Color type n°3")
BCF_AddListBoxItem( List, "Color type n°4")
BCF_AddListBoxItem( List, "Color type n°5")
BCF_KillListBox(List)
Tests what is the selected item of a ListBox, the parameters are :
Id = ListBox Id.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
List=BCF_CreateListBox(MyWindow,3,5,180,142)
BCF_AddListBoxItem( List, "Color type n°1")
BCF_AddListBoxItem( List, "Color type n°2")
BCF_AddListBoxItem( List, "Color type n°3")
BCF_AddListBoxItem( List, "Color type n°4")
BCF_AddListBoxItem( List, "Color type n°5")
While Not KeyDown( 1 )
TmpSelection$ = BCF_TestListBox$(List)
Select TmpSelection$
Case "Color type n°1"
LightColor Light1,0,255,0
LightColor Light2,255,0,0
Case "Color type n°2"
LightColor Light1,0,0,255
LightColor Light2,0,255,0
Case "Color type n°3"
LightColor Light1,0,255,255
LightColor Light2,255,255,0
Case "Color type n°4"
LightColor Light1,255,255,0
LightColor Light2,55,255,150
Case "Color type n°5"
LightColor Light1,55,255,150
LightColor Light2,55,55,150
End Select
RenderWorld
UpdateWorld
BCF_RenderBCF()
Flip
Wend
BCF_CreateComboBox( WinId,Px,Py,Tx,Lh)
Creates a ComboBox in which you can insert text fields, this kind of list can be useful to let the user pick some options (screen resolutions for example), the parameters are :
WindId = Window Id, or False if you want the ComboBox directly on the screen.
Px = X Position of the ComboxBox.
Py = Y Position of the ComboxBox.
Tx = Width of the ComboxBox.
Lh = Height of the ComboxBox unfolded.
Example :
List=BCF_CreateComboxBox(MyWindow,3,5,180,100)
BCF_AddComboBoxItem(Id, Label$)
Creates an item in a ComboBox, the parameters are :
Id = ComboBox Id.
Label$ = Item text you want to add to the ComboBox.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
List=BCF_CreateComboxBox(MyWindow,3,5,180,100)
BCF_AddComboBoxItem( List, "Color type n°1")
BCF_AddComboBoxItem( List, "Color type n°2")
BCF_AddComboBoxItem( List, "Color type n°3")
BCF_AddComboBoxItem( List, "Color type n°4")
BCF_AddComboBoxItem( List, "Color type n°5")
BCF_KillComboBoxItem (Id,Label$)
Deletes an item from a ComboBox, the parameters are :
Id = ComboBox Id.
Label$ = Text of the item you want to delete.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
List=BCF_CreateComboxBox(MyWindow,3,5,180,142)
BCF_AddComboBoxItem( List, "Color type n°1")
BCF_AddComboBoxItem( List, "Color type n°2")
BCF_AddComboBoxItem( List, "Color type n°3")
BCF_AddComboBoxItem( List, "Color type n°4")
BCF_AddComboBoxItem( List, "Color type n°5")
BCF_KillComboBoxItem( List, "Color type n°3")
BCF_SelectedComboBoxValue(Id,Label$)
Pre-selects a ‘default’ item displayed in a ComboBox, the parameters are :
Id = ComboBox Id.
Label$ = Text of the item you want to select.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
List=BCF_CreateComboxBox(MyWindow,3,5,180,142)
BCF_AddComboBoxItem( List, "Color type n°1")
BCF_AddComboBoxItem( List, "Color type n°2")
BCF_AddComboBoxItem( List, "Color type n°3")
BCF_AddComboBoxItem( List, "Color type n°4")
BCF_AddComboBoxItem( List, "Color type n°5")
BCF_SelectedComboBoxValue( List, "Color type n°4" )
Deletes all the items of a ComboBox, the parameters are :
Id = ComboBox Id.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
List=BCF_CreateComboxBox(MyWindow,3,5,180,142)
BCF_AddComboBoxItem( List, "Color type n°1")
BCF_AddComboBoxItem( List, "Color type n°2")
BCF_AddComboBoxItem( List, "Color type n°3")
BCF_AddComboBoxItem( List, "Color type n°4")
BCF_AddComboBoxItem( List, "Color type n°5")
BCF_ClearComboBox( List )
BCF_KillComboBox(Id)
Destroys a ComboBox, the parameters are :
Id = ComboBox Id.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
List=BCF_CreateComboxBox(MyWindow,3,5,180,142)
BCF_AddComboBoxItem( List, "Color type n°1")
BCF_AddComboBoxItem( List, "Color type n°2")
BCF_AddComboBoxItem( List, "Color type n°3")
BCF_AddComboBoxItem( List, "Color type n°4")
BCF_AddComboBoxItem( List, "Color type n°5")
BCF_KillComboBox( List )
BCF_TestComboBox$(Id)
Tests what item has been selected in a ComboBox, the parameters are :
Id = ComboBox Id.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
List=BCF_CreateComboxBox(MyWindow,3,5,180,142)
BCF_AddComboBoxItem( List, "Color type n°1")
BCF_AddComboBoxItem( List, "Color type n°2")
BCF_AddComboBoxItem( List, "Color type n°3")
BCF_AddComboBoxItem( List, "Color type n°4")
BCF_AddComboBoxItem( List, "Color type n°5")
While Not KeyDown( 1 )
TmpSelection$ = BCF_TestComboBox$(List)
Select TmpSelection$
Case "Color type n°1"
LightColor Light1,0,255,0
LightColor Light2,255,0,0
Case "Color type n°2"
LightColor Light1,0,0,255
LightColor Light2,0,255,0
Case "Color type n°3"
LightColor Light1,0,255,255
LightColor Light2,255,255,0
Case "Color type n°4"
LightColor Light1,255,255,0
LightColor Light2,55,255,150
Case "Color type n°5"
LightColor Light1,55,255,150
LightColor Light2,55,55,150
End Select
RenderWorld
UpdateWorld
BCF_RenderBCF()
Flip
Wend
BCF_CreateImage(WinId,Px,Py,Tx,Ty,File$)
Displays an image in a frame on a window the parameters are :
WindId = Window Id, or False if you want the Image directly on the screen.
Px = X Position of the image.
Py = Y Position of the image.
Tx = Width of the image.
Ty = Height of the image.
File$ = Filename of the image.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
Image=BCF_CreateImage( MyWindow,10,10,300,280,"Logo BCF 2.0.jpg" )
BCF_KillImage(Id)
Destroys an already displayed image, the parameters are :
Id = Image Id.
Example :
MyWindow=BCF_CreateWindow(10,10,175,230,BCF_GuiStyle,4,"BCF
Version 2.0")
Image=BCF_CreateImage( MyWindow,10,10,300,280,"Logo BCF 2.0.jpg" )
BCF_KillImage(Image)
Dialog boxes related commands :
BCF_MsgBox(Title$,Message$,RequestType,IconType)
Displays a ‘Yes / No / Cancel’ dialog box to ask a choice or tell something to the user, the parameters are :
Title$ = Title text of the dialog box.
Message$ = Text of the dialog box message.
RequestType
= Defines the type of the dialog box : 0 = a single button (Ok), 1 = two buttons
(Yes / No), 2 = three buttons (Yes / No / Cancel).
IconType = You can ask an icon (0=No icon,1=Alert,2=Question,3=Warning)
The returned parameters are really simple : 0 = ‘Ok’ button, 1 = ‘Yes’ button, 2 = ‘No’ button, 3 = ‘Cancel’ button.
Example :
Rep=BCF_MsgBox("Information","Requester Type Yes/No",1)
If Rep=1 then
Print "You clicked on ‘yes’"
endif
If Rep=2
then
Print "You clicked on ‘no’"
endif
Displays an input dialog box, with Confirm / Cancel buttons, the parameters are :
Title$ = Title text of the dialog box.
Label$ = Displayed message in the text field, it can be text or numbers (integers or floats).
Example 1 :
Rep$=MsgInputBox$("Information","BCF is cooool")
If Rep$="Vive BCF" then
Print "You’re so right :)"
endif
Example 2 :
Rep#=MsgInputBox$("Object
Rotation","0.05")
TurnEntity MonObjet,Rep#,Rep#,Rep#
BCF_FileRequester$(Title$="",ButtonValidate$="",ButtonCancel$="",Ext$="",FileReqPath$="",DefaultName$="")
Displays a file requester with an input field, the parameters are :
Title$=Requester title.You must assign this command to a variable to get the return value of the requester !
Example :
File$=BCF_FileRequester("Open
file", "Open", "Cancel",".*|.jpg","C:\Windows","MyFile.jpg")
BCF_MsgBox("Information","You picked the file : " + File$
,0)
BCF_PathRequester$(Title$="",ButtonValidate$="",ButtonCancel$="",FileReqPath$="")
Displays a path requester, the parameters are :
Title$=Requester title.You must assign this command to a variable to get the return value of the requester !
Example :
Path$=BCF_PathRequester()
BCF_MsgBox("Information","You picked the directory : " +
Path$ ,0)
BCF_CreateMenu( Caption$ ,State )
Create a new menu.
Caption$=Menu
text
State=Menu state, active TRUE, or disable FALSE
Example
:
MonMenu01=BCF_CreateMenu("Fichier",True)
BCF_CreateMenuItem ( MenuID ,Caption$)
Create an item in a menu.
MenuID=Menu
ID
Caption$=Item text
Example
:
MonMenu01=BCF_CreateMenu("Fichier",True)
MonItem01=BCF_CreateMenuItem (MonMenu01 ,"Effacer")
BCF_CreateSubMenu( MenuItemID )
Create a sub menu.
MenuItemID=Item ID to use for create sub menu
Example
:
MonMenu01=BCF_CreateMenu("Fichier",True)
MonItem01=BCF_CreateMenuItem (MonMenu01 ,"Options ...")
MonSubMenu01=BCF_CreateSubMenu( MonItem01 )
BCF_EnableMenu( MenuID )
Activate
a menu.
Home
BCF_DisableMenu(MenuID)
Disable
a menu.
Home
BCF_ShowMenuItem(MenuItemID)
Display an item in a menu.
BCF_HideMenuItem(MenuItemID)
Hide an
item in a menu.
Home
BCF_EnableMenuItem(MenuItemID)
Enable a menu item.
MenuItemID=Item
ID
Home
BCF_DisableMenuItem(MenuItemID)
Disable a menu item.
MenuItemID=Item ID
BCF_CreatePopUpMenu()
Create a popup menu.
Example
:
MonPopUp01 = BCF_CreatePopUpMenu()
BCF_CreateMenuItem ( MonPopUp01 , "Test de popup")
BCF_SetPopupMenu( PopUpMenuID )
Define the current popup menu.
Example
:
MonPopUp01 = BCF_CreatePopUpMenu()
BCF_CreateMenuItem ( MonPopUp01 , "Test de popup 1")
MonPopUp02
= BCF_CreatePopUpMenu()
BCF_CreateMenuItem ( MonPopUp02 , "Test de popup 2")
BCF_SetPopupMenu( MonPopUp02 )