1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

UWindow2 Development Blog

Discussion in 'Unreal Tournament 3' started by [SAS]Solid Snake, Feb 3, 2008.

  1. [SAS]Solid Snake

    [SAS]Solid Snake New Member

    Joined:
    Jun 7, 2002
    Messages:
    2,633
    Likes Received:
    0
    I had to use a different map in order for the UI to boot first. Thus the fancy character customization map will also be gone. I am hoping to replace it with my own version.
     
  2. Crotale

    Crotale _________________________ _______________

    Joined:
    Jan 20, 2008
    Messages:
    2,535
    Likes Received:
    12
    Cool. Thanks!
     
  3. [SAS]Solid Snake

    [SAS]Solid Snake New Member

    Joined:
    Jun 7, 2002
    Messages:
    2,633
    Likes Received:
    0
    Did some more work on the window alignment management code today. This alignment mode is actually the easiest to do, since it doesn't actually care about how windows are placed on screen. The one aspect that it has to handle properly is ordering, to make sure that windows maintain correct ordering while moving around and so forth.

    [​IMG]

    uWindow2 uses an event based system to do things. You can still make things tick based if you really require it, but I don't know of too many things that require tick based timing within a UI. Anyways, what an event based system does, is simply wait and respond to events. This is a necessary implementation as it is the fastest to execute within Unrealscript.

    Unlike xHTML, you define bounds within uWindow2 (instead of just wrapping around <a>). Again these bounds are defined in the config file like so:

    Code:
    [window UW_Container]
    StyleSheetNames=window
    BoundsDefinitions=(Bounds="0.25f,0.25f,0.5f,0.5f",Actions=((Name="Test",Key="LeftMouseButton",EventType=IE_Pressed)))
    
    You are allowed to define as many bounds as you like, although the order of them is not guaranteed, this having overlapping bounds is probably not the best idea. I may include a z-index type property to assure order is maintained. You can define bounds in percentages by using decimal points or by pixel by just using a value (0.0f = 0% and 0 = 0 pixels). Multiple actions can be attached to bounding volume, and you also encode how it is triggered by using the Key and EventType parameters.

    Unrealscript then handles the rest. It will automatically handle bound creation and alignment along with testing for input for you. The action that is fired off will wind up being an Unrealscript object to do a certain behavior. Unfortunately, configs can only go so far, and to also encode behavior into it would be too hard to do.

    Majority of behavior objects will of course come with uWindow2, but for specific behavior it may mean that some scripting is involved. Unfortunately, it's probably something I can't do much about.
     

    Attached Files:

  4. Tweakd

    Tweakd Multiplayer notepad ftw!

    Joined:
    Feb 20, 2008
    Messages:
    327
    Likes Received:
    0
    N1 Snake. I really like the fact that you are keeping everyone updated with detailed progress reports. Makes a nice change :)

    Good luck with whichever part your working on next. Just out of interest, what are you trying next?
     
  5. os][ris

    os][ris New Member

    Joined:
    May 10, 2006
    Messages:
    210
    Likes Received:
    0
    best mod ever?????
     
  6. [SAS]Solid Snake

    [SAS]Solid Snake New Member

    Joined:
    Jun 7, 2002
    Messages:
    2,633
    Likes Received:
    0
    Still working on the bound detection and interaction. Still a few design kinks to smooth out with the system.
     
  7. paradigm

    paradigm Banned

    Joined:
    Mar 9, 2008
    Messages:
    24
    Likes Received:
    0
    bump update?
     
  8. Bersy

    Bersy New Member

    Joined:
    Apr 7, 2008
    Messages:
    910
    Likes Received:
    0
    It will be nice to see this working. As far as entering it in MSUC I'm curious what you can actually win for it.. hope you're paying attention to phase deadlines, also since I think "tools" is in the first phase which starts soon. You might need to clarify with Epic exactly what category this falls under.. a tool or a mod (since it doesn't exactly mod gameplay itself)
     
  9. [SAS]Solid Snake

    [SAS]Solid Snake New Member

    Joined:
    Jun 7, 2002
    Messages:
    2,633
    Likes Received:
    0
    I shall update, when I update. It probably fits under Tools.

    As far as I know the deadline for Phase 1 is June 27th, 2008.
     
  10. TheIronKnuckle

    TheIronKnuckle What the hell is this "ballin" thing?

    Joined:
    Feb 15, 2008
    Messages:
    1,117
    Likes Received:
    0
    Then GO GO GO you freaking beast! This is the best thing that could happen to ut3, and you deserve to be payed for it.

    MAKE SURE YOU WIN DAMN IT!!!!! If you win, then epic might include the menu as an alternative when (or if) they release ut3 gotye or UT3 SE! Like how they released ut2004ece with community content, they may do the same with ut3. If this mod is included in the rerelease, then you might have saved ut3 and ressurected a community! Think of all the people who hate the current UI to the point of uninstallation, this may get them to reconsider and the servers will have more players!
     
  11. [SAS]Solid Snake

    [SAS]Solid Snake New Member

    Joined:
    Jun 7, 2002
    Messages:
    2,633
    Likes Received:
    0
    [​IMG]

    Ahh ok. Rewrote some more bits. After some experiementation a pure alignment manager didn't work out. It tried to do far too much all in a single class. So I reverted back to self management of dimensions for windows. But it's much simplier this time round to actually make.

    The code to generate the screenshot above is:

    Code:
    [canvas UW_StyleSheet]
    Ln=background-image:UWindowResource.Background.Background_A
    Ln=background-coordinates:0,0,1024,768
    Ln=dimensions:0.f,0.f,1.f,1.f
    
    [window UW_StyleSheet]
    Ln=background-image:UWindowResource.Texture.WindowFrame
    Ln=background-style:stretched
    Ln=dimensions:0.25f,0.25f,0.5f,0.5f
    
    [window UW_Component]
    StyleSheetNames=window
    BoundsDefinitions=(Dimensions="0.1f,0.1f,0.8f,0.8f",Actions=((ActionClass="Test",Key="LeftMouseButton",EventType=IE_Pressed)))
    
    [canvas UW_Component]
    StyleSheetNames=canvas
    
    The reason why windows are within windows, is because I told uWindows to currently add new windows inside the last created window. Layout management is one of the harder points of GUI stuff, and there is still plenty to do, but I feel that this is a pretty good attempt at it so far, with good flexibility.
     

    Attached Files:

  12. Dark Pulse

    Dark Pulse Dolla, Dolla. Holla, Holla.

    Joined:
    Sep 12, 2004
    Messages:
    6,186
    Likes Received:
    0
    Updates. <3
     
  13. Bersy

    Bersy New Member

    Joined:
    Apr 7, 2008
    Messages:
    910
    Likes Received:
    0
    now, add some buttons and doohickies. make it serve my beer, and perform other pleasurable services.

    well keep up the good work. but that june deadline is creeping up.
     
  14. Vitamin-Carrot

    Vitamin-Carrot If

    Joined:
    Mar 18, 2006
    Messages:
    1,407
    Likes Received:
    0
    o0o0o0o0o0o0o0o0o

    widget of doom?
     
  15. WGH

    WGH New Member

    Joined:
    Jan 22, 2006
    Messages:
    237
    Likes Received:
    0
    Sweet!
     
  16. [SAS]Solid Snake

    [SAS]Solid Snake New Member

    Joined:
    Jun 7, 2002
    Messages:
    2,633
    Likes Received:
    0
    Did some more work the last few days. Finished up the bounds detection code, and created some of the default action objects that handle window manipulation such as dragging and resizing.

    [​IMG]

    And the code to generate the screenshot above (I added a few windows into the scene). It's actually quite easy now to create some windows. Next up is to ressurect the input box code I made a while back and get that working with the new system, and then add text box component ... and that should make a console that is similar to UT99.

    Code:
    [canvas UW_StyleSheet]
    Ln=background-image:UWindowResource.Background.Background_A
    Ln=background-coordinates:0,0,1024,768
    Ln=dimensions:0.f,0.f,1.f,1.f
    
    [window UW_StyleSheet]
    Ln=background-image:UWindowResource.Texture.WindowFrame
    Ln=background-style:stretched
    Ln=dimensions:0.25f,0.25f,0.5f,0.5f
    
    [demoguy UW_StyleSheet]
    Ln=background-image:UI_HUD.Materials.CharPortrait
    Ln=dimensions:0.1f,0.1f,0.8f,0.8f
    
    [innerwindow UW_Component]
    StyleSheetNames=demoguy
    
    [window UW_Component]
    StyleSheetNames=window
    BoundsDefinitions=(Dimensions="0.f,0.0f,1.0f,1.0f",Actions=("UWindow.UW_Action_BringToTop"))
    BoundsDefinitions=(Dimensions="0.f,0.f,1.f,12",Offsets="2,2,-4,0",Actions=("UWindow.UW_Action_Drag"))
    BoundsDefinitions=(Dimensions="0.f,0.f,2,1.f",Actions=("UWindow.UW_Action_ResizeL"))
    BoundsDefinitions=(Dimensions="0.f,0.f,1.f,2",Actions=("UWindow.UW_Action_ResizeT"))
    BoundsDefinitions=(Dimensions="1.f,0.f,2,1.f",Offsets="-2,0,0,0",Actions=("UWindow.UW_Action_ResizeR"))
    BoundsDefinitions=(Dimensions="0.f,1.f,1.f,2",Offsets="0,-2,0,0",Actions=("UWindow.UW_Action_ResizeB"))
    ChildComponents=innerwindow
    
    [canvas UW_Component]
    StyleSheetNames=canvas
    
     

    Attached Files:

  17. Jrubzjeknf

    Jrubzjeknf Registered Coder

    Joined:
    Mar 12, 2004
    Messages:
    1,276
    Likes Received:
    0
    Will we get spiffy sounds with it too when opening/closing the window? :D
     
  18. os][ris

    os][ris New Member

    Joined:
    May 10, 2006
    Messages:
    210
    Likes Received:
    0
    This looks like a lot of work.. Good job man.
     
  19. [SAS]Solid Snake

    [SAS]Solid Snake New Member

    Joined:
    Jun 7, 2002
    Messages:
    2,633
    Likes Received:
    0
    This is the nice thing about the action system. If I haven't written what you want/need, you can make your own action objects which does what you want/need. I haven't added post action or pre action list yet, but thinking about maybe I will so that actions can be triggered before the main action(s) gets triggered, or .. well, there are a lot of options here :). Actions are quite complicated actually, from my end anyways, since there are a lot of aspects people may want to override such as:

    - Call actions before or after the main actions get called
    - Call actions if the main actions succeed or not
    - Call actions within the main actions
    - Call actions in relation to other windows

    Right now, there is limited communication between windows themselves, and right now most of Unreal Tournament's interface doesn't really require it, but if you plan on doing complex interfaces then some form of communication may be required. This isn't a problem if I was to just script everything, but being a completely themeable, config system makes it important to expose some of that functionality within there.

    As you also notice, there aren't any strong clues as to how the actions are triggered. Right now, the keys and event types are stored within the scripts themselves, but I plan to open that up to the config system some how.
     
  20. Vitamin-Carrot

    Vitamin-Carrot If

    Joined:
    Mar 18, 2006
    Messages:
    1,407
    Likes Received:
    0
    Yet another very talented kiwi

    I feel like im letting us kiwi's down :(
     

Share This Page