Jump to content

[SOLVED] Unigine::Widgets::UserInterface::UserInterface(): unknown widget type WidgetSpinBox


photo

Recommended Posts

Hi,

Looks like spinbox is not included in Unigine::Widgets, in fact if you add one of them in a ui, the widget is shown but you get the error Unigine::Widgets::UserInterface::UserInterface(): unknown widget type WidgetSpinBox.
To reproduce it use the attached file in interface ui_00 sample (it just adds an editline with spinbox)

 

Suggested solution

Despite of spinbox doesn't have reflection in Unigine::Widgets, the system can ignore spinbox in the following way:

data\core\systems\widgets\widget.h (ln. 139)

		// ...
		EDITTEXT = WIDGET_EDITTEXT,
		SPINBOX = WIDGET_SPINBOX,
	};
	
	// ...

data\core\systems\widgets\widget_interface.h (ln. 101)

					// ...
					case EDITLINE:	widget = new EditLine(widget); break;
					case EDITTEXT:	widget = new EditText(widget); break;
					case SPINBOX:	widget = NULL; break;
					default:		log.error("Unigine::Widgets::UserInterface::UserInterface(): unknown widget type %s\n",widget.getTypeName()); widget = NULL;
				}
				// ...

Regards,

Iván.

ui_00.ui

Link to comment
×
×
  • Create New...