• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[General] Mouse-cursor jumps on UI button click

Hi,

I am setting up UI buttons for talents. I'm experiencing an issue where, whenever I click the button, the mouse-cursor briefly flickers and jumps to the edge of the screen. How can I prevent that?

Here's my .fdf file:

Code:
Frame "GLUEBUTTON" "TalentButton" {
    Width 0.035,
    Height 0.035,
    ControlStyle "AUTOTRACK",

    ControlBackdrop "TalentButtonIcon",
    Frame "BACKDROP" "TalentButtonIcon" {
    }
  
    ControlPushedBackdrop "TalentButtonPushedBackdrop",
    Frame "BACKDROP" "TalentButtonPushedBackdrop" {
    }

    ControlDisabledBackdrop "TalentButtonIconDisabled",
    Frame "BACKDROP" "TalentButtonIconDisabled" {
    }

   Frame "BACKDROP" "TalentButtonPointsBackdrop" {
       BackdropBackground  "evolutionPointsBackdrop.blp",
       SetPoint TOPLEFT, "TalentButton", BOTTOMRIGHT, -0.017, 0.0095,
       SetPoint BOTTOMRIGHT,  "TalentButton", BOTTOMRIGHT, 0.011, -0.008,
       BackdropBlendAll,
   }
  
   Frame "TEXT" "TalentButtonPoints" {
       UseActiveContext,
       DecorateFileNames,
       SetPoint TOPLEFT, "TalentButton", BOTTOMRIGHT, -0.017, 0.0095,
       SetPoint BOTTOMRIGHT,  "TalentButton", BOTTOMRIGHT, 0.011, -0.0085,
       FontFlags "FIXEDSIZE",
       FrameFont "MasterFont", 0.009, "",
       FontColor 1.0 1.0 1.0 1.0,
       FontShadowColor 0.0 0.0 0.0 0.9,
       FontShadowOffset 0.001 -0.001,
   }
 
   Frame "BACKDROP" "TalentButtonArrowUp" {
       BackdropBackground  "evolutionArrowUpDisabled.blp",
       SetPoint TOPLEFT, "TalentButton", BOTTOMLEFT, 0.01425, 0.005,
       SetPoint BOTTOMRIGHT,  "TalentButton", BOTTOMLEFT, 0.02425, -0.0185,
       BackdropBlendAll,
   }
}

Bonus question: The background image of my talent tree does not intercept clicks and one can see health bars through it. I've tried BlzFrameSetEnable, but no luck. Here's my .fdf for the background:

Code:
// -- LOCAL TEMPLATES -------------------------------------------------------
Frame "BACKDROP" "TalentTreeSpecialBackgroundTemplate" {
        BackdropBackground  "backgroundArtSpecial.blp",
        BackdropCornerFlags "UL|UR|BL|BR|T|L|B|R",
        BackdropCornerSize  0.0475,
        BackdropBackgroundInsets 0.02 0.023 0.017 0.02,
        BackdropEdgeFile  "UI\Widgets\EscMenu\NightElf\NightElf-Options-Menu-Border",
        BackdropBlendAll,
}
// -- Frames -------------------------------------------------------
Frame "BACKDROP" "TalentTreeSpecial" INHERITS "TalentTreeSpecialBackgroundTemplate" {
   UseActiveContext,
}

Thanks for any help!
 
Last edited:
Level 18
Joined
Oct 17, 2012
Messages
821
You don't have to use SimpleFrames directly. You just have to wrap a SimpleFrame around your desired frame. This has to be done through custom FDF files.

For your bonus question, which parent did you assign to the backdrop frame? When I use "ConsoleUIBackdrop" as parent, no health bars is seen through my backdrops. You can't register any frame event to backdrop.
 
Last edited:
Putting the frame as a child of ConsoleUIBackdrop worked perfectly for hiding the health bars! I had to create a new child frame to intercept the mouse. Thank you!
You don't have to use SimpleFrames directly. You just have to wrap a SimpleFrame around your desired frame. This has to be done through custom FDF files.
Can you show how that code would look like?
 
It didn't work. I don't see any frame at all. I checked that all the children are referenced correctly in my code.

Code:
Frame "SIMPLEFRAME" "TalentButton" {
	Frame "GLUEBUTTON" "TalentButtonButton" {
		Width 0.035,
		Height 0.035,
		ControlStyle "AUTOTRACK",

		ControlBackdrop "TalentButtonIcon",
		Frame "BACKDROP" "TalentButtonIcon" {
		}
		
		ControlPushedBackdrop "TalentButtonPushedBackdrop",
		Frame "BACKDROP" "TalentButtonPushedBackdrop" {
		}

		ControlDisabledBackdrop "TalentButtonIconDisabled",
		Frame "BACKDROP" "TalentButtonIconDisabled" {
		}

	   Frame "BACKDROP" "TalentButtonPointsBackdrop" {
		   BackdropBackground  "talentPointsBackdrop.blp",
		   SetPoint TOPLEFT, "TalentButtonButton", BOTTOMRIGHT, -0.017, 0.0095,
		   SetPoint BOTTOMRIGHT,  "TalentButtonButton", BOTTOMRIGHT, 0.011, -0.008,
		   BackdropBlendAll,
	   }
		
	   Frame "TEXT" "TalentButtonPoints" {
		   UseActiveContext,
		   DecorateFileNames,
		   SetPoint TOPLEFT, "TalentButtonButton", BOTTOMRIGHT, -0.017, 0.0095,
		   SetPoint BOTTOMRIGHT,  "TalentButtonButton", BOTTOMRIGHT, 0.011, -0.0085,
		   FontFlags "FIXEDSIZE",
		   FrameFont "MasterFont", 0.009, "",
		   FontColor 1.0 1.0 1.0 1.0,
		   FontShadowColor 0.0 0.0 0.0 0.9,
		   FontShadowOffset 0.001 -0.001,
	   }
	   
	   Frame "BACKDROP" "TalentButtonArrowUp" {
		   BackdropBackground  "talentArrowUpDisabled.blp",
		   SetPoint TOPLEFT, "TalentButtonButton", BOTTOMLEFT, 0.01425, 0.005,
		   SetPoint BOTTOMRIGHT,  "TalentButtonButton", BOTTOMLEFT, 0.02425, -0.0185,
		   BackdropBlendAll,
	   }
	   
	   Frame "BACKDROP" "TalentButtonArrowRight" {
		   BackdropBackground  "talentArrowRightDisabled.blp",
		   SetPoint TOPLEFT, "TalentButtonButton", TOPLEFT, -0.0275, -0.01425,
		   SetPoint BOTTOMRIGHT,  "TalentButtonButton", TOPLEFT, 0.005, -0.02425,
		   BackdropBlendAll,
	   }
	}
}
 
Top