No announcement yet.

Scaling hud resolution causes mouse cursor drag/drop to be intermittent

  • Filter
  • Time
  • Show
Clear All
new posts

    Scaling hud resolution causes mouse cursor drag/drop to be intermittent

    I created an inventory hud that allows the player to drag and drop items in different slots.

    I created the swf to be at a native resolution of 2560x1440, thinking that I can simply scale it down for 1920x1080.

    The trouble is that when I scale the swf, the mouse cursor dragging and dropping becomes incredibly unreliable.

    Here is my implementation:

    MyHudWrapper class
    simulated function PostBeginPlay() {
    	InventoryHud = new class'MyHudGfxInventory';
    And then in MyHudGfxInventory class
    function Init(optional LocalPlayer LP) {
    	RootMC = GetVariableObject("_root");
    	//Attach the mouse pointer MC so we can have mouse control.
    	MouseContainer = RootMC.AttachMovie("MouseContainer", "MouseCursor");
    	MovieInfo = SwfMovie'MyHudInventory.MyHudInventory'
    	bIgnoreMouseInput = true
    Has anyone encountered this problem, or know what might be causing the issue? Could really use some help

    Edit: I'm using AS3. I'm currently not using any logic in my unrealscript to receive/update the mouse coordinates (like I see in a lot of the AS2 tutorials). It just seemed to work without it when in its native resolution, so didn't think I needed it. Could this be the cause of my problem?

    Just an update: I've noticed the issue with intermittent clicking/dragging/dropping does not happen when i have the game set at lower resolutions (1440x1080, 1024x768). It seems to only happen when the game is set to 1920x1080. Which is really annoying as it's the most common resolution. It's fine when it's at my native resolution of 2560x1440.

    Can anyone help me with this? I really can't figure out why this issue would manifest when at 1920x1080.

    To elaborate on what the issue is: When clicking on items in the inventory an dragging them to other slots. It will often not register the click on the item, and when it does an i drag it to another slot, it will often not register the slot i'm dropping it on to. But this issue is only happening when the game is at 1920x1080.


      Hate to bump, but this is one I really can't figure out. Drag and drop works perfectly on 2560x1440 (swf native res), fine on 1024x768, 1280x960,

      But is highly unresponsive to clicks when scaled to 1920x1080.,

      The only thing i think to do is to rebuild my swf at 1920x1080 and scale up to 2560x1440.


        check your "MouseContainer", "MouseCursor" movieclip: Does it have mouseEnabled=false and mouseChildren=false? Because it should have, otherwise clicks will be intercepted by the cursortexture and not go through to the item. Other than that I have no idea what could cause this.


          Thanks, I'll take a look into that.

          I actually ended up re-creating the hud to 1920x1080, and now it seems to work for all resolutions, and looks fine when upscaled to 2560x1440.