This is probably a bug.

Report any Hollywood bugs here
Post Reply
Bugala
Posts: 1400
Joined: Sun Feb 14, 2010 7:11 pm

This is probably a bug.

Post by Bugala »

Can someone confirm if this same happens with them too. I am using this under Windows XP with Hollywoods own PC-version editor.

Heres the code:

Code: Select all

@SCREEN {Mode = "FakeFullScreen"}
@DISPLAY {Width = 1920, Height = 1080, Borderless = True, ScaleMode = #SCALEMODE_AUTO, FitScale=True}


EnableLayers()

Function black(msg)
  Switch msg.action
  Case "OnMouseOver":
    DebugPrint("User moved mouse over BLACK button", msg.id)
  EndSwitch
EndFunction


Function white(msg)
  Switch msg.action
  Case "OnMouseOver":
    DebugPrint("User moved mouse over WHITE button", msg.id)
  EndSwitch
EndFunction



SetFillStyle(#FILLCOLOR)

CreateBrush(1, 500, 500, $010101)
CreateBrush(2, 800, 800, $FFFFFF)


DisplayBrush(1, #CENTER, #CENTER, {name="white"})
DisplayBrush(2, #CENTER, #CENTER, {name="black"})

LayerToFront(2)

blackevt = {OnMouseUp = black, OnMouseOver = black,
	    OnRightMouseUp = black}

whiteevt = {OnMouseOver = white}

MakeButton(1, #LAYERBUTTON, "black", True, False, blackevt)
MakeButton(2, #LAYERBUTTON, "white", True, True, whiteevt)


Repeat
WaitEvent()
Forever


What happens is that if you switch

Code: Select all

DisplayBrush(1, #CENTER, #CENTER, {name="white"})
DisplayBrush(2, #CENTER, #CENTER, {name="black"})
these twos places:

Code: Select all

DisplayBrush(1, #CENTER, #CENTER, {name="black"})
DisplayBrush(1, #CENTER, #CENTER, {name="white"})

It reacts strangely.

Im not even sure what is the actual problem that happens here.

But as far as i understand, in one or the other case, the black square should be seeable.

However, it never is.

But what strangely however happens is that in the first version black squares button however reacts (If you keep moving mouse around it tells you "User moved mouse over BLACK button" and "User moved mouse over WHITE button"), while in second version it reacts to white button only (losts of "User moved mouse over WHITE button"-text only).

Am i misunderstanding something here, or is this a bug, and what is the bug?
User avatar
airsoftsoftwair
Posts: 5871
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: This is propably a bug.

Post by airsoftsoftwair »

Sorry, I don't see any bug here but your description is also not very clear.
Im not even sure what is the actual problem that happens here.
Then how should I be able to tell what you think is wrong there? ;)

I tested the program and I didn't see any misbehaviour.
Bugala
Posts: 1400
Joined: Sun Feb 14, 2010 7:11 pm

Re: This is probably a bug.

Post by Bugala »

Sorry, I try to be bit more clear this time.

What I meant by not actually knowing what the bug is (if there is one) was that Im not sure what was supposed to happen, and hence there are couple of choices for the bug:

1. Either way I put those 2 lines (and rename their number accordingly), Black box wont be seen on top of the white one. Is this supposed to be so? And if so, then why? for i must have misunderstood something about the order of layers then, for my understanding switching layer ids should also switch their places in Z-postition.

2. When I move mouse from edge of white box to other edge of white box, in case black is ID 1 and White is ID 2, it resutls in me getting repeatedly message "User Moved mouse over WHITE button".
However, if i change White as ID 1 and Black as ID 2, then it results in getting both "User Moved mouse over WHITE button" as well as "Use Moved mouse over BLACK button".

I dont understand how this should happen. But question is (if this is a bug) that wether bug is in showing the black box, or in button commands?


So is this supposed to work as i described, and if so, then could yo explain why, for I dont understand why would black stay out of display in both cases, while in other case mouse over reacts to both boxes and on other only to one?
Bugala
Posts: 1400
Joined: Sun Feb 14, 2010 7:11 pm

Re: This is probably a bug.

Post by Bugala »

I did some further testing and found something else odd too, if i change it into this way:

Code: Select all

DisplayBrush(1, #CENTER, #CENTER, {name="black"})
DisplayBrush(2, #CENTER, #CENTER, {name="white"})

LayerToFront(1)
Then it indeed shows the black box, but it doesnt react to it at all.

it just keeps displaying text "User move mouse over WHITE button".
Post Reply