Search
  • Wetware Team

Scrolling Documents!

Kind of a small silly thing to figure out so far down the line, but now our document viewer can be scrolled!


A little bit of background - in Wetware you can collect documents around the lab which contains lore about the world, and sometimes important information about gameplay.


Since these documents are to have rich content (e.g. various styles of text, images, and animated images), we decided to use UE4's web view and store these documents internally in the HTML format.


This makes it so that whoever is making or editing documents don't necessarily have to have the whole editor open, and additionally don't need a special skill to make rich content (HTML and CSS knowledge is more widespread and easier to pick up).


For the longest time, though, we were unable to make document contents overflow the UI view, since UMG's scrolling system doesn't really know what's going on inside the web view. For all it cares, it's still a UI element the size of the current view!


So far the workaround for that is to design the documents to fit the UI view. Sometimes we have to really s q u i s h things, or cut up documents into parts.



Recently, though, we've discovered a new blueprint node: Execute Javascript! This is a really powerful node, and as you expect, we can send scroll commands to the web view element.




Now we don't have to worry about page size limitations, and can give the document contents the breathing room they deserve!




5 views
  • Instagram
  • Facebook
  • Twitter

Wetware

  • Black Facebook Icon
  • Black Instagram Icon
  • Black Twitter Icon