@@ -204,6 +204,8 @@ bool c_gui_widget::can_receive_focus()
204204bool c_gui_widget::controller_can_drive (e_controller_index controller_index)
205205{
206206 return INVOKE_CLASS_MEMBER (0x00AB7960 , c_gui_widget, controller_can_drive, controller_index);
207+
208+ // return controller_index == k_any_controller || get_driving_controller() == k_any_controller || get_driving_controller() == controller_index;
207209}
208210
209211// .text:00AB79D0 ; public: c_gui_button_key_widget* c_gui_widget::create_and_add_button_key(s_button_key_block const*)
@@ -507,6 +509,33 @@ c_gui_widget* c_gui_widget::get_deepest_widget_that_can_receive_focus()
507509int32 c_gui_widget::get_definition_index ()
508510{
509511 return INVOKE_CLASS_MEMBER (0x00AB8E20 , c_gui_widget, get_definition_index);
512+
513+ // c_gui_widget* parent_widget = get_parent();
514+ // if (!parent_widget)
515+ // {
516+ // return NONE;
517+ // }
518+ //
519+ // c_gui_widget* child_widget = parent_widget->get_children();
520+ // if (!child_widget)
521+ // {
522+ // return NONE;
523+ // }
524+ //
525+ // int32 definition_index = 0;
526+ //
527+ // while (child_widget != this)
528+ // {
529+ // child_widget = child_widget->get_next();
530+ // if (!child_widget)
531+ // {
532+ // return NONE;
533+ // }
534+ //
535+ // definition_index++;
536+ // }
537+ //
538+ // return definition_index;
510539}
511540
512541e_controller_index c_gui_widget::get_driving_controller () const
@@ -572,6 +601,18 @@ c_gui_widget* c_gui_widget::get_first_child_widget_by_type(e_gui_widget_type typ
572601c_gui_widget* c_gui_widget::get_last_child_widget_by_type (e_gui_widget_type type)
573602{
574603 return INVOKE_CLASS_MEMBER (0x00AB9010 , c_gui_widget, get_last_child_widget_by_type, type);
604+
605+ // c_gui_widget* last_child_widget = NULL;
606+ // for (c_gui_widget* child_widget = get_children(); child_widget; child_widget = child_widget->get_next())
607+ // {
608+ // if (child_widget->m_type != type)
609+ // {
610+ // continue;
611+ // }
612+ //
613+ // last_child_widget = child_widget;
614+ // }
615+ // return last_child_widget;
575616}
576617
577618// .text:00AB9080 ; void __cdecl get_local_coordinate_system_position_from_rotation_keyframe(c_gui_widget*, s_rotation_keyframe_block const*, real_point2d*)
@@ -648,7 +689,7 @@ int32 c_gui_widget::get_name() const
648689{
649690 // return INVOKE_CLASS_MEMBER(0x00AB94B0, c_gui_widget, get_name);
650691
651- return m_name. get_value () ;
692+ return m_name;
652693}
653694
654695c_gui_widget* c_gui_widget::get_previous ()
@@ -1317,8 +1358,31 @@ bool c_gui_widget::verify_animation_period(e_animation_state animation_state, in
13171358 return INVOKE_CLASS_MEMBER (0x00ABB220 , c_gui_widget, verify_animation_period, animation_state, period);
13181359}
13191360
1320- // .text:00ABB270 ; public: static char const* __cdecl c_gui_widget::widget_name_to_string(int32)
1321- // .text:00ABB280 ; public: static char const* __cdecl c_gui_widget::widget_type_to_string(e_gui_widget_type)
1361+ char const * __cdecl c_gui_widget::widget_name_to_string (int32 name)
1362+ {
1363+ // return INVOKE(0x00ABB270, c_gui_widget::widget_name_to_string, name);
1364+
1365+ return " " ;
1366+ }
1367+
1368+ char const * __cdecl gui_widget_type_to_string (e_gui_widget_type type)
1369+ {
1370+ // return INVOKE(0x00ABB280, gui_widget_type_to_string, type);
1371+
1372+ switch (type)
1373+ {
1374+ case _gui_text: return " text" ;
1375+ case _gui_bitmap: return " bitmap" ;
1376+ case _gui_model: return " model" ;
1377+ case _gui_group: return " group" ;
1378+ case _gui_button_key: return " button_key" ;
1379+ case _gui_list_item: return " item" ;
1380+ case _gui_slider: return " slider" ;
1381+ case _gui_list: return " list" ;
1382+ case _gui_screen: return " screen" ;
1383+ }
1384+ return " <unknown>" ;
1385+ }
13221386
13231387bool c_gui_widget::within_focus_chain ()
13241388{
0 commit comments