+METHOD(XonoticGameSettingsTab, topicChangeNotify, void(entity, entity this))
+{
+ entity s = this.currentPanel;
+ s.viewportHeight = 15.5;
+ entity c = s.currentPanel;
+ entity removing = this.currentItem;
+ DataSource data = this.topicList.source;
+ entity adding = data.getEntry(data, this.topicList.selectedItem, func_null);
+ if (removing == adding) return;
+ if (removing) {
+ this.currentItem = NULL;
+ c.removeItem(c, removing);
+ }
+ if (adding) {
+ this.currentItem = adding;
+ adding.resizeNotify(adding, '0 0 0', c.size, '0 0 0', c.size);
+ c.addItem(c, adding, '0 0 0', '1 1 0', 1);
+ s.resizeNotify(s, '0 0 0', s.size, '0 0 0', s.size);
+ }
+}
+METHOD(XonoticGameSettingsTab, fill, void(entity this))
+{
+ entity topics = this.topicList;
+ topics.onChange = this.topicChangeNotify;
+ topics.onChangeEntity = this;