mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-03 23:55:55 +00:00
Keymapping menu
This commit is contained in:
parent
9e8c2220b2
commit
b76427e3ca
14 changed files with 137 additions and 34 deletions
|
|
@ -1,15 +1,30 @@
|
|||
using Godot;
|
||||
using System;
|
||||
using Cirno.Scripts.UI;
|
||||
using Godot.Collections;
|
||||
|
||||
public partial class KeyRemapping : Container
|
||||
{
|
||||
[Export] public Dictionary<StringName, StringName> KeysDict { get; private set; } = new();
|
||||
|
||||
[Export] public Container KeysContainer { get; private set; }
|
||||
|
||||
[Export] public PackedScene ItemPrefab { get; private set; }
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
var remap = GetNode("/root/Remap");
|
||||
//var remap = GetNode("/root/Remap");
|
||||
//InputEvent.
|
||||
|
||||
foreach (var element in KeysDict)
|
||||
{
|
||||
var item = ItemPrefab.Instantiate<KeyRemappingItem>();
|
||||
|
||||
item.KeyId = element.Key;
|
||||
item.KeyName = element.Value;
|
||||
|
||||
KeysContainer.AddChild(item);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue