From 9530c34e6eb2233c5de70e04612d4a0b1f40191f Mon Sep 17 00:00:00 2001 From: hgn Date: Tue, 17 Jun 2025 23:46:01 +0100 Subject: [PATCH] board maker notice for dektop --- src/board_maker.c | 15 +++++++++++++++ src/scripts/board_maker.c | 24 +++++++++++------------- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/src/board_maker.c b/src/board_maker.c index 4de3017..34532cd 100644 --- a/src/board_maker.c +++ b/src/board_maker.c @@ -907,6 +907,21 @@ void _board_maker_ui( ui_context *ctx ) void _board_maker_open(void) { + if( vg_input.display_input_method == k_input_method_controller ) + { + static bool hack = 0; + hack ^= 0x1; + + if( hack ) + gui_location_print_ccmd( 1, (const char *[]){ KRED "Must be using keyboard/mouse to access." } ); + else + gui_location_print_ccmd( 1, (const char *[]){ KRED "Must be using keyboard/mouse to access. " } ); + return; + } + + if( !world_set_event( k_world_event_board_maker ) ) + return; + VG_ASSERT( _board_maker.state == k_board_maker_state_not_ready ); VG_ASSERT( _board_maker.static_heap == NULL ); VG_ASSERT( _board_maker.template_heap == NULL ); diff --git a/src/scripts/board_maker.c b/src/scripts/board_maker.c index 03dbf3e..6788e1a 100644 --- a/src/scripts/board_maker.c +++ b/src/scripts/board_maker.c @@ -17,22 +17,20 @@ static bool _skaterift_script_board_maker( ent_script_event *event ) } ent_list *list = af_arritm( &world->ent_list, mdl_entity_id_id(list_id) ); - if( world_set_event( k_world_event_board_maker ) ) + struct ent_list_iter iter; + _ent_list_iter_start( &iter, list, k_ent_marker ); + while( _ent_list_iter( &iter ) ) { - struct ent_list_iter iter; - _ent_list_iter_start( &iter, list, k_ent_marker ); - while( _ent_list_iter( &iter ) ) - { - ent_marker *marker = af_arritm( &world->ent_marker, iter.index ); - const char *alias = af_str( &world->meta.af, marker->pstr_alias ); + ent_marker *marker = af_arritm( &world->ent_marker, iter.index ); + const char *alias = af_str( &world->meta.af, marker->pstr_alias ); - if( !strcmp( alias, "$board_position" ) ) - v3_copy( marker->transform.co, _board_maker.origin ); - else if( !strcmp( alias, "$camera_position" ) ) - v3_copy( marker->transform.co, _board_maker.camera_pos ); - } - _board_maker_open(); + if( !strcmp( alias, "$board_position" ) ) + v3_copy( marker->transform.co, _board_maker.origin ); + else if( !strcmp( alias, "$camera_position" ) ) + v3_copy( marker->transform.co, _board_maker.camera_pos ); } + + _board_maker_open(); } } } -- 2.25.1