.
Results 1 to 9 of 9

Thread: Trainz Objects in HTML Mini Browser

  1. #1
    Join Date
    Dec 2011
    Location
    USA Florida Illinois
    Posts
    881
    Blog Entries
    1
     

    Question Trainz Objects in HTML Mini Browser

    If this post needs to be moved please do..

    I have created a HTML asset, it's working great. I am having problems formatting the html web pages that use the <trainz-object> tag to format correctly in the Trainz Mini Browser. The object I am using is the Session Message Popup. This is the wiki that I am referring to;

    http://online.ts2009.com/mediaWiki/i...hp/MiniBrowser

    No matter how I try to format the objects position, it always floats back up to the top left corner of the browser as seen here;



    Here is the code for when I tried to put the object in a table, I also tried it in the <p></p> tags;

    Code:
    <html>
    <body>
        <table>
            <tr>
                <td><img src="CDETrainz.png"></td>
            </tr>
        </table>
        <p><b>CDETrainz.com</b></p>
        <p>&nbsp;</p>
        <p>Routes and Sessions for Trainz Railroad Simulator<br>Trainz T:ANE (TANE) and Trainz TRS 2019 (TRS19)</p>
        <p>&nbsp;</p>
        <p>Follow our Team on the Trainz User Forums</p>
        <table>
            <tr>
                <td><img src="Trainz Discussion Forum.png"></td>
            </tr>
        </table>
        <p>Trainz Forum Usernames;</p>
        <p>* Christopher824<br>* RockyRR</p>
        <p>&nbsp;</p>
        <p>
            <table>
                <tr>
                    <td><trainz-object style=score-gauge star-thresholds=3 points=0 high-score=3></td>
                </tr>
            </table>
        </p>
    </body>
    </html>
    Any help is appreciated.
    Last edited by Christopher824; November 18th, 2020 at 12:37 PM. Reason: updated code
    If it's not broke, don't fix it.


  2. #2

    Default

    Hi Chris

    I haven't used the mini browser in TS2019 yet but the additional tags look interesting.

    I don't know what you have tried but a couple of suggestions:
    Add the height and width values to <trainz-object width=? height=? style=?> you already have the style. I suggest this as the score guage appears to be to big for the mini browser window.
    Also try replacing <p>&nbsp;</p> code with <br> just to keep it simple - honestly I don't think this will help but I've seen stranger things happen

    Good luck
    Regards
    Ian S.

  3. #3

    Default Hello

    Quote Originally Posted by stokia01 View Post
    Hi Chris

    I haven't used the mini browser in TS2019 yet but the additional tags look interesting.

    I don't know what you have tried but a couple of suggestions:
    Add the height and width values to <trainz-object width=? height=? style=?> you already have the style. I suggest this as the score guage appears to be to big for the mini browser window.
    Also try replacing <p>&nbsp;</p> code with <br> just to keep it simple - honestly I don't think this will help but I've seen stranger things happen

    Good luck
    Thank you for sharing this with us. https://nicciskincare.com/products/dandruff-shampoo

  4. #4
    Join Date
    Dec 2011
    Location
    USA Florida Illinois
    Posts
    881
    Blog Entries
    1
     

    Default

    Quote Originally Posted by stokia01 View Post
    Hi Chris

    I haven't used the mini browser in TS2019 yet but the additional tags look interesting.

    I don't know what you have tried but a couple of suggestions:
    Add the height and width values to <trainz-object width=? height=? style=?> you already have the style. I suggest this as the score guage appears to be to big for the mini browser window.
    Also try replacing <p>*</p> code with <br> just to keep it simple - honestly I don't think this will help but I've seen stranger things happen

    Good luck
    I am beginning to believe that the <trainz-object style=score-gauge ..> is defective

    I tried all suggestions, and no luck. I tried two other <trainz-object>'s, the progress and the static-line objects. They work as expected with no issues placing them wherever I want them. Although the <p>..</p> and <br> tags both work as you would expect, I think using tables is easier to setup the page. You can even combine them all and it all still works.

    Not documented is that the progress bar progress must be a decimal, ie. for 75% you enter 0.75 and must have a height and width to display. The static-line must have height, width, and color in RGB HEX ie. #RRGGBB (yellow is #FFFF00).

    Sample code
    Code:
    <html>
    <body>
        <table>
            <tr>
                <td><img src="CDETrainz.png"></td>
            </tr>
    	    <tr>
    	        <td><b>CDETrainz.com</b></td>
    	    </tr>
            <tr>
                <td><trainz-object style=static-line color=#FFFF00 height=2 width=400></trainz-object></td>
            </tr>
            <tr>
                <td><trainz-object style=progress progress=0.7 width=200 height=20></trainz-object></td>
            </tr>
        </table>
    </body>
    </html>
    Result;




    .
    If it's not broke, don't fix it.


  5. #5

    Default

    Hi Chris

    I've had a look at this in TRS19. The Width height tags are important.

    This worked for me

    Code:
    <html>
    <body>
    <trainz-object width=500 height=250 style=score-gauge star-thresholds=3 points=0 high-score=5> </trainz-object>
    <br>
    <p>Some text here</p>
    <p>An image</p>
    <img src="train.bmp">
    </body>
    </html>
    Good luck
    Regards
    Ian S.

  6. #6

    Default

    PS

    The width and height are about the minimum that would work. You could probably reduce the height to 200 but I think the width is the most critical in this case.
    Regards
    Ian S.

  7. #7
    Join Date
    Dec 2011
    Location
    USA Florida Illinois
    Posts
    881
    Blog Entries
    1
     

    Default

    Quote Originally Posted by stokia01 View Post
    Hi Chris

    I've had a look at this in TRS19. The Width height tags are important.

    This worked for me

    Code:
    <html>
    <body>
    <trainz-object width=500 height=250 style=score-gauge star-thresholds=3 points=0 high-score=5> </trainz-object>
    <br>
    <p>Some text here</p>
    <p>An image</p>
    <img src="train.bmp">
    </body>
    </html>
    Good luck
    Still floats to the top, I reordered your code a little to have text above the object, its still stuck on the top.

    Code:
    <html>
    <body>
        <p>Some text here, more text, more text</p>
        <p>An image is an image is an image, where did it go?</p>
        <p><img src="CDETrainz.jpg"></p>
        <trainz-object width=500 height=250 style=score-gauge star-thresholds=3 points=0 high-score=5> </trainz-object>
        <br>
    </body>
    </html>



    Quote Originally Posted by stokia01 View Post
    PS

    The width and height are about the minimum that would work. You could probably reduce the height to 200 but I think the width is the most critical in this case.
    I have tried it with and without the height and width tags, they only change the size of the object and do not effect its operation, they do not help with the bug that it always floats to the top of the browser window.
    If it's not broke, don't fix it.


  8. #8

    Default

    Hi Chris
    Sorry I couldn't be of more help.
    But for what it's worth I have tested the placement of the gauge object and confirm what you are experiencing - the gauge always shows at the top of the mini browser window irrespective of the placement of the code to display the gauge.
    Would be worth filling in a bug report with a link to this thread.
    Regards
    Ian S.

  9. #9
    Join Date
    Dec 2011
    Location
    USA Florida Illinois
    Posts
    881
    Blog Entries
    1
     

    Default

    Quote Originally Posted by stokia01 View Post
    Hi Chris
    Sorry I couldn't be of more help.
    But for what it's worth I have tested the placement of the gauge object and confirm what you are experiencing - the gauge always shows at the top of the mini browser window irrespective of the placement of the code to display the gauge.
    Would be worth filling in a bug report with a link to this thread.
    Thanks for the help. I just submitted a help desk ticket Ticket ID #XWV-762-24410
    If it's not broke, don't fix it.


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •