Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API: Move tail-related APIs to another namespace #1935

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

catloversg
Copy link
Contributor

This PR implements the change discussed at https://discord.com/channels/415207508303544321/459097632896188436/1318894499170095176 and https://discord.com/channels/415207508303544321/459097632896188436/1332765650728390697.

Changes:

  • ns.tail -> ns.ui.openTail
  • ns.moveTail -> ns.ui.moveTail
  • ns.resizeTail -> ns.ui.resizeTail
  • ns.setTitle -> ns.ui.setTailTitle
  • ns.setTailFontSize -> ns.ui.setTailFontSize
  • ns.closeTail -> ns.ui.closeTail
  • ns.renderTail -> ns.ui.renderTail (This API has not been released, so we don't have to maintain the old version).

Note: I don't implement migration code and API break notice in this PR. I think we should do that in another PR when we decide to remove the support of the old APIs. Maybe it's v3.0.0.

Test code:

/** @param {NS} ns */
export async function main(ns) {
  ns.tail();
  ns.moveTail(100, 100);
  ns.resizeTail(500, 500);
  ns.setTitle("test");
  ns.setTailFontSize(15);
  ns.closeTail();
}

Screenshot:
Capture

@d0sboots
Copy link
Collaborator

d0sboots commented Jan 31, 2025

setTailFontSize was also within this version, so doesn't need deprecation.

Edit: Other than that, looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants