Enoria
  • Home
  • Guide
    • Getting Started
    • Hello world!
    • Widgets
      • Container
      • Column
      • Row
      • Form
      • GridBuilder
      • ListBuilder
      • TextLabel
      • TextButton
      • ImageLabel
      • ImageButton
      • PageLayout
      • ScrollContainer
      • Stack
      • TextBox
      • TextFormField
      • VerticalSpacer
      • HorizontalSpacer
      • Viewport
  • Events
  • State Management
    • Stores
    • Observer
  • Animations
  • Build forms with validation
  • Theming
    • Classes
Powered by GitBook
On this page

Was this helpful?

  1. Guide

Hello world!

PreviousGetting StartedNextWidgets

Last updated 4 years ago

Was this helpful?

These examples assumes that you've successfully installed Enoria into game.ReplicatedStorage , and that

Go into your Main LocalScriptinsert the following code:

local Enoria = require(game.ReplicatedStorage.Enoria.Enoria) -- importing Enoria core model

local e = Enoria.new() -- creating the Enoria core object

e:RunApp({
	Name = "MyApp",
	Home = e.TextLabel("Hello world")
})

Here are the explanations to what we are doing:

  1. We begin by importing what modules we need, in this example we just need the Enoria model.

  2. Then, we initialize the model.

  3. We run the app with different paramters (GUI name and home widget).

  4. We're only inserting a TextLabel with the text "Hello world!".

Run the game just to see if everything seems to work:

Then, we want to center it in a white frame. And maybe change the font size!

...
e:RunApp({
		Name = appName,
		Home = e.Container({ -- a Container is like a Frame
			Child = e.TextLabel("Hello world!", {
				Centered = true, -- automatically centers the text
				TextSize = 32 -- just like you would do with a normal TextLabel!
			})
		})
})

When you run the game, you should see a white Frame with a TextLabel that is displaying "Hello World!" !

you have created a project!
Should look like that. UwU
Hello World!