You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clicking on an icon should open the corresponding info view (see forum post for original request). It may be beneficial to only open if no other tool is selected (other than default empty tool), although this could maybe be a setting?
The bindings.d.ts file suggests that this might be possible using a combination of the JS bindings.
functiontoggleInfoviewMenu(): void;functionuseInfoviewToggle(infoviewId: string): (()=>void)|undefined;// May be helpful for figuring out what infoview IDs are (contained in `Infoview.id`)constinfoviews$: ValueBinding<Infoview[]>;constactiveInfoview$: ValueBinding<ActiveInfoview|null>;// Not sure how these differ from the previous functions, nor how the "entity" would be retrieved for them?functionsetActiveInfoview(entity: Entity): void;functionclearActiveInfoview(): void;exportinterfaceInfoview{entity: Entity;id: string;icon: string|null;locked: boolean;uiTag: string;group: number;requirements: UnlockingRequirements;}
The text was updated successfully, but these errors were encountered:
Took a shot at this last night but wasn't satisfied... Need to find a good way of only triggering this if no other conflicting tools/panels are open. Would be ideal to also find a way to open the infoview menu and associated infoview panel, and not keep toggling the infoview menu (no "set" method; only "toggle") 😢.
constinfoviewList=useValue(infoview.infoviews$);constactiveTool=useValue(tool.activeTool$);constactiveInfoview=useValue(infoview.activeInfoview$);constdefaultToolActive=activeTool.id===tool.DEFAULT_TOOL;consthandleStatClick=(stat: StatsPanelItem)=>{// Avoid opening info panel if another tool is already open (would be confusing)// TODO: Consider removing this???if(!defaultToolActive)return;constinfoView=infoviewList.find((i)=>i.id===stat.infoviewId);if(!infoView)return;// logger.log(infoView);// logger.log(activeTool, defaultToolActive);// logger.log(activeInfoview);// TODO: Only toggle infoview menu if not already openif(!activeInfoview){// game.toggleInfoviewMenu();}// NOTE: Currently does not open infoview menu but just the active overlay, which can lead to some odd visual glitches if selecting// something in the game that closes overlay but keeps color applied// infoview.setActiveInfoview(infoView.entity);};
Clicking on an icon should open the corresponding info view (see forum post for original request). It may be beneficial to only open if no other tool is selected (other than default empty tool), although this could maybe be a setting?
The
bindings.d.ts
file suggests that this might be possible using a combination of the JS bindings.The text was updated successfully, but these errors were encountered: