enable lua

This commit is contained in:
2026-01-15 21:43:17 +01:00
parent 6ad11773dd
commit 5187143445
8 changed files with 58 additions and 8 deletions

9
assets/demo.lua Normal file
View File

@@ -0,0 +1,9 @@
-- Simple button click handler
click_count = 0
function onButtonClick(event)
click_count = click_count + 1
local button = event.current_element
button.inner_rml = "Clicked " .. click_count .. " times!"
print("Button clicked! Count: " .. click_count)
end

View File

@@ -2,6 +2,7 @@
<head>
<link type="text/rcss" href="html.rcss"/>
<link type="text/rcss" href="phone.rcss"/>
<script src="demo.lua"></script>
<title>Fullscreen Mobile UI</title>
</head>
<body>
@@ -21,6 +22,9 @@
<div class="header-section">
<h1>Hello omar 3 hello! and hello LEO 2 Hello!</h1>
</div>
<div class="button-container">
<button id="main-button" onclick="onButtonClick(event)">Click Me!</button>
</div>
</div>
<div id="nav-bar">

View File

@@ -107,4 +107,31 @@ h1 {
.nav-item:hover {
color: #3498db;
background-color: blue;
}
/* Button container for centering */
.button-container {
display: block;
text-align: center;
margin-top: 50px;
}
/* Styled button */
button {
padding: 20px 60px;
font-size: 1.5em;
font-family: LatoLatin;
font-weight: bold;
color: white;
background-color: #3498db;
border-radius: 12px;
cursor: pointer;
}
button:hover {
background-color: #2980b9;
}
button:active {
background-color: #1c5a85;
}