Jump to content

Error/infowindow-resource


Puma

Recommended Posts

Posted (edited)

Something small. I always put the custom errorwindows in my scripts, but it's far easier to have a general resource that provides a function and I thought that there could be people out there who could make good use of it, so here it is.

You can set the colors for both error- and infowindow of the top-text, general text, top-background and text-background in its settings (rgb and alpha for backgrounds) and the window's size depends on the text that's put into it. There's an option to disable the window with a click anywhere on the screen or let it disappear after a set time-interval. Plenty of options, so it suits everything.

Example:

Errorwindow.png

Wiki-page:

https://wiki.multitheftauto.com/wiki/Error/info-window

Download:

https://community.multitheftauto.com/ind ... ls&id=4923

Hope it'll be useful.

Edit: Updated it, added info-window.

Edited by Guest
Posted

Small update. Added infowindow, re-uploaded it and also updated the wiki-page. On the screenshot you can see the info-window and how it looks when you change the colors. You can set the colors for info- and errorwindow each.

Posted

perfect.!

I'll remove chatbox and ill put this system :D

edit: hey man i have a problem. I dont know what happen.

I want show the window on the bottom of screen

and i did this

dxDrawText ( topText, topX, topY, topX+winW, topY+topH, toptc, topScale, topFont, "center", "bottom", false, false, true ) 
        local x, y = topX+textBorder, topY+topH+textBorder 
        for i, string in pairs ( textTable ) do 
            dxDrawText ( string, x, y, x+winW-2*textBorder, y+lineHeight, tc, textScale, textFont, textAlignX, "bottom", false, false, true ) 
            y = y + lineHeight + lineSpaceY 
        end 
         

just i change the alignY dont dont work

if u can helpme please

Posted

You need to alter line 118, change 'windowRelativeY'. The two numbers (0.5, 0.5) define the relative position of the window on the screen, the second one is the Y.

Posted

Nice resource, you saved me from having to make this myself. If it is ok for you i will use this in my project(give you credits offc)...

Posted
Nice resource, you saved me from having to make this myself. If it is ok for you i will use this in my project(give you credits offc)...

Sure! That is the purpose of it :).

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...