Commit Graph

4 Commits

Author SHA1 Message Date
Gleb Mazovetskiy cc0d2e2caf lua.cpp: Use backslash directory separator
Paths going into `FindAsset` are expected to use backslashes
2023-11-01 21:50:30 +00:00
Gleb Mazovetskiy 165f95e38f Require lua/init.lua to succeed
Previously we failed silently if something went wrong.
2023-11-01 21:50:30 +00:00
Gleb Mazovetskiy 3ea4996367 Add a basic Quake-style console
Enabled only in Debug mode.

Runs Lua similar to the `lua` CLI.
Supports multiline input with Shift+Enter.

Missing features:
1. Scrollback.
2. Input history on up/down.

Open with backtick, close with Esc.
2023-10-31 23:19:56 +00:00
Gleb Mazovetskiy de6eac137b Split up lua bindings a bit
```lua
local render = devilutionx.render

local function drawGreet ()
  render.string("Hello from " .. _VERSION, 10, 40)
end
Events.OnGameDrawComplete.Add(drawGreet)
```
2023-10-26 03:48:56 +01:00