[F/OS] Texture Pack: Add Texture to Your Components

CustomButtonTexture

An extension to apply textures, animations, and customize buttons in MIT App Inventor.

Summary

Here is a brief summary of the extensions you provided:

  1. CustomProgressBar:

    • Creates customizable progress bars with adaptive colors, textures, rounded corners, and adjustable progress.
  2. CustomButtonTexture:

    • Applies textures and animations (like scale and fade effects) to buttons, customizes font size, and text alignment.
  3. CustomContainerTexture:

    • Adds textures, rounded corners, and border settings (width and color) to container components without disrupting child elements.
  4. CustomLabelTexture:

    • Customizes labels by applying textures to their background and text, adjusts font size, centers text, and adds text animations.
  5. CustomTextBoxTexture:

    • Enhances text boxes with background and text textures, centers the text, adjusts font size, and supports text animations.

Each extension provides a specific set of visual and interactive customizations for its respective component in the MIT App Inventor environment.

Methods:

ApplyTexture

ApplyTextureBlock

Applies a texture from the assets to the specified button.

Parameter Type
buttonComponent component
texturePath text

ApplyTextTexture

ApplyTextTextureBlock

Applies a texture to the button text from the assets.

Parameter Type
buttonComponent component
texturePath text

ResetTexture

ResetTextureBlock

Resets the button to its default background.

Parameter Type
buttonComponent component

FontSize

FontSizeBlock

Sets the font size of the button text.

Parameter Type
buttonComponent component
fontSize number

ApplyTouchEffect

ApplyTouchEffectBlock

Applies a touch effect to the button.

Parameter Type
buttonComponent component
effect text

Helper:

SCALE

Option for SCALE
SCALEBlock

Returns: Scale
Deprecated: false

FADE

Option for FADE
FADEBlock

Returns: Fade
Deprecated: false

CustomContainerTexture

An extension to apply textures, customize borders, and round corners for containers in MIT App Inventor without affecting their children components.

Methods:

ApplyTexture

ApplyTextureBlock (1)

Applies a texture and optional rounded corners to the specified container without affecting its children components.

Parameter Type
containerComponent component
texturePath text
cornerRadius number
borderWidth number
borderColor number

SetPadding

SetPaddingBlock

Sets the padding of the container to ensure the visibility of its children components.

Parameter Type
containerComponent component
left number
top number
right number
bottom number

GetChildCount

GetChildCountBlock

Returns the number of child components inside the container.

Parameter Type
containerComponent component

Return Type: number

SetBackgroundColor

SetBackgroundColorBlock

Sets the background color of the container to improve visibility.

Parameter Type
containerComponent component
color number

CustomLabelTexture

An extension to apply textures, animations, and customize labels in MIT App Inventor.

Methods:

ApplyTexture

ApplyTextureBlock (2)

Applies a texture from the assets to the specified label.

Parameter Type
labelComponent component
texturePath text

ApplyTextTexture

ApplyTextTextureBlock (1)

Applies a texture to the label text from the assets.

Parameter Type
labelComponent component
texturePath text

SetFontSize

SetFontSizeBlock

Sets the font size of the label text.

Parameter Type
labelComponent component
fontSize number

CenterText

CenterTextBlock

Centers the text within the label.

Parameter Type
labelComponent component

ApplyTextEffect

ApplyTextEffectBlock

Applies an animation effect to the label text.

Parameter Type
labelComponent component
effect text

CustomProgressBar

An extension to create a customizable linear progress bar with adaptive colors and textures.

Methods:

CreateLinearProgressBar

CreateLinearProgressBarBlock

Creates a progress bar with the same dimensions as the given component.

Parameter Type
component component

ProgressTexture

ProgressTextureBlock

Sets a texture for the progress bar from the assets.

Parameter Type
texturePath text

BackgroundTexture

BackgroundTextureBlock

Sets a texture for the background of the progress bar from the assets.

Parameter Type
texturePath text

Progress

ProgressBlock

Sets the progress value (0-100).

Parameter Type
progress number

Properties:

ProgressColor

ProgressColorBlock

Sets the color of the progress bar. Accepts integers only.

BackgroundColor

BackgroundColorBlock

Sets the background color of the progress bar. Accepts integers only.

CornerRadius

CornerRadiusBlock

Sets the corner radius of the progress bar.

GetProgress

Gets the current progress value.

CustomTextBoxTexture

An extension to apply textures, animations, and customize TextBox in MIT App Inventor.

Methods:

ApplyTexture

ApplyTextureBlock

Applies a texture from the assets to the specified TextBox.

Parameter Type
textBoxComponent component
texturePath text

SetFontSize

SetFontSizeBlock (1)

Sets the font size of the TextBox text.

Parameter Type
textBoxComponent component
fontSize number

CenterText

CenterTextBlock (1)

Centers the text within the TextBox.

Parameter Type
textBoxComponent component

ApplyTextEffect

ApplyTextEffectBlock (1)

Applies an animation effect to the TextBox text.

Parameter Type
textBoxComponent component
effect text

ApplyTextTexture

ApplyTextTextureBlock

Applies a texture to the TextBox text from the assets.

Parameter Type
textBoxComponent component
texturePath text

This documentation was generated using Akshat Developer's Documentation Generator.


Demo

Demo 1:


Demo 2:

Files

AIX By Fast : com.bosonshiggs.texturepack.aix (20.0 KB)
AIA: TextuPack.aia (291.1 KB)
Repository: GitHub - iagolirapasssos/Texture-Pack-Extension

Happy code! :tada:

12 Likes

Hello, what format should the texture files be in? Should it be an image?
Thanks,
Nico

Exactly, it has to be an image.

1 Like

OK, noted ! :+1:
Thanks,
Nico