public WorldTravelSelect(AtkUnitBase *address) { UnitBase = address; try { RootNode = UnitBase->RootNode; if (RootNode == null) { return; } WindowComponent = (AtkComponentNode *)RootNode->ChildNode; InformationBox = (AtkComponentNode *)WindowComponent->AtkResNode.PrevSiblingNode; InformationBoxBorder = (AtkNineGridNode *)InformationBox->AtkResNode.PrevSiblingNode; WorldListComponent = (AtkComponentNode *)InformationBoxBorder->AtkResNode.PrevSiblingNode; WorldListHeader = (AtkTextNode *)WorldListComponent->AtkResNode.PrevSiblingNode; CurrentWorldContainer = WorldListHeader->AtkResNode.PrevSiblingNode; HomeWorldContainer = CurrentWorldContainer->PrevSiblingNode; WorldInfoHeader = (AtkTextNode *)HomeWorldContainer->PrevSiblingNode; CurrentWorldName = (AtkTextNode *)CurrentWorldContainer->ChildNode; CurrentWorldHeaderUnderline = (AtkNineGridNode *)CurrentWorldName->AtkResNode.PrevSiblingNode; CurrentWorldHeader = (AtkTextNode *)CurrentWorldHeaderUnderline->AtkResNode.PrevSiblingNode; CurrentWorldIcon = (AtkImageNode *)CurrentWorldHeader->AtkResNode.PrevSiblingNode; IsValid = true; } catch (Exception ex) { SimpleLog.Error(ex); IsValid = false; } }
private static unsafe void DrawWeatherIcon( Vector2 weatherIconBorderPMin, Vector2 weatherIconBorderPMax, Vector2 weatherIconPMin, Vector2 weatherIconPMax, nint naviMapTextureD3D11ShaderResourceView, AtkImageNode *weatherIconNode ) { var backgroundDrawList = ImGui.GetBackgroundDrawList(); backgroundDrawList.PushClipRectFullScreen(); try { if (!weatherIconNode->AtkResNode.IsVisible) { return; } //Background of Weather Icon backgroundDrawList.AddImage( naviMapTextureD3D11ShaderResourceView , weatherIconBorderPMin , weatherIconBorderPMax , new Vector2(0.08035714f, 0.8301887f) , new Vector2(0.1607143f, 1)); //Weather Icon var tex = weatherIconNode->PartsList->Parts[0].UldAsset->AtkTexture.Resource->KernelTextureObject; backgroundDrawList.AddImage( new IntPtr(tex->D3D11ShaderResourceView), weatherIconPMin, weatherIconPMax); //Border around Weather Icon backgroundDrawList.AddImage( naviMapTextureD3D11ShaderResourceView , weatherIconBorderPMin , weatherIconBorderPMax , new Vector2(0.1607143f, 0.8301887f) , new Vector2(0.2410714f, 1)); } #if DEBUG catch (Exception e) { SimpleLog.Error(e); } #else catch { // ignored } #endif backgroundDrawList.PopClipRect(); }
public Pointers( TargetSystem *targetSystem, float *playerViewTriangleRotation, AtkUnitBase *currentSourceBase, AtkComponentNode *currentMapIconsRootComponentNode, AtkImageNode *weatherIconNode, nint naviMapTextureD3D11ShaderResourceView ) { TargetSystem = targetSystem; WeatherIconNode = weatherIconNode; NaviMapTextureD3D11ShaderResourceView = naviMapTextureD3D11ShaderResourceView; CurrentMapIconsRootComponentNode = currentMapIconsRootComponentNode; CurrentSourceBase = currentSourceBase; PlayerViewTriangleRotation = playerViewTriangleRotation; }
public static void Hide(AtkImageNode *node) => Hide((AtkResNode *)node);
public static void Show(AtkImageNode *node) => Show((AtkResNode *)node);