TripleA Logo TripleA Forum
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags
    • Register
    • Login

    Game notes max width

    Scheduled Pinned Locked Moved Map Making
    36 Posts 4 Posters 4.7k Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C Offline
      Cernel Moderators @LaFayette
      last edited by

      @LaFayette I've tried in several other cases, also on otherwise completely blank or next to blank notes, as per screenshots at this thread, and it still gives 30% more pixels. Look at this:
      https://forums.triplea-game.org/topic/1784/game-notes-max-width/6?page=1

      LaFayetteL 1 Reply Last reply Reply Quote 0
      • LaFayetteL Offline
        LaFayette Admin @Cernel
        last edited by

        @Cernel Give it a try as a web-page. The swing rendering should not be too different, if you can't get it to work there, it's pretty guaranteed swing won't do any better.

        C 2 Replies Last reply Reply Quote 0
        • C Offline
          Cernel Moderators @LaFayette
          last edited by

          @LaFayette said in Game notes max width:

          @Cernel Give it a try as a web-page.

          What do you mean?

          1 Reply Last reply Reply Quote 0
          • LaFayetteL Offline
            LaFayette Admin
            last edited by

            Save the HTML content as a ".html" file and open it in a web browser.

            1 Reply Last reply Reply Quote 0
            • C Offline
              Cernel Moderators @LaFayette
              last edited by

              @LaFayette said in Game notes max width:

              @Cernel Give it a try as a web-page. The swing rendering should not be too different, if you can't get it to work there, it's pretty guaranteed swing won't do any better.

              Ok here it is what I get on a html file with this code:

              <html>
              <body>
              <table width="1000px" border="1px">
                <tr>
                  <th>AAA</th>
                  <th>BBB</th> 
                </tr>
                <tr>
                  <td>aaa</td>
                  <td>bbb</td> 
                </tr>
              </table>
              </body>
              </html>
              

              Screenshot:
              508791ff-bc01-40f8-b30b-b55e5523b907-image.png

              It's fully correct. So, does this prove the problem (getting 130% the pixels you ask for) is not with my system, but with TripleA?

              1 Reply Last reply Reply Quote 0
              • LaFayetteL Offline
                LaFayette Admin
                last edited by

                We're using Swing HTML rendering, we literally can't fix it and have not coded anything to alter or manage it. The fix needs to be in crafting the HTML that renders properly in that HTML rendering engine.

                1 Reply Last reply Reply Quote 0
                • LaFayetteL Offline
                  LaFayette Admin
                  last edited by

                  Correct rendering in a webpage is necessary but not sufficient criteria for having it render well in the Swing HTML renderer. Said another way, if it does not work on a vanilla webpage, it certainly won't work in Swing. But even if it renders well on a modern browser, the Swing HTML renderer does not guarantee to be compliant, is old, and has no guarantee it'll do anything really correctly.

                  1 Reply Last reply Reply Quote 0
                  • C Offline
                    Cernel Moderators
                    last edited by

                    Well, in my opinion this is a pretty major issue TripleA is going to go along with, as mapmakers will keep formatting notes likely inherently wrong, with respect to their intentions (like @Frostion), over the years, and new mapmakers will have to find out that they are getting 30% more pixel than they wanted, so I suggest at least tracking this somewhere.

                    1 Reply Last reply Reply Quote 0
                    • LaFayetteL Offline
                      LaFayette Admin
                      last edited by

                      Tracking is for things we can fix and do something about. The problem is in the HTML and the HTML renderer, neither of which is controlled by the game engine proper.

                      1 Reply Last reply Reply Quote 0
                      • C Offline
                        Cernel Moderators
                        last edited by Cernel

                        Ok, anyway, if anybody is curious about this problem that, apparently, will never be possibly fixed, you can install this map:
                        0.zip

                        Then, starting it, if you see what I see, you should see a table of 130 pixels wideness, while, opening the xml, you can see this is the code of the notes property:

                            <property name="notes">
                              <string/>
                              <value><![CDATA[
                        <html>
                        <body>
                        <table style="width:100px;background-color:FFFFFF">
                          <tr>
                            <th>a</th>
                            <th>b</th> 
                          </tr>
                          <tr>
                            <td>c</td>
                            <td>d</td> 
                          </tr>
                        </table>
                        </body>
                        </html>
                        				]]></value>
                            </property>
                        

                        The map works both on 1.9 and 2.0.

                        If you believe the wideness of the table in notes is given as 100 pixels (as it should), please upload a screenshot of it.

                        1 Reply Last reply Reply Quote 0
                        • C Offline
                          Cernel Moderators
                          last edited by

                          Issue tracked in:
                          https://github.com/triplea-game/triplea/issues/6157

                          1 Reply Last reply Reply Quote 0
                          • LaFayetteL Offline
                            LaFayette Admin
                            last edited by

                            @Cernel the HTML needs to be fixed within the constraints of the HTML rendering. There is no code fix for us to apply here. We're not modifying the HTML, we're not rendering it ourselves. There is no way we're going to change anything (short of rebuilding an HTML renderer, IE; a web-browser) that makes this exact HTML render how you want.

                            1 Reply Last reply Reply Quote 0

                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                            With your input, this post could be even better 💗

                            Register Login
                            • 1
                            • 2
                            • 1 / 2
                            • First post
                              Last post
                            Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums