Giter Site home page Giter Site logo

jlib's Introduction

jLib: Library to make coding with ESX more easy

Features

  • UUID's
  • RageUI integrated 0MS closed
  • Utils (KeyboardInput, DrawText3D etc...)
  • Client Side player (Auto updated, replacing ESX.PlayerData)
  • Events system (Replacing RegisterNetEvent etc...)
  • Many others things...

Usage

-Import the lib in your resource:

--In Your fxmanifest (At the top)
shared_scripts {
	"@jLib/lang.lua",
	"@jLib/import.lua"
}

RageUI Preview

-RageUI:

local main = RageUI.CreateMenu("ExampleMenu", "This is an example menu");
local sub = RageUI.CreateSubMenu(main, "ExampleSubMenu", "This is an example submenu");

main:isVisible(function(items)

    items:Separator("This is a separator");

    items:Button("My button #1", "Example description", {LeftBadge = RageUI.BadgeStyle.Star}, true,{
        onSelected = function()
            print("Selected");
        end
    }, sub);

    items:Button("My button #2", nil, {LeftBadge = RageUI.BadgeStyle.Star}, true,{
        onSelected = function()
            print("Selected");
        end
    });

    items:Button("My button #3", nil, {LeftBadge = RageUI.BadgeStyle.Star, RightBadge = RageUI.BadgeStyle.Star}, true,{
        onSelected = function()
            print("Selected");
        end
    });

    items:Button("My button #4", nil, {LeftBadge = RageUI.BadgeStyle.Star, RightLabel = "Example rightlabel"}, true,{
        onSelected = function()
            print("Selected");
        end
    });
end);

local list1 = 1;
local list2 = 1;
local checked = false;
sub:isVisible(function(items)

    items:Button("My button #1", nil, {LeftBadge = RageUI.BadgeStyle.Star}, true,{
        onSelected = function()
            print("Selected");
        end
    });

    items:List("My List #1", { "Example Index #1", "Example Index #2", "Example Index #3" }, list1, nil, {LeftBadge = RageUI.BadgeStyle.Star, RightBadge = RageUI.BadgeStyle.Star}, true, {
        onListChange = function(Index, Item)
            print(Index, Item);
            list1 = Index;
        end,
        onSelected = function()
            print(list1)
            print("Selected");
        end
    });

    items:List("My List #2", { "Example Index #1", "Example Index #2", "Example Index #3" }, list2, nil, {LeftBadge = RageUI.BadgeStyle.Star}, true, {
        onListChange = function(Index, Item)
            print(Index, Item);
            list2 = Index;
        end,
        onSelected = function()
            print(list2);
            print("Selected");
        end
    });

    items:Checkbox("My checkbox", nil, checked, {LeftBadge = RageUI.BadgeStyle.Star}, {
        onSelected = function(Checked)
            checked = Checked;
        end,
        onChecked = function()
            print("Selected");
        end,
        onUnChecked = function()
            print("Unselected");
        end,
    });
end);

RegisterCommand("openex", function()
    main:toggle();
end);

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.