Rorm
Rorm
Explore posts from servers
CC#
Created by Rorm on 3/10/2024 in #help
Finding a button by name
Hello I would like help with this:
private void LoadKeybinds()
{
string filePath = "edward.json";
using (StreamReader r = new StreamReader(filePath))
{
string json = r.ReadToEnd();
JObject keybinds = JObject.Parse(json);
foreach (var item in keybinds)
{
if (item.Key.Contains("Keybind"))
{
//find button for example in python: f"{item.Key}BTN" and change the button text to item.Value somehow

//MessageBox.Show(item.Key + ": " + item.Value);
}

}
}

}
private void LoadKeybinds()
{
string filePath = "edward.json";
using (StreamReader r = new StreamReader(filePath))
{
string json = r.ReadToEnd();
JObject keybinds = JObject.Parse(json);
foreach (var item in keybinds)
{
if (item.Key.Contains("Keybind"))
{
//find button for example in python: f"{item.Key}BTN" and change the button text to item.Value somehow

//MessageBox.Show(item.Key + ": " + item.Value);
}

}
}

}
I would like to find button by name and change the button text to item.Value somehow
2 replies