I am continue the creation of my game and soon I will have a new version out and a new website.
Today I decided to give another one try to window commands of PureBasic , last time months ago I was tried I didn't understand much and I quit using the window commands of the Language. So now I would like to look in window making commands AGAIN , I tried and other languages , but the windows commands aren't complete (Looooong Story - The reason , I was lost from this forums for long time).
I have created one window which closes from X button only one menu which does nothing and one toolbar.
The toolbar will have some bmp images 32x32 , I created the toolbar , but I saw the native purebasic commands don't allows (I don't know Why?) to change the size of the toolbar buttons and as always (And this is the reason , I left the windows commands , was these API commands which there is no documentation nowhere). I wonder where did you found, how these API commands work and what do they mean. I have the language for about 1 year and I use it 50% and even less. Is a nice language , have nice IDE , is fast but , uses directx 7 for graphics which are very old and in window 8 there will not be backwards compatibility for directx 11 , all directx 7 native commands are difficult and very old and I use DarkBasic DarkGDK plugin for DirectX 9 to make all kind of effect , transparent and any kind of sprites etc.. this is another story.
So I use only 30% of the language , the native directx 7 is old and I don't understand these API and all of these windows commands. So I will give a try to windows commands at least to use 60% of the PureBasic and the rest 2D and 3D effects with DarkGDK.
I think , if this language will not updated , to directx 9 and be compatible with directx 10 or 11 , then will die. Directx 7 is very old and all of these complex sprite like and image commands are very complex and I never did nothing , DarkGDK saved me for this. There are posts in the forums about this and I have complain in the past , I am not use the directx 7 native purebasic commands anymore.
If Fantaisie Software is interesting to make updates and change a lots of functions and make everything simpler and add a lots of missing functios , which you need chenese API code then is well , else the language will die.
I tried and other languages , but as I saw the Basic Language world is very problematic and outdated and in generic the Basic Languages are not so professional for game making , even the technology have improved dramatically , the conclusion is , do not make game with Basic Language. I tried many Basics in the past , I have to say , PureBasic made the work better , but is not enough , I am using 3 different lagnuages and plugins to make one game.
Anyway , I search in the forums and I found some (not understanding API commands) and I manage to change the size of the button of my toolbar from unchanged default 16x16 to 32x32 (Why are you making the life of programmer difficult?) why doesn't exist some command with name like just set_toolbar_image_size(w,h) and that's it and you need to write chinese API code to just change the size of the button of the toolbar with one command instead to write 10 lines of _ unknown commands , macros and SendMessages_.
Sometimes , I think this language is incomplete.
The code of my window with the menu and toolbar is bellow
Code: Select all
LoadImage(1,"wall_tool.bmp")
Macro SetToolBarIconSize(ToolBar, IconSize)
SendMessage_(ToolBarID(ToolBar), #TB_SETBITMAPSIZE, 1, (IconSize << 16) + IconSize)
ImageList_SetIconSize_(SendMessage_(ToolBarID(ToolBar), #TB_GETIMAGELIST, (IconSize << 16), 0) , IconSize , IconSize)
SendMessage_(ToolBarID(ToolBar), #TB_AUTOSIZE, 0, 0)
EndMacro
If OpenWindow(main_window, 50, 50, 700, 500, "Eye of the Beholder IV - Editor", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget| #PB_Window_ScreenCentered)
If CreateMenu(adventure_menu, WindowID(main_window))
MenuTitle("Adventure")
MenuItem(1, "New Adventure")
MenuItem(2, "Load Adventure")
MenuItem(3, "Save Adventure")
MenuBar()
MenuItem(4, "Adventure Properties")
MenuBar()
MenuItem(5, "Exit Editor")
EndIf
If CreateToolBar(tools, WindowID(main_window))
If CreateToolBar(tools, WindowID(main_window))
ToolBarImageButton(0,ImageID(1),#PB_ToolBar_Toggle)
SetToolBarIconSize(tools, 32)
EndIf
EndIf
Repeat
Event = WaitWindowEvent()
If Event = #PB_Event_CloseWindow ; If the user has pressed on the close button
Quit = 1
EndIf
Until Quit = 1
EndIf
The problem is , I manage to change the size from default 16x16 to 32x32 of the button of the toolbar , but the icon remains 16x16 and I see the one quarter of the icon on the toolbar button.
Any chinese API to correct this?
Thank you , at least , I have the help from the community.