Announcement

Collapse
No announcement yet.

reading input when using a scaleform window

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    please delete post

    Leave a comment:


  • replied
    I was watching Scaleform UDK Tutorial - 4 of 9 - Capturing Input, and I saw that the key input was a number value. what is the number value map, and do we have to use it?

    Leave a comment:


  • replied
    Originally posted by Matt Doyle View Post
    Where are you using this text field? In a menu? In the HUD? In a render to texture on a bsp or static mesh?
    as I understand it, it shouldn't matter where the object is rendered to.

    but I am loading the scaleform object in my UI_Game class, rendering it to a texture, using the texture in a decal, and projecting the decal onto a static mesh.

    Leave a comment:


  • replied
    Where are you using this text field? In a menu? In the HUD? In a render to texture on a bsp or static mesh?

    Leave a comment:


  • replied
    well, I've solved the problem by writing my own key event handler within Actionscript, and then controlling the field directly from code. used in conjunction with
    CaptureKeys=("backspace", "one","two","three","four","five","six","seven","e ight","nine","zero", "period")

    does anyone know the CaptureKEey codes for the number pad numerals?

    Leave a comment:


  • replied
    That should be all you need to do. Just putting the TextInput widget in your menu should work. If you use arrow keys or tab to give it focus, you should be able to type into it.

    I confirm it works on my end. Just dragged and dropped the widget into my menu tutorial file, reimported into UDK, ran the game - text input field works as expected.

    Leave a comment:


  • replied
    I've tried using the CLIK widget TextInput, but I still have the same problem.

    is there a special way I need to instantiate or load the CLIK widget?

    currently, it is embedded within several movie clips, and I am manually setting the focus with "Selection.setFocus("_root.JoinWindow.infield.inpu t.textField");" or "Selection.setFocus("_root.JoinWindow.infield.inpu t");"

    the box gets focus, and the input cursor can be seen, but nothing I type is passed into it.

    Leave a comment:


  • replied
    Input still works. Instead of using a Flash textfield, use a CLIK component called TextInput. You'll find it here:

    C:\UDK\UDK-2010-10\Development\Flash\CLIK\components\TextInput.fla

    When this text input field has focus, it will accept all your input, assuming you have bCaputerInput=true in the default properties.

    Leave a comment:


  • replied
    I too am having difficulty getting the key captures to work.

    in previous builds of the UDK, my flash movies would capture all input with bCaptureInput = true; however in the latest build (we skipped a few) it will only capture keys specifically added to the AddCaptureKey() command.

    my problem is, I cannot get it to accept alpha-numeric keys. however backspace works.

    so has the ability to capture all input been removed, or is there a way to add alpha-numeric keys that I am missing?

    note, in the movie in question, a textfield is selected and active, so letters need to be passed to it.

    Leave a comment:


  • replied
    Try using the numbers spelled out in Kismet - one, two, three, four, etc. instead of the digits.

    Leave a comment:


  • replied
    I can't recognize the numbers (1-9) and some letters when I key-in the keyboard in my keypad map I made.

    In Flash Movie I have :

    var keyboardInput:Object = new Object();
    Key.addListener(keyboardInput);

    keyboardInput.onKeyDown = function()

    {
    var keypressed:Number=Key.getCode();

    switch(keypressed)
    {
    case 49:
    fscommand("1");
    break;
    case 50:
    fscommand("2");
    break;
    case 51:
    fscommand("3");
    break;
    case 52:
    fscommand("4");
    break;
    }


    }
    In Kismet I have OpenGfxMovie which includes under CaptureKeys in Properties all 9 numbers and I have Set Capture = true
    Also in Kismet the Set Fx Capture keys I have included the 9 numbers in the slots Properties.

    If I use letters like A, B, C (but not D) they are fully recognized (using those instead of numbers in both Flash and Kismet) but no numbers which means numbers and some letters are "swallowed".
    I tried inserting the AddCaptureKey('1'), and '2' etc in GFxMoviePlayer.uc but the compiler reports an error "missing variable type"

    Please help !!

    Leave a comment:


  • replied
    Actually, I don't know if it does. I didn't try to bind them as most people will use them for entering commands. My thought was "I'm using the unreal engine - don't break its core functionality"

    Most developers who see a game developed in the unreal engine knows that` and ~ are bound to the console.

    Leave a comment:


  • replied
    i plugged your code in, and great so far.

    how did you get it to ignore the console open calls on Tilde and Quote?

    Leave a comment:


  • replied
    I have cookies. I've added one to your browser cache

    I added that to get other people who need to implement this to follow the same route, with the naive idea that if lots of us do this there will be big complaints if epic removed that datastore . It took me ages to figure out that I needed to use the UTDataProvider_Keybinding datastore.

    I did mine in pretty much the same way except I wrote a function so I could get back the ALT binding value too, and I store my binding list when the menu is loaded rather than when the list provider is updated.

    Code:
    function GetBoundKeys(string InCommand, out string PrimaryKey, out string AltKey)
    {
            local int i;
    
            for (i = 0; i < PInput.Bindings.Length; i++)
            {
                    if (PInput.Bindings[i].Command == InCommand)
                    {
                            AltKey = string(PInput.Bindings[i].Name);
                            break;
                    }                       
            }
    
            for (i++; i < PInput.Bindings.Length; i++)
            {
                if (PInput.Bindings[i].Command == InCommand)
                {
                    PrimaryKey = string(PInput.Bindings[i].Name);
                }               
            }
    
            if (PrimaryKey == "")
            {
                    PrimaryKey = AltKey;
                    AltKey = "";
            }
    }
    
    function UpdateListDataProvider()
    {
        local byte i;
    
        local GFxObject DataProvider;
        local GFxObject TempObj;
            local string PrimaryKey, AltKey;
       
            // Get the list of what has already been bound
            BoundList = GetPC().PlayerInput.Bindings;
    
        DataProvider = Outer.CreateArray();
        for (i = 0; i < BindingList.Length; i++)
        {
            // Create a AS object to hold the data for SettingsList[i].
            TempObj = CreateObject("Object");   
            // Parse SettingsList[i] into TempObj.
            TempObj.SetString("label", Caps(BindingList[i].FriendlyName));
            TempObj.SetString("control", "button");
            PrimaryKey = "";
            AltKey = "";
            GetBoundKeys(BindingList[i].Command, PrimaryKey, AltKey);
            TempObj.SetString("text", CAPS(PrimaryKey @ AltKey));
            DataProvider.SetElementObject(i, TempObj);
        }
    
        ListMC.SetObject("dataProvider", DataProvider);   
        ListDataProvider = ListMC.GetObject("dataProvider");
    }

    Leave a comment:


  • replied
    funny part is i already done the bonus part.

    heres my implementation for it - be nice to know how you did your filtering.

    Code:
    var array<UTUIDataProvider_KeyBinding> KeyB;
    
    function UpdateListDataProvider()
    {
    	local int i, BindingIdx;
    	local GFxObject TempObj;
    	local GFxObject DataProvider;
    	local string strGBA_BindName, strGBA_BindValue;
    
        local array<UDKUIResourceDataProvider> ProviderList;  
    	local TAPlayerInput TAInput;
    
    	class'UDKUIDataStore_MenuItems'.static.GetAllResourceDataProviders(class'UTUIDataProvider_KeyBinding', ProviderList);
    	for (i = 0; i < ProviderList.Length; i++)
    	{
    	    KeyB.InsertItem(0, UTUIDataProvider_KeyBinding(ProviderList[i]));        
    	}
    
    	DataProvider = Outer.CreateArray();
    
    	TAInput = TAPlayerInput(GetUDKPlayerOwner().PlayerInput);
    
    	for (i = 0; i <  KeyB.Length; i++)
    	{
    		strGBA_BindName = KeyB[i].FriendlyName;	
    
    		for(BindingIdx = 0;BindingIdx < TAInput.Bindings.Length;BindingIdx++)
    		{
    			if(TAInput.Bindings[BindingIdx].Command == KeyB[i].Command)
    			{
    				strGBA_BindValue = String(TAInput.Bindings[BindingIdx].Name);
    			}
    		}
    
    		//`Log("KeyB[i].FriendlyName =" $KeyB[i].FriendlyName $ " CMD=" $ KeyB[i].Command $ " NAME=" $ KeyB[i].Name);
    
    
    		
    		TempObj = CreateObject("Object");  
    		TempObj.SetString("label", strGBA_BindName);
    		TempObj.SetString("valuelabel", strGBA_BindValue);
    		DataProvider.SetElementObject(i, TempObj);
    	}
    
        ListMC.SetObject("dataProvider", DataProvider);   
        ListDataProvider = ListMC.GetObject("dataProvider");
    }
    and my dialog is

    Code:
    function Open_BindKeyDialog(int index)
    {
       local GFxTAFrontEnd_BindKey DialogMC;
                       
       DialogMC = GFxTAFrontEnd_BindKey(MenuManager.SpawnDialog('BindKeyDialog'));
       DialogMC.SetTitle("Set New Key");
       DialogMC.SetInfo("Press the key you want to use for " $ GetBindName(index));		        
       DialogMC.SetButtonLabel("CANCEL");
       DialogMC.SetBackButton_OnPress(Select_Cancel);
    }
    do i get my bonus points?? i take cookies as payment! (and thanks! - wish i checked FilterButtonInput - the name of the method isnt obvious but the params it handles are DOH!!)

    Leave a comment:

Working...
X