Announcement

Collapse
No announcement yet.

Clickable text, Hyper text.

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

  • replied
    Hello,

    In another opinion, roughly;
    Reconstruct the widget when any text changed with structure.

    Message Struct consist of two data members
    string Message
    bool bIsHyperlink

    You have to expose Message Struct when creating the widget.

    When text changed, the widget will construct again and text overflows automatically changed.

    Leave a comment:


  • replied
    I have a similar method of doing clickable text, but that only works if those 'helper widgets' can be added to something like a horizontal/vertical box. What I am looking for is a solution to get specific text, words or sentences, inside a constantly changing textbox to be - or appear - clickable.

    But you know, your mention of the wrap box planted a seed..
    Which grew into:

    Click image for larger version  Name:	ClickableText.png Views:	1 Size:	27.6 KB ID:	1480746

    Basically what I'm doing is:
    DialogueWidget has a scrollbox where any paragraphs will be added to. The scrollbox is the black area.
    ParagraphWidget (Inside the red squares) is a wrapbox, which texts are added to.
    TextWidget (inside yellow squares) contains the text, onclicked functions and ID.

    That's pretty much it.

    As you can see it's not perfect; i'd like the texts to wrap properly instead of being in these predefined chunks. if that could be solved I think I would use this method.
    Also, this does not make text wrap. Update: I checked the wrong wrap checkbox. The one under wrapping should be used and a number needs to be set.
    Result:

    Click image for larger version  Name:	Textwrap.png Views:	1 Size:	43.1 KB ID:	1480754

    But what's up with those two? The upper right I get, but the lower left?

    Last update:
    Click image for larger version  Name:	Textwrap2.png Views:	1 Size:	29.7 KB ID:	1480780

    I can conclude that it's not actually working. It felt like I was doing progress but the text blocks wrap randomly and unpredictably, and texts often can't be seamless as you can see in the picture.


    So still looking for options.
    Last edited by ste1nar; 05-25-2018, 05:19 PM.

    Leave a comment:


  • replied
    In tricky way, add a fake border for handling mouse move events. Regarding to assocaited type(hyperlink or normal text), construct a different custom size widget and attach together and add to the parent as horizontial/wrap box.

    Thats the video of how I used fake border: https://streamable.com/8re5v

    It is not so fully dynamic but making fake border area could help you.

    Leave a comment:


  • started a topic Clickable text, Hyper text.

    Clickable text, Hyper text.

    Example text:
    “To bee or not to bee".

    Say I have this text added to a textbox. How could I make the underlined words be clickable?
    - I can't add a widget with clickable text to the textbox.
    - The words may need some data associated to them, but that's optional.
    - Solution should of course be applicable to any text of any length.
Working...
X