Search found 978 matches

by Bugala
Thu Feb 25, 2021 10:35 am
Forum: General programming
Topic: possibility to have two same installeventhandlers at same time?
Replies: 3
Views: 216

Re: possibility to have two same installeventhandlers at same time?

quite compact solution. Thanks. Might use it if need arises, I can see there could be need in future.
by Bugala
Thu Feb 25, 2021 10:28 am
Forum: General programming
Topic: InstallEventHandler question regarding the function
Replies: 0
Views: 38

InstallEventHandler question regarding the function

I have this: InstallEventHandler({OnKeyDown = Function(msg) Self:HandleOnKeyDown(msg) EndFunction}) This works fine in sense that the right function gets executed. However, I am having one problem with the function that I am not sure what is the root reason or how to fix it. Thing is, I have somethi...
by Bugala
Tue Feb 23, 2021 11:26 am
Forum: General programming
Topic: possibility to have two same installeventhandlers at same time?
Replies: 3
Views: 216

possibility to have two same installeventhandlers at same time?

I am not needing this now, but I can see there can come a situation where I could need this. What I was hoping to do was following: InstallEventHandler({onkeydown = Function() DebugPrint("test") EndFunction}) InstallEventHandler({onkeydown = Function() DebugPrint("test2") EndFunction}) I was hoping ...
by Bugala
Sat Feb 13, 2021 10:38 am
Forum: Newbie questions
Topic: Problem with PNG with alpha channel
Replies: 7
Views: 266

Re: Problem with PNG with alpha channel

And also, you might be able to use SetLayerTransparency() command to do some trick as well. That to use your current image as an example. You could make it have double the amount of light it now has. Then when you show it on OnMouseOver, you could also add SetLayerTransparency(1, 126) and then when ...
by Bugala
Sat Feb 13, 2021 10:33 am
Forum: Newbie questions
Topic: Problem with PNG with alpha channel
Replies: 7
Views: 266

Re: Problem with PNG with alpha channel

Notice also that if it still fails even after LoadAlpha=true, then problem is likely how you have saved the png. I myself have several times ran into this problem where code works right but I have saved the image file itself wrong way. In Gimpfor example it has this checkbox on pngs that needs to be...
by Bugala
Fri Feb 12, 2021 9:27 am
Forum: Newbie questions
Topic: Program Structure
Replies: 12
Views: 569

Re: Program Structure

Yes, the difference between using OnMouseDown at MakeButton or InstantEventHandler is that when you are using InstantEventHandler and then using OnMouseDown case, it means that it is looking whenever Mouse Button is pushed down, regardless where that mouse is, that it is just looking at if mouse but...
by Bugala
Thu Feb 11, 2021 8:05 am
Forum: Newbie questions
Topic: Program Structure
Replies: 12
Views: 569

Re: Program Structure

You are on a right track, but there is one fault with your program currently, which is very easy to fix, but I am explaining the problem. You now have this function "p_Stage01EventFunc(msg)" which has OnMouseOut case there. This is right. Problem is, the idea is that this function is being called wh...
by Bugala
Tue Feb 09, 2021 4:21 pm
Forum: Newbie questions
Topic: Program Structure
Replies: 12
Views: 569

Re: Program Structure

Hollywood has from a programming point of view two different approaches to how it handles brushes. The first approach is that you have to draw all the graphics to screen each cycle. That basically when cycle starts, the screen is black, and if you don't draw anything, it also will stay black. That r...
by Bugala
Sun Feb 07, 2021 11:53 am
Forum: Newbie questions
Topic: Generic For variables
Replies: 5
Views: 320

Re: Generic For variables

Yes. Those variables are read-only variables. They are local to the respective for loop and you may only read their value. You must not write to them. And they won't clash with variables that have the same name outside the for loop. Either I don't understand what you say, or they are not behaving a...
by Bugala
Sat Feb 06, 2021 1:04 pm
Forum: Newbie questions
Topic: Program Structure
Replies: 12
Views: 569

Re: Program Structure

By the way, if you want it to work, you could do it like this: Change: ;*** MAIN LOOP *** ;----------------- If Stage = 0 p_MainMenu ElseIf Stage = 1 p_Stage01 Else End EndIf EscapeQuit(True) Repeat WaitEvent Forever into ;*** MAIN LOOP *** ;----------------- Function Change() If Stage = 0 p_MainMen...