Coder Social home page Coder Social logo

mtasa-nativeui's Introduction

NativeUI

Screen:

Menu Image

Client Functions

Menu

createNativeUI

Description:

This function will create a menu

Parameters:

  • string Menu Title
  • string Menu Caption or bool false
  • string Image Path Standard Picture Paths "assets/defaultbg.png" and "assets/24.png"
  • color Menu color(if image passed false)
  • color Title color
  • string Position that the menu will be Possible positions right, left
  • bool Show counter
  • int Quantity of items per page Recommended 10, Maximum 10
  • string Position that the menu title will be Possible positions right, left, center

clearNativeUI

Description: This function will remove all menu items.

Parameters:

This function has no parameters

removeNativeItem

Description: This function will remove the item from the specified id.

Parameters:

  • int Item ID

removeNativeUI

Description: This function will remove the menu.

Parameters:

This function has no parameters

Button

addNativeButton

Description: This function will create a button

Parameters:

  • string Button Title
  • color Button title color
  • string Button icon Possible icons accept, ammo, armour, art, barber, clothing

setNativeButtonIcon

Description: This function will set the icon of the specified button.

Parameters:

  • int Button ID
  • string Button icon Possible icons accept, ammo, armour, art, barber, clothing

removeNativeButtonIcon

Description: This function will remove the icon from the specified button.

Parameters:

  • int Button ID

Checkbox

addNativeCheckBox

Description: This function will create a checkbox

Parameters:

  • string Checkbox Title
  • color Checkbox Title Color
  • bool Set whether the check box is selected or cleared by default.

nativeSetCheckBoxSelection

Description: This function will set the tick box to be checked or unchecked.

Parameters:

  • int Checkbox ID
  • bool Checked or unchecked

nativeGetCheckBoxSelection

Description: This function returns whether the check box is selected or not.

Parameters:

  • int Checkbox ID

Switch

addNativeSwitch

Description: This function will create a switch

Parameters:

  • string Switch Title
  • table A table with switch values
  • color Switch title color

getSwitchText

Description: This function will return the selected switch value.

Parameters:

  • int Switch ID

setNativeSwitchSelection

Description: This function will set the value of the switch.

Parameters:

  • Switch ID
  • int/string Switch value This value must have in the table when creating the switch

Client Events

Button

onClientAcceptButton

Description: This event is triggered when the player presses the "enter" key on any button.

addEventHandler("onClientAcceptButton", getRootElement(), function(id, text)

	print(id, text)

end)

Switch

onClientAcceptSwitch

Description:
This event is triggered when the player presses the “enter” key on any switch.

addEventHandler("onClientAcceptSwitch", getRootElement(), function(id, value)
    print(value)
end)

onClientChangeSwitch

Description:
This event is triggered every time the switch value changes

addEventHandler("onClientChangeSwitch", getRootElement(), function(id, value)
    print(value)
end)

CheckBox

onClientCheckBoxChange

Description:
This event is triggered every time the check box is checked or unchecked.

addEventHandler("onClientCheckBoxChange", getRootElement(), function(id, checked)
    print(checked)
end)

mtasa-nativeui's People

Contributors

allerek avatar haxardous avatar muurilo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.