Announcement

Collapse
No announcement yet.

BLUI Open Source HTML5/JS/CSS HUD/UI

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

    #46
    Is there a way to bind button events like I have "Clicked Me" button HUD in Html and then when I clicked on it, it log some output in UE4?

    Thanks,

    Comment


      #47
      Originally posted by Shantaram View Post
      Is there a way to bind button events like I have "Clicked Me" button HUD in Html and then when I clicked on it, it log some output in UE4?

      Thanks,
      Hello again, this is very possible!

      I haven't written up the wiki on JavaScript events due to classes take up some time, but I'll be doing that tonight.
      Inside your JavaScript, you can call a native function called blu_event();

      Code:
      <a href="#" onclick="blu_event('my_button', 'clicked!')"></a>
      Just a simple on click example up there ^

      In blueprints you'd assign a script event emitter from BluEye instance, looking something like this:

      Click image for larger version

Name:	ss+(2015-02-20+at+02.55.16).png
Views:	1
Size:	80.1 KB
ID:	1066814

      Event Name would result in "my_button" and Event Message would be "clicked!"

      you can pass booleans, strings, doubles, or integers in the 2nd argument of the JavaScript method

      HTML/CSS/JS Powered UI - Free

      Comment


        #48
        Originally posted by AaronShea View Post
        Hello again, this is very possible!

        I haven't written up the wiki on JavaScript events due to classes take up some time, but I'll be doing that tonight.
        Inside your JavaScript, you can call a native function called blu_event();

        Code:
        <a href="#" onclick="blu_event('my_button', 'clicked!')"></a>
        Just a simple on click example up there ^

        In blueprints you'd assign a script event emitter from BluEye instance, looking something like this:

        [ATTACH=CONFIG]26350[/ATTACH]

        Event Name would result in "my_button" and Event Message would be "clicked!"

        you can pass booleans, strings, doubles, or integers in the 2nd argument of the JavaScript method
        Thanks for the quick reply and explaining how the system works.

        Thanks,

        Comment


          #49
          Got it up and running with 4.7 without a fuss.

          Only have a couple basic prototypes working

          1. Glad to see if works with UMG, rather than trying to completely replace it. Hopefully it continues so they can get benefits from each other

          2. Quickly realized how much of the web still uses flash, haha. CEF and Flash working together is a bit tricky. Do you have any ideas on how you can get flash working from a packing/distribution standpoint (win only). I mainly ask cause a couple pieces of static content are flash based (not worried about mobile, so it'd be for win only). It would be a pain to say go to adobe.com and download flash, haha.

          3. PIE and adobe flash won't work well (it will run once, but trying again will crash)
          Last edited by KRushin; 02-21-2015, 12:28 AM.
          Twitter - @TheKRushin

          Feel free to ask questions and come learn to be an #UnrealDev

          How to report a Bug

          Comment


            #50
            Seeing as CEF and Chrome share the code looking for third party plugins like Flash it should function if flash is installed. As far as shipping flash I'm not sure about the legality.

            It seems you can get small flash redistributable installers here: https://www.adobe.com/products/flash...ribution3.html

            EDIT: Hm. Weird about flash and PIE. I'll look into that!
            Last edited by AaronShea; 02-21-2015, 12:35 AM.

            HTML/CSS/JS Powered UI - Free

            Comment


              #51
              seems like it comes down to processes being spawn but not being shut down when exiting PIE? (load a youtube video (HTML5) and you will continue to hear sound). But great work man is really cool and will continue to play around with it
              Twitter - @TheKRushin

              Feel free to ask questions and come learn to be an #UnrealDev

              How to report a Bug

              Comment


                #52
                Originally posted by KRushin View Post
                seems like it comes down to processes being spawn but not being shut down when exiting PIE? (load a youtube video (HTML5) and you will continue to hear sound). But great work man is really cool and will continue to play around with it
                I'd assume that's the major issue yeah. I'll have to look into a bug fix for that. Thanks for the report!

                HTML/CSS/JS Powered UI - Free

                Comment


                  #53
                  This is amazing! Thank you so much!

                  Comment


                    #54
                    Originally posted by Shantaram View Post
                    Is there a way to bind button events like I have "Clicked Me" button HUD in Html and then when I clicked on it, it log some output in UE4?

                    Thanks,
                    I've created the quick start guide on JavaScript events here:
                    https://github.com/AaronShea/BLUI/wi...aScript-Events

                    HTML/CSS/JS Powered UI - Free

                    Comment


                      #55
                      I'm curious if you had any ideas in regards to CEF. I've been experiment with having twitch streams, but i think CEF doesn't allow irc sockets to open (so no video streams/chat will load). Just curious if you had any ideas around this (as they don't support any HTML5 yet)
                      Twitter - @TheKRushin

                      Feel free to ask questions and come learn to be an #UnrealDev

                      How to report a Bug

                      Comment


                        #56
                        Originally posted by KRushin View Post
                        I'm curious if you had any ideas in regards to CEF. I've been experiment with having twitch streams, but i think CEF doesn't allow irc sockets to open (so no video streams/chat will load). Just curious if you had any ideas around this (as they don't support any HTML5 yet)
                        That is an interesting issue.. it seems that something in CEF doesn't like Flash sockets... I'll look into that.

                        In terms of chat, anything WebSocket based will work just fine.

                        HTML/CSS/JS Powered UI - Free

                        Comment


                          #57
                          its such a hyper specific issues so don't worry about it too much, but twitch is stuck in the 2000's with flash and opening (flash) irc sockets, instead of HTMl5 / web socket based chat system, haha.
                          Last edited by KRushin; 02-21-2015, 10:22 PM.
                          Twitter - @TheKRushin

                          Feel free to ask questions and come learn to be an #UnrealDev

                          How to report a Bug

                          Comment


                            #58
                            Originally posted by KRushin View Post
                            its such a hyper specific issues so don't worry about it too much, but twitch is stuck in the 2000's with flash and using irc sockets, instead of HTMl5 / web socket based chat system, haha.
                            Very true, haha.
                            Still, I'd like to look into it just to see if it can be resolved.
                            Glad you're finding the plugin to at least be entertaining

                            HTML/CSS/JS Powered UI - Free

                            Comment


                              #59
                              Small update in the works for 2.1 release:

                              Click image for larger version

Name:	ss+(2015-02-22+at+04.26.35).png
Views:	1
Size:	27.2 KB
ID:	1066971

                              No longer needing ANY C++ modifications

                              HTML/CSS/JS Powered UI - Free

                              Comment


                                #60
                                How does the scrolling with mouse wheel works? Right now whenever I am trying to scroll a webpage it doesn't work. Is it something that I have to do in Unreal to make it work.

                                Thanks,

                                Comment

                                Working...
                                X