Jump to content

[Help] Custom button does not show?

Recommended Posts

My code (I saw from other post at forum and edited)


AddClassPostConstruct("widgets/statusdisplays", function(self)
    local rules = self:AddChild(ImageButton("images/scorebutton.xml", "scorebutton.tex"))
    local imgrules = self:AddChild(Image("images/rules.xml", "rules.tex"))
    rules:SetScale(0.5, 0.5, 0.5)
        if imgrules.shown then
    rules:SetPosition(-1000, 150, 0)
    imgrules:SetPosition(-600, -200, 0)

Am I wrong? I want to add show buttons like inspect self button, how should I choose widgets (statusdisplays or controls or inventorybar ...)? Thank you.



Edited by thai6070
Link to comment
Share on other sites

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

  • Create New...