So topic tell you about this
To use library you should have this in your code first
local BloxUI = require(13133329143)
this is function list with document
.
- media_query_min(query: table, func: function): void
local exampleQuery = {
["width"] = 1300, -- pixel unit
["height"] = 1000 -- pixel unit
} -- you don't need to set every value like this table
local exampleFunction = function() print("Hello") end
BloxUI:media_query_min(exampleQuery, exampleFunction)
-- If user screen width is less than 1300(px) and screen height lass than 1000(px)
-- It will print "Hello"
.
- media_query_max(query: table, func: function): void
Same asmedia_query_min()
but condition is equal or more than
.
- get_viewport_height(percent: number/nil): number
local vh = BloxUI:get_viewport_height(50) -- You can just use function with out parameter it will automatic return 100 percent
.
- get_viewport_width(percent: number/nil): number
local vw = BloxUI:get_viewport_width(50) -- You can just use function with out parameter it will automatic return 100 percent
.
This is little tutorial to make responsive UI
- Use scale property for GUI size/position