fix for trile editor trile selection bug
This commit is contained in:
parent
651984ba43
commit
9b4209b300
@ -218,7 +218,7 @@ trile_copy :: (from: string) {
|
||||
tick_trile_editor :: () {
|
||||
if console_open_ignore_input then return;
|
||||
|
||||
if !editor_current_trile then editor_current_trile = get_trile("test");
|
||||
if !editor_current_trile then editor_current_trile = get_any_trile();
|
||||
|
||||
if input_button_states[Key_Code.MOUSE_BUTTON_LEFT] & .START {
|
||||
handle_tool_click();
|
||||
|
||||
@ -90,6 +90,15 @@ set_trile :: (name: string, trile: Trile) {
|
||||
}
|
||||
}
|
||||
|
||||
get_any_trile :: () -> (*Trile, success: bool) {
|
||||
for v : trile_table {
|
||||
print("Found trile: %\n", v.name);
|
||||
trileptr, err := get_trile(v.name);
|
||||
return trileptr, err;
|
||||
}
|
||||
return null, false;
|
||||
}
|
||||
|
||||
get_trile :: (name: string) -> (*Trile, success: bool) {
|
||||
trileptr := table_find_pointer(*trile_table, name);
|
||||
if !trileptr {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user