Closed CjPhoenix closed 2 years ago
There is a way to make them not Draggable.
Which is through modifying the IComponentAdder
instance.
I assume you're using the PanelAdder
, in which case you can override a method:
@Override
public <S extends IComponent,T extends IComponent> void addComponent (S title, T content, ThemeTuple theme, Point position, int width, Supplier<Animation> animation) {
AnimatedToggleable toggle=new AnimatedToggleable(new SimpleToggleable(open),animation.get());
RendererTuple<Void> renderer=new RendererTuple<Void>(Void.class,theme);
IResizable size=getResizable(width);
ClosableComponent<S,ScrollBarComponent<Supplier<Void>,T>> panel=ClosableComponent.createScrollableComponent(title,content,()->null,toggle,renderer,getScrollSize(size),false);
container.addComponent(new FixedComponent(panel,position,width,panel.getCollapsible().getToggle(),true,configName.apply(content.getTitle()));,isVisible);
}
I hope I didn't make any typing mistake
I am not aware of any way to modify the panels so that they aren't draggable... any chance you could add this functionality? If not, how would I go about doing this myself?