Author Topic: General Discussion  (Read 3821901 times)

0 Members and 25 Guests are viewing this topic.

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5820 on: September 17, 2015, 04:31:36 AM »
Quote
screen library_show_text(orly):
    $ strer = "A huge string."
    add "content/gfx/frame/library_page.jpg" at truecenter
    textbutton "Enough with it" action (Hide("library_show_text", transition=dissolve), Jump("library_read_matrix"))
    viewport:
        mousewheel True
        draggable True
        scrollbars "vertical" xpos 978
        xpos 303
        ypos 30
        xysize (675, 670)
        if orly == 1:
            text "%s" %strer size 14 color black
I tried to add at right to scrollbar, it ignores it too.

 
« Last Edit: September 17, 2015, 04:52:04 AM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5821 on: September 17, 2015, 04:49:31 AM »
I tried to add at right to scrollbar, it ignores it too.

It looks fine, did you try it without xpos? I would not even expect this code to run at all, xpos after the scrollbars will be inherited by the viewport, not the bar, so you have two and that's usually an error.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5822 on: September 17, 2015, 04:53:13 AM »
Yeah, you can ignore that xpos 978, I just tried to do something about scrollbar position but nothing worked. The screen looks like this. I suppose it could be a renpy bug.
« Last Edit: September 17, 2015, 05:41:58 AM by DarkTl »

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5823 on: September 17, 2015, 05:43:16 AM »
Such an irony, it's so hard to add a scrollbar to text in renpy, and the only component that has it already is not working properly.

Well, I need a scrollbar anyway, that's why I used viewport. If it doesn't work, it should be coded manually. I googled it a bit, it's a pretty complex stuff. I will leave it to you.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5824 on: September 17, 2015, 06:10:53 AM »
Remove it, just leave the Viewport. I'll figure out the bar later.
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5825 on: September 17, 2015, 07:17:56 AM »
Code: [Select]
    $ strer = "A huge string."
    frame:
        background Solid("#FFFFFF")
        xysize (600, 620)
        xalign 0.5
        has viewport:
            xysize (580, 620)
            scrollbars "vertical"
            draggable True
            mousewheel True
            text "[strer]" size 14 color "#000000"

Try something like this, apparently it needs a container to align the bar properly, best best is prolly a side like you've tried but it should contain a viewport, not be a part of it.

Still, since we have a background, we might as well use a frame. This works on a fresh project, you'll have to replace background with the pergament image. If it doesn't size itself properly, use:

Code: [Select]
    frame:
        background Frame("path_to_image", 10, 10)
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5826 on: September 17, 2015, 07:29:16 AM »
Yup, now it works. I don't want a frame though, so I used viewport inside viewport.

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5827 on: September 17, 2015, 07:54:48 AM »
I found some info about text formatting inside strings, like {b}{/b}. But nothing about text alignment. Is there any way to control it, besides centered function which will output everything at center (and I need only one string)?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5828 on: September 17, 2015, 09:17:59 AM »
You should use fixed or side. Two viewports are Wierd. I am not sure about texts, maybe styles could be used or RenPy could have { } options for it.

We need to set paramiters for what is required.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5829 on: September 17, 2015, 10:27:49 AM »
Weird is the need in two containers only because one cannot handle its own scrollbar without a clear reason, even though it's not mentioned in manuals. If you are concerned, report it as a bug.

I actually find stuff like side or xalign hard to understand so far, since delphi manipulates only coordinates and size of elements when you build a gui. And frame is not invisible, I don't need it on my background.
You can recode it as you like as long as functionality will remain.

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5830 on: September 17, 2015, 10:49:33 AM »
Small tagger update, now all buttons and the click on the picture that reloads it will return focus to file list. Thus keyboard arrows could be used to select another picture all the time.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5831 on: September 17, 2015, 12:31:14 PM »
Weird is the need in two containers only because one cannot handle its own scrollbar without a clear reason, even though it's not mentioned in manuals. If you are concerned, report it as a bug.

I posted this on forums, since I am not sure that I can understand the documentation on this properly, it may not even be a bug.

I actually find stuff like side or xalign hard to understand so far, since delphi manipulates only coordinates and size of elements when you build a gui. And frame is not invisible, I don't need it on my background.
You can recode it as you like as long as functionality will remain.

Invisible frame is called "fixed". You can also set background of a frame to Null() but that is usually a weird way of doing things.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5832 on: September 17, 2015, 12:46:37 PM »
I am not sure about texts, maybe styles could be used or RenPy could have { } options for it.
Sadly, no. I found a PyTom post that you have to display text with different align separately. It's not worth it, I'll just use spaces when I need it in center.

We have a library now, and there are plenty of bookshelves for moar huge texts if there will be decent writers  :)
Don't delete EBGaramond-Regular font in the future, I used it there and it looks very good.

I'll wait for replies to your post before changing something in gui.
« Last Edit: September 17, 2015, 12:50:54 PM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5833 on: September 17, 2015, 12:56:50 PM »
Sadly, no. I found a PyTom post that you have to display text with different align separately. It's not worth it, I'll just use spaces when I need it in center.

You can make one book and I could write a really simple class that can build strings and align them appropriately in auto mode. I just need to see one book (any book) with all required formats.

I'll wait for replies to your post before changing something in gui.

You can use older way with a side and YScrollBars like in the example in screen language. That will definitely work (so does an extra container btw.).
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5834 on: September 17, 2015, 01:18:01 PM »
You can make one book and I could write a really simple class that can build strings and align them appropriately in auto mode. I just need to see one book (any book) with all required formats.
Well, pull and go to academy. There is only library for now, since I have no idea how else we could use academy without a huge amount of coding.