Page 13 of 27 FirstFirst ... 3111213141523 ... LastLast
Results 121 to 130 of 264

Thread: Canvas-based GUI Framework in UnrealScript [Community Code Project]

  1. #121
    The input is now working, when i open the menu and just press enter the exit button is activated and i return to the main menu

    there are some things that need to be figured out however, when i press enter and the menu is closed, it gives an error that i don't have a pawn (because i don't). The problem is, when i press enter when the menu is opened, and i'm clicking a component (not the exit button) it still gives that error. my goal was to completely remove any other functions being called on keypress when the menu is active.

    on a sidenote, the Menu is no longer opened through the exec function, don't know if that could cause any problems for anyone, not being able to use the ini's anymore... One solution to bring more problems it seems...

  2. #122
    i'm more or less satisfied with how the input now works, menu opened through exec function again, no longer the error when pressing enter

    Had some problems with the Textbox, first time i completely failed, so i had to start all over again. Second try was actually not bad, but i had no idea how to fix what was wrong. Third try started with a shameless copy of Console , turned out i had most of it right the second try. only thing from epic's code that confuses me is "if (Character >= 0x20 && Character < 0x100)", i never would have thought of that, i don't even understand it

    anyway, need to do some more tweaking and testing, i expect to be able to upload it somewhere this weekend

  3. #123
    Quote Originally Posted by thommie View Post
    "if (Character >= 0x20 && Character < 0x100)"
    those look like hex values, and If this appears in a foreach (character in string) then it might be checking to see if the "character" being entered is even an acceptable character to check against an exec function. kinda like back in c++ working with cin making sure that what was entered was even more then just a line return before checking the actual value of what was entered.

  4. #124
    thanks for clearing that up gardian06, it has been a while since i've used c++.

    small update today:
    Added a Textbox that can be used for the input of text.
    added key functionality to the components.
    -pressing enter while in the ExampleMenuScene now activates the exitbutton.
    left and right arrow also work when the scrollbox is selected to browse through the list.

    now i need something for the ToDo list

  5. #125
    Crusha K. Rool
    I got a PM from a guy who was wondering why the example content didn't work for him. Had to explain him that the example content is currently referencing textures that are not provided with the download and that he needs to use some of his own textures for that.

    And yeah, 0x20 should equal 32 and 0x100 should equal 256. And those are exactly the non-printable (whitespace) characters of the ASCII table.
    Most compilers automatically parse hex (starting with 0x) or octal values (starting with 0) into their decimal (or actually binary, since that's how it's stored anyway) pendant. So some programmer was simply flexing with his brain.

  6. #126
    i've adjusted the example content, and added a picture at the downloads section. Import the file in udk at GUI.GUI_Buttons_02 and it should work without any problems. doesn't look like much, but it's something

  7. #127
    Crusha, did you try the display of text in a button yet? i have some problems with it, and i have no idea how to fix it. it will probably be something easy i'm missing.

    i know i forgot to add a part in the GUIButtonComponent, in DrawCaption() (the bold part)
    			DrawString = Localize(LocalizationHeading,CaptionInfo[DrawIndex].Caption,LocalizationFileName);
    			DrawString = CaptionInfo[DrawIndex].Caption;
    which would enable you to use non-localized strings in a button, though this is only part of the problem (i think).

    i've added a button in the defaultproperties, with a localized caption, working perfectly.
    i've added a button in the InitMenuScene() of the MenuScene, setting the exact same properties as the one in the defaultproperties. it only displays the texture, not the caption.

    Checked that the position at which the string is drawn is correct and inside the component's boundaries.
    Checked the DrawString in the button's DrawCaption(), it's correct, as is the font.

    i have no idea how to fix it, since everything seems to be correct and it is still not working

    like i said, it was something easy i had missed. the part where i said it had the exact same properties... i forgot to include the alfa of the drawcolor of the caption.....

  8. #128
    Crusha K. Rool
    Massive update:
    • Fixed severe memory leaks that could cause the editor to crash after playing a round in PIE. Among other things.
    • Mouse cursor is now also affected by XBox pad control stick. It's sensibility can be individually set but there is not real support for the console buttons yet.
    • GUIButtonComponent and it's subclasses can now specify a SoundCue to play on MouseEntered, Exited, Pressed and Released.
    • Added option bForceNormalDrawInfo and bForceNormalCaptionInfo, which will force the Component to always use the Info at index 0. This is useful if you intend to not use any else as it will avoid redundant code and makes things more readable.
    • Fixed FindComponentByName (now renamed to "ByTag") to work properly. Using this will allow you to get references to the Components any time and anywhere in the menu scene (and regardless of their hierarchy depth) by recursively checking for their Tag property (which is a new string property that is specified manually and is reliable compared to the Name property). That way can we get completely rid of hard object references to the Components, which would need to be cleared up properly in the end.
    • Added function GetComponentSize() which returns the current Width and Height of the Component as part of a 2D vector.
    • Added function MoveComponent() which handles the creation and maintenance of a GUIComponentModifier that moves the component to a specified location over time.
    • Added event Moved() which is called after MoveComponent finished.
    • GUIHUD assures now that the HUDs' PostRender() is called, thus also calling DrawHUD() and others to properly show Kismet messages, errors, debug stats and calculate the screen size value correctly.
    • GUIHUD.CheckViewPortAspectRatio() now falls back to Canvas Clip values in case ViewX or ViewY should ever be 0 due to some issue with subclassing certain HUDs.
    • If you don't specify a Font to use in the CaptionDrawInfo, it will fall back to GUIHUD.PlayerFont as the globally used Font in your menu. Useful to save some writing.
    • TogglePauseMenu() is now stubbed to prevent the Scaleform menu from coming up.
    • Renamed ScrollBox Components to an appropriate GUI-version to follow our old naming scheme.
    • Added EditInLine(New) support for the system, allowing to test it in real time using the Remote Control.

    You can now design the GUI in real time by using the Remote Control functionality of the UDK. Simply add -remotecontrol to the parameters of your UDK shortcut and you get this menu where you can edit values of each exposed property at run time. You still need to type the values out yourself in the DefaultProperties after you set them there, but it's an enormous help if you want to experiment with this stuff.

    Here is my example (I obscured it to not disclose our game yet):

    Click image for larger version. 

Name:	GUIMenu.jpg 
Views:	33 
Size:	93.0 KB 
ID:	8200

    This is the code that was used to create it:

  9. #129
    And i was just about to start studying...

    anyway, i am getting some errors currently, mainly with the font.

    or others like
    ScriptWarning: Accessed None 'UTPlayerOwner'
    	GUIExampleHUD DM-Deck.TheWorld:PersistentLevel.GUIExampleHUD_0
    	Function UTGame.UTHUDBase:PostBeginPlay:0294
    ScriptWarning: Attempt to assign variable through None
    	GUIExampleHUD DM-Deck.TheWorld:PersistentLevel.GUIExampleHUD_0
    	Function UTGame.UTHUDBase:PostBeginPlay:02E5
    and some weird thing to do with the sound, which has little to do with the map i'm on.
    ScriptWarning: Accessed None 'PlayerOwner'
    	UTMusicManager DM-Deck.TheWorld:PersistentLevel.UTMusicManager_0
    	Function UTGame.UTMusicManager:Tick:05A6
    it's hard choosing between studying and diablo 3, but now you just had to go and do this

    good job and i will try to find some more errors so others won't.

    Had to fix the font issue, it already started to annoy me.

  10. #130
    Crusha K. Rool
    Hmm, got to look into that later. I honestly didn't pay attention to change the ExampleHUD according to these changes. If the ExampleHUD extends from UTGame stuff and I changed the default GUIFramework to actually use one of the earlier parent classes, things might go a bit wonky.

    The MusicManager issue is one related to the UTMapMusicInfo and has not really something to do with this system. I think it's rather because Epic doesn't check if you actually use UTPlayerController subclasses when you have a MapMusicInfo in the map.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts