Active_Display()
Syntax: _Active_Display(display_name, left, top, width, height, horizontal_disabled, vertical_disabled, scrollWidth, scrollHeight, Scroll_Listener_Function)
Purpose: Manages screen areas in your Lu C Studio app. It has the following uses:
Selecting Active Area: Determines where objects will be rendered (main screen or a scroll area).
Creating Display Groups: Allows you to create custom groups of objects that share size, position, and scrolling behaviors. This is useful for organizing complex interfaces.
Creating Scroll Areas: Lets you implement scrollable portions within your app.
Parameters:
display_name:
"main": Main scene area
"scroll": Standard scroll area
"_scroll_xxx": Creates a custom scroll area with name 'xxx'
"_group_xxx": Creates a custom display group with name 'xxx'
left, top, width, height: (Optional) Define the position and dimensions of custom scrolls or groups.
horizontal_disabled, vertical_disabled: (Optional) Control scrolling directions within custom scroll areas.
scrollWidth, scrollHeight: (Optional) Customize the scrollable content area within custom scroll areas.
Scroll_Listener_Function: (Optional) A function to handle scroll events within custom scroll areas.
Forced_a: (Optional) Restricts when the command can run for advanced conditional logic.
Create_Scroll()
Syntax: _Create_Scroll(Object_To_Background, Forced_a)
Purpose: A streamlined way to set up a standard scrolling layer. Optionally, can automatically add a background object.
Parameters:
Object_To_Background: (Optional) An image or object to serve as the background of the scroll area.
Forced_a: (Optional) Restricts when the command can run for advanced conditional logic.
Titles: Display_Blocking_Background(), Display_Blocking_Background2(), Display_Blocking_Light_Background()
Syntax: Respectively, these have the following syntax
_Display_Blocking_Background(temporary_blocking_image, textfields_match, RGB, Alpha)
_Display_Blocking_Background2(temporary_blocking_image, textfields_match, RGB, Alpha)
_Display_Blocking_Light_Background(temporary_blocking_image, textfields_match, RGB, Alpha)
Purpose: Create temporary overlays to block user input while actions complete (like loading). The differences between them are the level of opacity they generate:
Display_Blocking_Background: Standard blocking, typically darker.
Display_Blocking_Background2: Secondary blocking, perhaps for multiple overlays.
Display_Blocking_Light_Background: A subtle visual blocker.
Parameters:
temporary_blocking_image: (Required) Image to use for the background
textfields_match: (Optional) Names or wildcards to match text input fields that will become temporarily hidden.
RGB: (Optional) Color values if not providing an image.
Alpha: (Optional) Opacity level (0 to 1)
Display_Fps()
Syntax: _Display_Fps()
Purpose: A debugging function to overlay a simple frames-per-second display on your app.
Display_Items_List()
Syntax: _Display_Items_List()
Purpose: For debugging or analysis, this function prints a list of all currently loaded elements to the console.
Display_Popup_Dialog()
Syntax: _Display_Popup_Dialog(x, y, width, height, warning_image, blocking_image, textfields_match, title_fontname...)
Purpose: Creates a highly customizable informative popup dialog that blocks interaction with the rest of the screen. Useful for alerts, confirmations, etc.
Parameters: (There are a lot, providing flexibility in the popup's appearance)
x, y, width, height: Position and dimensions of the popup
warning_image, blocking_image: Image resources for decorations
textfields_match: Text input fields to temporarily hide
**title_fontname, title_fontsize, ... ** : Font and styling for different text elements
title, message_line1, message_line2: The text content of the popup
**button_fontname, button_fontsize, ... **: Styling for the button
button: The label for the popup's button
Flash_Screen()
Syntax: _Flash_Screen(mSecs_time, alpha)
Purpose: Creates a quick visual flash of the screen. Can be used to indicate something has happened to the user.
Parameters:
mSecs_time: (Optional) Duration of the flash in milliseconds. Defaults to 100ms.
alpha: (Optional) Transparency level of the flash. Defaults to 0.5.
Flying_Box()
Syntax: _Flying_Box(text_to_display, box_width, font_size, initial_x, initial_y, target_x, target_y, direction, text_RGB, back_RGB, Speed_Scale)
Purpose: Displays a dynamic, temporary popup box that moves across the screen. Great for brief notifications.
Parameters:
text_to_display: The text within the box.
box_width, font_size: Appearance of the box.
initial_x, initial_y, target_x, target_y: Start and end coordinates.
direction: "Right", "Left", "Up", "Down"
text_RGB, back_RGB: Colors of the text and box background.
Speed_Scale: Adjusts the speed of the animation.
Get_Display_IJ()
Syntax: _Get_Display_IJ()
Purpose: This is an internal function used by Lu C Studio to track the currently active screen area. Not typically used in everyday coding.
Get_Scroll_Left_Top() and Get_Scroll_XY()
Syntax:
_Get_Scroll_Left_Top(scroll_name)
_Get_Scroll_XY(scroll_name)
Purpose: Retrieve the current scroll position.
Parameters:
scroll_name: Necessary for custom scroll areas, omit for the standard "scroll".
Differences:
Get_Scroll_Left_Top()
provides the top-left corner position of
the viewport
within the scrollable content.
Get_Scroll_XY()
provides the X, Y position of the scrollable content
itself.
Inputbox() and Inputbox_Double()
Syntax
_Inputbox(Title, Content, Button_Function, x, y, Button, Default_Value, InputType)
_Inputbox_Double(Title, Content, Button_Function1, Button_Function2, x, y, Button1, Button2, Default_Value, InputType)
Purpose: Creates popup dialogs to get text input from the user.
Parameters:
Title, Content: Text elements of the popup
Button_Function (or Button_Function1/2): Functions to execute when buttons are clicked.
x, y, Button (or Button1/2): Appearance of the popup
Default_Value: Optional starting text
InputType: Keyboard type (e.g., "number", "email").
Differences:
Inputbox()
presents a single button.
Inputbox_Double()
provides two buttons for more choices.
Inputbox_Text()
Syntax: _Inputbox_Text()
Purpose:
Retrieves the text a user typed into the most recent Inputbox()
or Inputbox_Double()
dialog.
Move_Objects()
Syntax: _Move_Objects(Wildcard_Matching_Text, dx, dy)
Purpose: Moves a group of objects and adjusts their display order.
Parameters:
Wildcard_Matching_Text: A wildcard pattern to select the objects to move (e.g., "button_*")
dx, dy: Horizontal and vertical movement amounts.
Behavior:
Objects are first sorted alphabetically based on their name (after removing prefixes)
Objects are then moved by the specified (dx, dy) amount
They
are brought to the front of the display (_To_Front()
)
in order.
Msgbox()
Syntax: _Msgbox("Title for the Popup", "Content for the Popup", button1_caption, button2_caption, button3_caption, onComplete)
Purpose: Creates a standard popup dialog. Useful for messages, confirmations, etc.
Parameters:
Title, Content: Text elements of the popup
button1_caption, ... : Button labels. Up to three are supported.
onComplete:
(Optional) A function that is executed after a button is clicked.
You can use the event.index
value to know which button was pressed.
Msgbox_Button()
Syntax: _Msgbox_Button()
Purpose:
Retrieves the index (1, 2, or 3) of the button that was clicked to
close the most recent Msgbox()
.
Rate_Me_Implementation()
Syntax: _Rate_Me_Implementation(After_how_many_times, main_title, question_text, appStoreId, androidPackageName, function_to_execute_after_rate)
Purpose: Implements a "Rate Me" popup that prompts the user to rate your app after they've used it a certain number of times.
Parameters:
After_how_many_times: The frequency before showing the prompt.
main_title, question_text: Text for the popup dialog.
appStoreId: Your app's ID on the Apple App Store.
androidPackageName: Your app's package name on Google Play.
function_to_execute_after_rate: (Optional) A function to run after the rating process is complete.
Titles: Remove_Blocking_Background(), Remove_Blocking_Background2(), Remove_Blocking_Light_Background()
Syntax: Respectively, these have the following syntax
_Remove_Blocking_Background()
_Remove_Blocking_Background2()
_Remove_Blocking_Light_Background()
Purpose:
Remove the temporary blocking backgrounds created by their
corresponding Display_...
functions.
Remove_Scroll()
Syntax: _Remove_Scroll()
Purpose: Removes the standard scroll layer from your project.
Reload_Screen()
Syntax: _Reload_Screen()
Purpose: Reinitializes the current screen by reloading its content.
Titles: Scroll_... Functions
Scroll_Alpha() : Sets the transparency of the standard scroll layer.
Scroll_Display() : Smoothly scrolls to a specific position within a scroll layer.
Scroll_Height() : Sets the height of the standard scroll layer.
Scroll_Left_Top() : Changes the position of the viewport within a scroll layer.
Scroll_Visible() : Controls the visibility of the standard scroll layer.
Scroll_Width() : Sets the width of the standard scroll layer.
Scroll_XY_Transition() : Animates a smooth change in the position of a scroll layer.
Scroll_isLocked() : Enables or disables scrolling behavior in a scroll area.
Important:
Some
of these functions apply to custom
scroll areas created with _Create_Scroll()
.
In those cases, you need to provide the scroll_name
parameter.
For
the standard "scroll", omit the scroll_name
parameter.
Set_Activity_Indicator()
Syntax: _Set_Activity_Indicator(status)
Purpose: Displays or hides the platform's native busy indicator (the spinning wheel/circle). While it's visible, touch events may be blocked.
Parameters:
status: True to show the indicator, false to hide it.
Show_RateMe_Popup()
Syntax: _Show_RateMe_Popup(Application_name, Popup_Text, AppStore_ID, Android_Package_Name, function_to_execute_remind_me_later, function_to_execute_never_ask_again, function_to_execute_rate_now)
Purpose:
Creates a custom popup prompting the user to rate your app. Provides
more flexibility than the Rate_Me_Implementation()
.
Parameters:
Application_name, Popup_Text: Text elements of the popup
AppStore_ID, Android_Package_Name : Your app's identifiers.
function_to_execute_... : Functions that are run when the user interacts with the "Remind Me Later", "Never Ask Again", or "Rate Now" options.
Slide_Scenes()
Syntax: _Slide_Scenes(nValue)
Purpose: Animates a vertical slide transition of all scenes, including their child objects.
Parameters:
nValue: The amount (in pixels) to slide up or down. Can be positive or negative.
Titles: Window_Mode() and Get_Window_Mode()
Syntax:
_Window_Mode(Value)
_Get_Window_Mode()
Purpose: These functions work with desktop applications (macOS and Windows) to manage the window state.
Parameters (Window_Mode):
Supported values: "normal", "minimized", "maximized", "fullscreen".
Return
Value (Get_Window_Mode):
The
current window mode.
Focus_Keyboard()
Syntax: _Focus_Keyboard(objName)
Purpose: Gives keyboard input focus to the specified object (if it supports text input) and displays the keyboard.
Titles: Full_Fade... Functions
Full_FadeIn_Landscape() and Full_FadeIn_Portrait()
Full_FadeOut_Landscape() and Full_FadeOut_Portrait()
Syntax: These functions have the following syntax depending on the effect and orientation:
_Full_FadeIn_Landscape(delay_msecs, onComplete_function)
_Full_FadeIn_Portrait(delay_msecs, onComplete_function)
_Full_FadeOut_Landscape(delay_msecs, onComplete_function)
_Full_FadeOut_Portrait(delay_msecs, onComplete_function)
Purpose: Create smooth, full-screen fade-in or fade-out transitions. Useful for scene changes or dramatic effects.
Parameters
delay_msecs: Duration of the fade effect in milliseconds.
onComplete_function: (Optional) A function to execute once the fade has completed.
Close_Msgbox()
Syntax: _Close_Msgbox()
Purpose:
Programmatically closes the most recent Msgbox()
popup that was displayed.
Background_Color()
Syntax: _Background_Color(HTML_Color_or_R, G, B)
Purpose: Sets the background color of the screen.
Parameters:
HTML_Color_or_R: You have two options:
A color in HTML Hex format: e.g., "#FF0080"
The Red component of the color as a value between 0 and 255 (or 0.0 and 1.0).
G: The Green component of the color (0 to 255 or 0.0 to 1.0).
B: The Blue component of the color (0 to 255 or 0.0 to 1.0).
Important Notes:
Scroll
Areas:
Many of the commands we've discussed, especially regarding displays
and transitions, work in conjunction with the concept of scroll
areas created with _Create_Scroll()
.