1. This forum is for bug reporting of current Player Test Environment (QA Server) issues ONLY.
    Be sure to follow the format below, it will help us out greatly in responding. If you do not, your report may not be entered into the system.

    Read BEFORE submitting your first bug: Reporting Bugsā€¦ QA 101 Document
    • Search for your bug in all likely categories before posting in order to avoid duplicate reports.
    • Be sure to provide details of what the issue is and how to re-produce it, but keep your bug report factual.
    • Only report oneissue per thread, additional issues may be ignored.
    • Do not add, include or modify the thread moderator tags in the title of the thread. (indicators in the [])
    • Reply to an existing thread if you have additional information for the reported bug.
      Do not use this forum for commentary, your post will be deleted and you may be moderated, suspended or banned if the activity continues.
    • There is no need to submit crash logs. Crash data we require is automatically logged.
    NOTE: Important information including your location and system specs are automatically put into your clipboard when using /devbug in the game (DO NOT add additional system specs unless requested). When starting your post, just use <CTRL>-V to insert the data and fill in the entries with no data.

    Please include Screenshots if possible. Images can be saved on our SotA Discord Server here

    If the clipboard does not work, use and fill in this Bug Report Template:
    1. Title:
    2. Reproducible?
    3. Blocker?
    4. Details:
    5. Steps to Reproduce:
    6. User Specs: (RAM, CPU, GPU and Operating System only)

[Fixed] label zindex issue when overlaying on textures

Discussion in 'Lua API' started by Tirrag, Oct 9, 2021.

Thread Status:
Not open for further replies.
  1. Tirrag

    Tirrag Avatar

    Messages:
    854
    Likes Received:
    1,824
    Trophy Points:
    93
    Location:
    Iowa, USA
    10/09/2021 09:25
    Title: Label zindex issue when overlaying on textures
    Reproduction Rate: 100%
    Blocker? No
    Details: When overlaying a label on a texture, the text is always behind the texture despite the draw order. Labels drawn after the texture should show on top of the texture. This just started happening with the latest round of patches.
    Steps to Reproduce: Draw a texture and two labels. The two labels should be drawn in the same space as the texture. Draw one label before and one label after the texture draw. The label drawn before is correctly behind the texture. The label drawn after the texture though is also behind the texture.
    User Specs:
    OS: Windows 10 (10.0.0) 64bit
    CPU: Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz (4) System RAM: 16295
    GPU: NVIDIA GeForce GTX 1050 GPU RAM: 1977
    SotA.QA.Win.64.1265.Date.10.12.21
    Area: POT_forest_metropolis_02_template/Maiden's Blush
    Area Display Name: Maiden's Blush
    Loc: (-255.9, 44.0, -193.5)
    Debug: UE9UX2ZvcmVzdF9tZXRyb3BvbGlzXzAyX3RlbXBsYXRlfE1haWRlbidzIEJsdXNofCgtMjU1Ljg2MywgNDQuMDAxLCAtMTkzLjQ1Nyl8KDAsIDAuMzY5LCAwLCAtMC45Myl8LTQzLjI2MDMxfDcuMjk2MjA4fDA=

    [​IMG]

    Code:
    local tex = nil
    local client_width = 0
    local client_height = 0
    function ShroudOnStart()
        tex = ShroudLoadTexture("window-background.png", true)
        client_width = ShroudGetScreenX()
        client_height = ShroudGetScreenY()
    end
    function ShroudOnConsoleInput(type, src, msg) end
    function ShroudOnGUI()
        ShroudGUILabel(client_width/2 - 50 , client_height/2 - 100, 200, 50, "<size=20>test of behind text</size>")
        ShroudDrawTexture(client_width/2 - 50 , client_height/2 - 100, 200, 200, tex)
        ShroudGUILabel(client_width/2 - 50 , client_height/2 + 50, 200, 50, "<size=20>test of in-front text</size>")
    end
    function ShroudOnUpdate()
        ShroudGUIText( client_width/2 - 50 , client_height/2 + 50, 250, 100, "<color=red>HOWDY DUDE</color>", 32)
        ShroudGUIText( client_width/2 - 40 , client_height/2 + 50, 250, 100, "<color=yellow>HOWDY DUDE</color>", 32)
    end
    
     
    Last edited: Oct 13, 2021
    FrostII likes this.
  2. Tirrag

    Tirrag Avatar

    Messages:
    854
    Likes Received:
    1,824
    Trophy Points:
    93
    Location:
    Iowa, USA
    just a note that in the new QA version this is still an issue. also of note is that the new ShroudGUIText() function doesnt really have a way to control zindex either when mixing with the existing gui functions. it draws on top of the ShroudGUILabel() text but under the ShroudDrawTexture(). it does appear to draw in proper sequence within onupdate so maybe if all the gui functions become onupdate functions then its a non-issue.

    im excited for the new GUI functions just want to make sure we can sequence all the draw types so we can have proper zindexing and also want to ensure the old calls work as they did. as of right now any mod that overlayed text on images for a background have the image on top of the text.

    NOTE: i updated the sample code and image i provided to include some testing with the new ShroudGUIText call.
     
    FrostII likes this.
  3. Tirrag

    Tirrag Avatar

    Messages:
    854
    Likes Received:
    1,824
    Trophy Points:
    93
    Location:
    Iowa, USA
    this appears to be resolved with the latest QA build. thank you!
     
    Alley Oop likes this.
Thread Status:
Not open for further replies.