Solved it!
The problem was that I was loading a font in the main drawing loop of the game. It was my mistake. I didn't know that would cause such strange random crashes. It kind of makes sense though cause loading a font might cause some type of delay or maybe asynchronous code execution. So the ...
Search found 79 matches
- Mon Sep 08, 2025 10:13 pm
- Forum: Coding Questions
- Topic: StartDrawing(ScreenOutput()) the specified output is NULL
- Replies: 2
- Views: 464
- Mon Sep 08, 2025 9:32 pm
- Forum: Coding Questions
- Topic: StartDrawing(ScreenOutput()) the specified output is NULL
- Replies: 2
- Views: 464
StartDrawing(ScreenOutput()) the specified output is NULL
I should first say that I am using PB 5.73 cause I want the original backend for now.
Anyway, I am making a game in PB that uses an OpenWindowedScreen(). Now for some really strange reason I can't figure out (nor can ChatGPT - it gives me random irrelevant stuff) why the call StartDrawing ...
Anyway, I am making a game in PB that uses an OpenWindowedScreen(). Now for some really strange reason I can't figure out (nor can ChatGPT - it gives me random irrelevant stuff) why the call StartDrawing ...
- Thu Mar 21, 2024 9:30 am
- Forum: Coding Questions
- Topic: I need native image drawn on a ButtonGadget
- Replies: 11
- Views: 1624
Re: I need native image drawn on a ButtonGadget
You don't have to convert the images to icons, you can do this instead:
hIcon1 = CatchImage(#PB_Any, ?ChkImage)
hIcon2 = CatchImage(#PB_Any, ?XImage)
SendMessage_(GadgetID(0),#BM_SETIMAGE,#IMAGE_BITMAP,ImageID(hIcon1))
SendMessage_(GadgetID(1),#BM_SETIMAGE,#IMAGE_BITMAP,ImageID(hIcon2 ...
- Mon Mar 18, 2024 10:18 am
- Forum: Coding Questions
- Topic: I need native image drawn on a ButtonGadget
- Replies: 11
- Views: 1624
Re: I need native image drawn on a ButtonGadget
Oh, also I should keep to my word about the paypal. I ended up using BarryG's post. If you want, you can PM me.
- Mon Mar 18, 2024 10:05 am
- Forum: Coding Questions
- Topic: I need native image drawn on a ButtonGadget
- Replies: 11
- Views: 1624
Re: I need native image drawn on a ButtonGadget
It's as simple as this -> https://www.purebasic.fr/english/viewtopic.php?p=542202#p542202
Thank you. This was super simple and clean.
I altered it to better fit my needs however. I wanted the images stored in the data section and in PNG format, not ICO. Turns out it didn't require too much ...
- Sun Mar 17, 2024 10:53 pm
- Forum: Coding Questions
- Topic: I need native image drawn on a ButtonGadget
- Replies: 11
- Views: 1624
I need native image drawn on a ButtonGadget
Hi,
Can someone please help me or provide a code sample for how to draw an image on a native ButtonGadget (with text) or how to draw text on a ButtonImageGadget? I'd much rather try drawing the image on the normal ButtonGadget though. The reason is because I want the button to retain the native ...
Can someone please help me or provide a code sample for how to draw an image on a native ButtonGadget (with text) or how to draw text on a ButtonImageGadget? I'd much rather try drawing the image on the normal ButtonGadget though. The reason is because I want the button to retain the native ...
- Fri Nov 10, 2023 9:08 pm
- Forum: Coding Questions
- Topic: Any PGP encryption libraries?
- Replies: 0
- Views: 478
Any PGP encryption libraries?
Are there any sample codes or libraries that would be compatible with standards like GnuPG (OpenPGP)?
I'm just trying to make a simple app that can encrypt/decrypt a file in this way rather than an old fashioned password. I'm not knowledgeable in the realm of cryptography and I'm basically just ...
I'm just trying to make a simple app that can encrypt/decrypt a file in this way rather than an old fashioned password. I'm not knowledgeable in the realm of cryptography and I'm basically just ...
- Sat Jan 21, 2023 10:07 am
- Forum: Tricks 'n' Tips
- Topic: m3u8 Video Downloader
- Replies: 1
- Views: 1812
m3u8 Video Downloader
I thought some of you might find this useful or somewhat interesting. There are programs out there such as youtube-dl and many browser extensions to download from video sites. Sometimes I come across a new site that uses m3u8 to store their videos and I don't like to run many untrusted extensions in ...
- Thu Apr 28, 2022 9:39 pm
- Forum: Bugs - IDE
- Topic: Visual Designer SubMenu Code Generation Bug
- Replies: 0
- Views: 981
Visual Designer SubMenu Code Generation Bug
Someone I'm helping learn PB has discovered what seems like a pretty serious bug in the visual designer when making sub-menus. I searched and I could not turn up anything. Maybe we are both just overlooking something in the designer?
We are using PB 5.73. Maybe it's fixed in the beta?
Here's what ...
We are using PB 5.73. Maybe it's fixed in the beta?
Here's what ...
- Sun Mar 27, 2022 10:16 pm
- Forum: The PureBasic Form Designer
- Topic: How do I structure a program with a lot of windows (forms)?
- Replies: 8
- Views: 10610
Re: How do I structure a program with a lot of windows (forms)?
:twisted: I just realized something that is probably unkosher?
I figured out that IncludeFile pulls other code files into the same scope as the main file. When I first started this program, I didn't plan on it getting large, so I just used variables on the fly without declaring them. I don't ...
I figured out that IncludeFile pulls other code files into the same scope as the main file. When I first started this program, I didn't plan on it getting large, so I just used variables on the fly without declaring them. I don't ...
- Sun Mar 27, 2022 9:32 pm
- Forum: The PureBasic Form Designer
- Topic: How do I structure a program with a lot of windows (forms)?
- Replies: 8
- Views: 10610
Re: How do I structure a program with a lot of windows (forms)?
I also use the FormDesigner for many windows. But I switch off #PB_Any and the 'Generate event procedure'.
Then I write the event management myself by hand.
Are you saying that if you do that it will allow you to write the event loop in that .pbf file? Cause that would be the most intuitive for ...
- Sun Mar 27, 2022 2:11 am
- Forum: The PureBasic Form Designer
- Topic: How do I structure a program with a lot of windows (forms)?
- Replies: 8
- Views: 10610
How do I structure a program with a lot of windows (forms)?
So I have a few years experience in PB, but I have not yet made a program that has many windows until now. I have my event loop for the main window in my main source file; in this same file is where I put all my functions. I use the form designer to make new windows, but it tells me not to place the ...
- Sat Mar 26, 2022 4:48 am
- Forum: Applications - Feedback and Discussion
- Topic: Realistic Clocks
- Replies: 5
- Views: 2302
Re: Realistic Clocks
Number 5 looks so wrong. Can that be redesigned? Looks like an upside-down "2" (even though it isn't).
I know, but that's realistic. Real nixie tubes look exactly like that. I have some. However, someone is helping me with the graphics and designed new nixie tubes which may be featured in the ...
- Fri Mar 25, 2022 11:35 pm
- Forum: Applications - Feedback and Discussion
- Topic: Realistic Clocks
- Replies: 5
- Views: 2302
Re: Realistic Clocks
A new version is available on my website now: http://dosaidsoft.com/wp/2022/03/25/rea ... ocks-v1-5/
There may be some small bugs in the chimes and alarm, let me know.
There may be some small bugs in the chimes and alarm, let me know.
- Thu Mar 24, 2022 8:54 pm
- Forum: Coding Questions
- Topic: Need to store many checkboxes in integer/long
- Replies: 7
- Views: 1110
Re: Need to store many checkboxes in integer/long
I discovered I could do it this way cause it's super simple:
Procedure.i SaveDays()
BinBuilder.s = "%"
Dim WeekDay(6)
WeekDay(0) = Checkbox_Mon : WeekDay(1) = Checkbox_Tue : WeekDay(2) = Checkbox_Wed : WeekDay(3) = Checkbox_Thu : WeekDay(4) = Checkbox_Fri
WeekDay(5) = Checkbox_Sat : WeekDay(6 ...
Procedure.i SaveDays()
BinBuilder.s = "%"
Dim WeekDay(6)
WeekDay(0) = Checkbox_Mon : WeekDay(1) = Checkbox_Tue : WeekDay(2) = Checkbox_Wed : WeekDay(3) = Checkbox_Thu : WeekDay(4) = Checkbox_Fri
WeekDay(5) = Checkbox_Sat : WeekDay(6 ...