Jump to content

GUI Graphic over Pic???


Penny
 Share

Recommended Posts

For reference:

Posted Image

What I want to do is have the gray box under the "Loading...Ok" label to be OVER the horrible placeholder drawing I made, like the label is, perfectly fine.

I tried moving the code around but that didn't help; either creating the background first and then the graphic or the other way around, the background is always on top.

$GUI_Handle[$hWnd_Splash] = GUICreate($GUI_Title_St & "Loader", 800, 600,-1,-1,-1,$WS_EX_STATICEDGE)

    GUISetIcon($ScriptIcon_FilePath)
    GUISetOnEvent($GUI_EVENT_CLOSE, "GUIClose")
    GUISetFont(9,800,0,"Verdana")

    GUICtrlCreatePic($LoaderBackground_FilePath,0,0)
    GUICtrlSetPos(-1,0,0,400,600)
    GUICtrlSetState(-1,$GUI_DISABLE)

    GUICtrlCreateGraphic(100,350,600,30)
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR,0x000000,0xAAAAAA)
    GUICtrlSetGraphic(-1,$GUI_GR_RECT,0,0,600,30)
    GUICtrlSetState(-1,$GUI_DISABLE)

    GUICtrlCreateLabel("splash screen!! y un fondo de memo ...mientras loadea las demas pantallas...",200,100)

    $fSplash_pbsProgress = GUICtrlCreateProgress(150,500,500,35,$PBS_SMOOTH)
    $fSplash_lblProgress = GUICtrlCreateLabel("Loading...",200,357,400,25,$SS_CENTER)
    GUICtrlSetColor($fSplash_lblProgress,0x840000)
    GUICtrlSetBkColor($fSplash_lblProgress,$GUI_BKCOLOR_TRANSPARENT)

    GUISetState(@SW_SHOW,$GUI_Handle[$hWnd_Splash])
Edited by Penny
Link to comment
Share on other sites

just change 4 lines:

GUICtrlCreateProgress(100,350,600,30)
    ;GUICtrlCreateGraphic(100,350,600,30)
    ;GUICtrlSetGraphic(-1, $GUI_GR_COLOR,0x000000,0xAAAAAA)
    ;GUICtrlSetGraphic(-1,$GUI_GR_RECT,0,0,600,30)
    GUICtrlSetState(-1,$GUI_DISABLE)

Posted Image

Edited by andygo
Link to comment
Share on other sites

Try $GUI_ONTOP instead of $GUI_DISABLE (the setState for the rectangle graphic). I don't know if this will solve your problem.. also, the docs say this

Due to design constraints RECT, ELLIPSE and PIE graphics are drawnfirst. For example, a LINE will always be drawn over a RECT. If thedrawing order is important to the look of the graphic, then it isrecommended that multiple graphic controls be used instead of using asingle control to do all the drawing.

here, Function GUICtrlSetGraphic, so that may be related to this issue. Edited by snowmaker

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Link to comment
Share on other sites

@andy is that a joke? the whole point of this thread is I want the graphic to be on top of the background picture, not delete it completely!

@snowmaker $GUI_ONTOP didn't work, I did read what you quoted in the documentation, but it's talking about graphics within the same graphic control, and I'm using two different controls (one for the bg and one for the rect), so that shouldn't be the problem either :D

Link to comment
Share on other sites

@andy is that a joke? the whole point of this thread is I want the graphic to be on top of the background picture, not delete it completely!

@snowmaker $GUI_ONTOP didn't work, I did read what you quoted in the documentation, but it's talking about graphics within the same graphic control, and I'm using two different controls (one for the bg and one for the rect), so that shouldn't be the problem either :D

sry then i missunderstood :D my english isnt perfect cause here in germany i dont need it so frequently....

Link to comment
Share on other sites

thanks for the input guys, I decided to just draw the box in the actual jpeg. thing is I wanted to have like a graphic to decorate the progress bar with a transparent background, then that grey box but with an alpha and then in the background the other picture (which would be the placeholder) so I just need to change that pic each time, and not need to edit the pic in photoshop, use layers etc, just do that in the script, but I didn't find a way to do that either (transparent in pics?)

is there a way to do that either?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...