-- Button class
-- Get name
Function OBJ: getname ()
End
-- Get width
Function OBJ: getwidth ()
End
-- Get height
Function OBJ: getheight ()
End
-- Disable enabling
Function OBJ: setenabled (true)
End
-- Get the current disabled and enabled status
Function OBJ: isenabled ()
End
-- Set the callback function when the touch starts.
[Email protected] {function} func callback function. This function accepts three parameters: user data (nil by default), screen coordinate X, and screen coordinate Y]
[Email protected] {arbitrary data} Arg user data. The default value is nil.
Function OBJ: setselectscriptfunc (func, ARG)
End
-- Set the callback function at the end of the touch.
[Email protected] {function} func callback function. This function accepts three parameters: user data (nil by default), screen coordinate X, and screen coordinate Y]
[Email protected] {arbitrary data} Arg user data. The default value is nil.
Function OBJ: setunselectscriptfunc (func, ARG)
End
-- Set the click callback function
[Email protected] {function} func callback function. This function accepts three parameters: user data (nil by default), screen coordinate X, and screen coordinate Y]
[Email protected] {arbitrary data} Arg user data. The default value is nil.
Function OBJ: setclickscriptfunc (func, ARG)
End
-- Set the default image
Function OBJ: setdefaskskin (URL)
End
-- Set the image for clicking
Function OBJ: setclickskin (URL)
End
-- Set the disabled Image
Function OBJ: setdisableskin (URL)
End
-- Set font information
Function OBJ: setfontinfo (fontname, fontsize)
End
-- Set text content
Function OBJ: settextstring (STR)
End
-- Set color
Function OBJ: setcolorhex (colorstr)
End
-- ===================================================== ========================================================== ==========================================================
-- Check box class
-- Set the selected Image
Function OBJ: setselectskin (URL)
End
-- Whether the check box is selected
Function OBJ: ischecked ()
End
-- Set the current selected status
Function OBJ: setchecked (FLAG)
End
-- ===================================================== ========================================================== ========================================================== =
-- Image
-- Set whether to move
Function OBJ: setneeddomove (FLAG)
End
-- Set the callback function when sliding
Function OBJ: setonmovescriptfunc (func, ARG)
End
-- Set image resources
Function OBJ: setpicturebyurl (URL)
End
-- Set the image scaling ratio
Function OBJ: setpicturescale (scale)
End
-- Get the image scaling ratio
Function OBJ: getpicturescale ()
End
-- ===================================================== ========================================================== ========================================================== =
-- Highlight Area
-- Set the highlighted area information. Note: You have set the width and height of this control.
[Email protected] {number} bright_width highlight area width
[Email protected] {number} bright_height highlight area height
[Email protected] {number} bright_posx location X
[Email protected] {number} bright_posy location y
[Email protected] {number} backopacity mask transparency. The default value is 0.5f (between 0 and 1.0, and 0 indicates full transparency)
Function OBJ: setbrightinfo (bright_width, bright_height, bright_posx, bright_posy, backopacity)
End
-- Set the highlighted area based on the specified Image
[Email protected] {string} URL mask image URL
[Email protected] {number} bright_posx location X
[Email protected] {number} bright_posy location y
[Email protected] {number} backopacity mask transparency. The default value is 0.5f (between 0 and 1.0, and 0 indicates full transparency)
Function OBJ: setbrightbyurl (URL, bright_posx, bright_posy, backopacity)
End
-- ===================================================== ========================================================== ========================================================== =
-- Progress bar
-- Set the picture of the progress bar
Function OBJ: setprogressskin (URL)
End
-- Set the progress bar background
Function OBJ: setbackground (URL)
End
-- Set margins
Function OBJ: setmargin (margin_left, margin_right, margin_top, margin_bottom)
End
-- Set vertical
Function OBJ: setvertical (vertical)
End
-- Set the current progress bar value
Function OBJ: setvalue (value)
End
-- Get the current progress bar value
Function OBJ: getvalue ()
End
-- Change the progress value at the specified time (when this interface is called, The Progress value changes immediately, and then only the progress animation effect)
[Email protected] {number} duration, in seconds
[Email protected] {number} from Progress starting from 0-100
[Email protected] {number} to progress end value, 0-100
[Email protected] {function} callback function after the func animation is played
Function OBJ: progressfromto (duration, from, to, func)
End
-- Get the current value of the progress of the current change (display the corresponding value)
[Email protected] {number} returns the current real-time progress (0-100)
Function OBJ: getnowprogressvalue ()
End
-- ===================================================== ========================================================== ==============================================
-- Text box
-- Set Vertical Alignment
Function OBJ: setverticalalignment (align)
End
-- Set horizontal alignment
Function OBJ: sethorizontalalignment (align)
End
-- Get Text Content
Function OBJ: gettextstring ()
End
-- Get the height of all texts
Function OBJ: getalltextheight ()
End
-- ===================================================== ========================================================== ========================================================== =
-- HTML Rich Text Box class
-- Set row spacing
Function OBJ: setleading (Leading)
End
-- Set the text area size
Function OBJ: setsize ()
End
-- Append text to return the number of lines that are added due to this text
[Email protected] {string} text the HTML Format Text to be appended
[Email protected] {number} returns the number of lines (0-N) added to the additional text)
Function OBJ: appendtextstring (text)
End
-- Remove the specified content from the beginning of the original content
[Email protected] {string} deletetext content to be deleted from the original text
[Email protected] {Boolean} is successfully removed. True is returned; false is returned if an error occurs.
Function OBJ: removetextfrombegin (deletetext)
End
-- Remove the specified number of rows at the top
[Email protected] {number} num quantity to be removed
[Email protected] {Boolean} is successfully removed. True is returned; false is returned if an error occurs.
Function OBJ: removetopline (Num)
End
-- Get the number of rows
Function OBJ: getlinenum ()
End
-- ===================================================== ========================================================== ========================================================== ==============
-- Input box
-- Password?
[Email protected] {Boolean}
Function OBJ: ispassword ()
End
-- Set to password type
[Email protected] {Boolean} ispassword is true, indicating the password
Function OBJ: setispassword (ispassword)
End
-- Set the display text when no input content exists.
[Email protected] {string} text
Function OBJ: setplaceholder (text)
End
-- Sets the callback function when the Enter key is pressed.
[Email protected] {function} func receives the callback function when you press the Enter key. This function accepts one parameter [Control name]
Function OBJ: setenterscriptfunc (func)
End
-- Enable Input Method
Function OBJ: openime ()
End
-- Disable the Input Method
Function OBJ: closeime ()
End
-- Set the cursor color
[Email protected] {string} colorstr color string
Function OBJ: setcursorcolorhex (colorstr)
End
-- ===================================================== ========================================================== ======================================
-- Rolling text
-- Get whether the current slide is allowed
[Email protected] {Boolean}
Function OBJ: getcanmove ()
End
-- Set whether the current slide is allowed
[Email protected] {Boolean} moveflag slide flag
Function OBJ: setcanmove (moveflag)
End
-- Slide to the top (leftmost for horizontal mode)
Function OBJ: scrolltotop ()
End
-- Slide to the bottom (rightmost relative to the horizontal direction)
Function OBJ: scrolltobottom ()
End
-- ===================================================== ======================
-- List class
-- Set row spacing
[Email protected] {number} lineboundary row spacing
Function OBJ: setlineboundary (lineboundary)
End
-- Get row spacing
[Email protected] {number} return returns the row spacing
Function OBJ: getlineboundary ()
End
-- Set the row background
[Email protected] {string} URL resource URL
Function OBJ: setlineitembackground (URL)
End
-- Set the row image selected
[Email protected] {string} URL resource URL
Function OBJ: setlineitemselect (URL)
End
-- Get the Row Height
Function OBJ: getlineheight ()
End
-- Get the display width (margin subtracted)
Function OBJ: getshowwidth ()
End
-- Get the display height (margin subtracted)
Function OBJ: getshowheight ()
End
-- Whether it is in vertical mode
[Email protected] {Boolean}
Function OBJ: isvertical ()
End
--\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\
-- Obtain whether the sliding alignment function is enabled.
-- Return {Boolean }\
Function OBJ: isscrollalign ()
End
-- Enable/disable sliding alignment
[Email protected] {Boolean} flag
[Email protected] {Boolean} returns the previous settings
Function OBJ: setscrollalign (FLAG)
End
-- Can I continue to move to the top (left for horizontal mode)
[Email protected] {Boolean}
Function OBJ: canmovetotop ()
End
-- Can I continue to move to the bottom (for horizontal mode, to the right)
Function OBJ: canmovetobottom ()
End
-- Sets the rate of sustained deceleration when the system slides automatically.
[Email protected] {number} rate. If it is less than 0, the system continues to slow down. If it is greater than 0, the system continues to accelerate. If it is equal to 0, the speed remains unchanged.
Function OBJ: setscrolldeceleraterate (Rate)
End
-- Get the rate of sustained deceleration when the system slides automatically
[Email protected] {number} returns the rate of sustained deceleration.
Function OBJ: getscrolldeceleraterate ()
End
-- Set the time to move to the specified position when automatic sliding is completed (for example, the rebound After sliding ends)
[Email protected] {number} time specifies the time, in seconds
Function OBJ: setscrollbounceduration (time)
End
-- Obtain how long it will take to move to the specified position after automatic sliding.
[Email protected] {number} returned mobile time, in seconds
Function OBJ: getscrollbounceduration ()
End
-- Set the sliding cross-border ratio (based on the height or width)
[Email protected] {number} rate: Set the cross-border rate when sliding
Function OBJ: setscrolllimitinsetratio (Rate)
End
-- Get the sliding out-of-boundary Ratio
[Email protected] {number} returns the sliding out-of-bounds ratio \
Function OBJ: getscrolllimitinsetratio ()
End
-- Move the content container to the specified location within the specified time
[Email protected] {number} time, in seconds
[Email protected] {number} posx coordinate X
[Email protected] {number} posy coordinate Y
Function OBJ: scrolltotargetpos (time, posx, Posy)
End
-- Get whether the current slide automatically
[Email protected] {Boolean} returns true If Automatic slide is being performed. Otherwise, false is returned.
Function OBJ: isautomove ()
End
-- Set the item judgment difference of alignment Processing
[Email protected] {number} alignvalue
Function OBJ: setalignvalue (alignvalue)
End
--\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
-- Find the control with the specified name in the specified row
Function OBJ: findlinecontrol (lineindex, controlname)
End
-- Obtain the currently selected row number
[Email protected] {number} row number
Function OBJ: getselectlineindex ()
End
-- Create a new row and return the row number
Function OBJ: createnewline ()
End
-- Get the number of rows
Number of [email protected] {number} rows
Function OBJ: getlinenum ()
End
-- Get the specified row object
Function OBJ: getlineitem (lineindex)
End
-- Sets the user behavior of the selected specified row, and does not trigger related events.
Function OBJ: setselectline (lineindex) (used for this interface)
End
-- Check whether the specified row is in the displayed area
[Email protected] {number} lineidx row Index
[Email protected] {Boolean} if this row is in the display area, true is returned; otherwise, false is returned.
Function OBJ: checklineinshowarea (lineidx)
End
-- Remove the row of the specified index
Function OBJ: removeitembyindex (INDEX)
End
-- Make the list contain a specified number of rows
Function OBJ: setforremain (Num)
End
-- Clear all rows
Function OBJ: clearall ()
End
-- Set the callback function for the row selected event
[Email protected] handler callback function, accepting 1 parameter [the row number to be clicked (valid row number from 0 to maxnum-1 )]
Function OBJ: setlineselectscriptfunc (func)
End
-- Set the callback function when sliding
[Email protected] {function} func callback function when sliding. This function accepts five parameters [user data (nil by default) the current X coordinate, current y coordinate, last X coordinate, and last y coordinate of the content area on the screen]
[Email protected] {arbitrary data} Arg user data. The default value is nil.
Function OBJ: setonmovescriptfunc ()
End
-- Set the callback function when automatic sliding stops.
[Email protected] {function} func callback function, which does not accept parameters
Function OBJ: setautomovestopscriptfunc (func)
End
-- ===================================================== ======================================
-- Panel Type
-- Add controls to the Panel
[Email protected] {luibase} OBJ control object
[Email protected] {Boolean} is added successfully. True is returned. Otherwise, false is returned.
Function OBJ: addcontrol (OBJ)
End
-- Find the control with the specified name
Function OBJ: findcontrol (controlname)
End
-- Remove the specified control from the panel
[Email protected] {luibase} uiobj control object
Function OBJ: removecontrol (uiobj)
End
-- Remove the control with the specified name from the panel
[Email protected] {string} controlname Control name
Function OBJ: removecontrolbyname (controlname)
End
-- Display/hide panel
Function OBJ: setvisible (FLAG)
End
-- Set the callback function for hiding
[Email protected] {function} func callback function when the Panel is hidden. This function accepts one parameter [Panel name]
Function OBJ: sethideeventscriptfunc (func)
End
-- Hide/display tags with the specified name
[Email protected] {string} labelname Tag Name
[Email protected] {Boolean} visible display/hide
Function OBJ: visablelabelpage (labelname, visible)
End
-- ===================================================== ========================================================== ========================
-- UI manager
-- Initialize the UI manager
[Email protected] {eventlayer} rootlayer root event Layer
Function OBJ: Init (rootlayer)
End
-- Query the Panel by Panel name
[Email protected] {string} panelname panel name
[Email protected] if it is found, the Panel object {lpanel} is returned; otherwise, Nil is returned.
Function OBJ: findpanelbyename (panelname)
End
-- Query controls by Area Name and Control name
[Email protected] {string} panelname panel name
[Email protected] {string} controlname Control name
[Email protected] If the control is found, the control object {luibase} is returned; otherwise, the NIL is returned.
Function OBJ: findcontrolbyname (panelname, controlname)
End
-- Set the callback function when the Panel is displayed. This function accepts one parameter [Panel name]
[Email protected] {function} func script callback function
Function OBJ: setonpanelshowscriptfunc (func)
End
-- Sets the callback function when the Panel is hidden. This function accepts one parameter [Panel name]
[Email protected] {function} func script callback function
Function OBJ: setonpanelhidescriptfunc (func)
End
-- Create a control using a template and set its name
[Email protected] {string} panel name of the panelname Template
[Email protected] {string} controlname template Control name
[Email protected] {string} setcontrolname: the name of the control to be created. The name of the control to be created is set to this value.
[Email protected] {luibase}: the control object is returned. If the control object fails to be created, Nil is returned.
Function OBJ: createcontrolfromtemplate (panelname, controlname, setcontrolname)
End
-- Create a panel using a template and set the Panel name (other control objects belonging to the panel will be automatically created)
[Email protected] {string} panel name of the panelname Template
[Email protected] {string} setpanelname indicates the name of the panel to be created. The name of the created panel is set to this value.
[Email protected] {luibase}: The Panel object is returned. If it fails, Nil is returned.
Function OBJ: createpanelformtemplate (panelname, setpanelname)
End
-- Attach a panel
[Email protected] {string} uifile UI file path
[Email protected] {function} loadend_do callback function after loading is complete
[Email protected] "true" is returned for successful loading; otherwise, "false" is returned.
Function OBJ: loadpanel (uifile, loadend_do)
End
-- Get the moving judgment Value
[Email protected] {number} returns the previous moving judgment Value
Function OBJ: getmovecomparevalue ()
End
-- Set the moving determination value (when the Distance Difference Between the touch start and the touch movement event is greater than this value, it is deemed to be moving)
[Email protected] {number} movedelay
Function OBJ: setmovecomparevalue (movedelay)
End
-- Set the hook callback function at the start of the touch, and perform hook processing (for example, when a panel is opened, you only need to click anywhere to close this panel)
[Email protected] {function} func callback function when the touch starts, this function accepts three parameters: Panel name of the control at the start of touch, control name at the start of touch, control object]
Function OBJ: setselecthookscriptfunc (func)
End
-- Set the hook callback function at the end of the touch, and perform hook processing.
[Email protected] {function} func callback function when the touch ends, this function accepts three parameters: Panel name of the control when the touch ends, control name after the touch ends, and control object]
Function OBJ: setunselectscriptfunc (func)
End
-- Cancel the hook callback function at the start of the touch.
Function OBJ: unsetselecthookscrptfunc ()
End
-- Set the callback function before the click event occurs.
[Email protected] {function} FUNC: the callback function when a UI control click event occurs, this function accepts three parameters: Panel name of the clicked control, the name of the clicked control, and the control object]
Function OBJ: setclickhookscriptfunc (func)
End
-- Cancels the callback function of the click event.
Function OBJ: unsetclickhookscriptfunc ()
End
-- Disable/enable all panel responses
[Email protected] {Boolean} enable/disable
Function OBJ: setenableallvisible (enable)
End
-- Remove the panel with the specified name from the UI manager
[Email protected] {string} panelname panel name
-- Add the panel to the UI manager.
[Email protected] {lpanel} panel object
[Email protected] {Boolean} returns true, indicating that the addition is successful.
Function OBJ: addpanel (panel)
End
-- Remove the specified panel from the UI manager
[Email protected] {lpanel} panel object
Function OBJ: removepanel (panel)
End
-- Remove the panel with the specified name from the UI manager
[Email protected] {string} panelname panel name
Function OBJ: removepanelbyname (panelname)
End