Skip to content

Added ability to move text labels.#2555

Merged
KABoissonneault merged 1 commit intoInterkarma:masterfrom
Jagget:ability_to_move_text_lables
Jan 24, 2024
Merged

Added ability to move text labels.#2555
KABoissonneault merged 1 commit intoInterkarma:masterfrom
Jagget:ability_to_move_text_lables

Conversation

@Jagget
Copy link
Copy Markdown
Collaborator

@Jagget Jagget commented Dec 18, 2023

Reason

It's not a secret that text in different languages have different lengths. Hence, we need the ability to move labels. At least through mods. But currently we cannot do that easily, because these fields are private. And instead of quick extension of the dialog class we must re-implement the whole window logic.

To be able to do something simple like

protected override void Setup()
{
    base.Setup();
    // Setup labels
    nameLabel.Position = new Vector2(34, 4);
    raceLabel.Position = new Vector2(40, 14);
    classLabel.Position = new Vector2(47, 24);
    levelLabel.Position = new Vector2(54, 34);
    goldLabel.Position = new Vector2(53, 44);
    fatigueLabel.Position = new Vector2(42, 54);
    healthLabel.Position = new Vector2(48, 64);
    encumbranceLabel.Position = new Vector2(68, 74);
}

or

protected override void Setup()
{
    base.Setup();
    // Setup labels
    accountAmount.Position = new Vector2(126, 14);
    inventoryAmount.Position = new Vector2(141, 24);
    loanAmountDue.Position = new Vector2(71, 34);
    loanDueBy.Position = new Vector2(71, 44);
}

we need to change the protection level on these labels.

Result

Before:

Screenshot 2023-12-18 124824
Screenshot 2023-12-18 130222

After

Screenshot 2023-12-18 124740
Screenshot 2023-12-18 131827

@KABoissonneault KABoissonneault merged commit 904ae58 into Interkarma:master Jan 24, 2024
@Jagget Jagget deleted the ability_to_move_text_lables branch January 24, 2024 02:38
@KABoissonneault KABoissonneault mentioned this pull request Feb 7, 2024
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.

3 participants