• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[General] Mouse-cursor jumps on UI button click

Antares

Spell Reviewer
Level 22
Joined
Dec 13, 2009
Messages
534
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
822
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:

Antares

Spell Reviewer
Level 22
Joined
Dec 13, 2009
Messages
534
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?
 

Antares

Spell Reviewer
Level 22
Joined
Dec 13, 2009
Messages
534
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