Coder Social home page Coder Social logo

Ampersand issue about wzcomparerr2 HOT 4 CLOSED

kagamia avatar kagamia commented on July 22, 2024
Ampersand issue

from wzcomparerr2.

Comments (4)

Kagamia avatar Kagamia commented on July 22, 2024 1

Do you use GDI to render potentials?
There's a format flag called TextFormatFlags.NoPrefix. Reference to msdn. It also contains a example:

private void RenderText6(PaintEventArgs e)
{
    // use '|' operator here.
    TextFormatFlags flags = TextFormatFlags.Bottom | TextFormatFlags.EndEllipsis;
    TextRenderer.DrawText(e.Graphics, "This is some text that will be clipped at the end.", this.Font,
        new Rectangle(10, 10, 100, 50), SystemColors.ControlText, flags);
}

from wzcomparerr2.

Sunaries avatar Sunaries commented on July 22, 2024

@Kagamia Yes, I do. However I use the code from KENNYSOFT.
Here is a diff checker: https://www.diffchecker.com/4mTcanZj
Left is my version, right is yours.

I'm afraid of adding your code as well since it might conflict.

from wzcomparerr2.

Sunaries avatar Sunaries commented on July 22, 2024

@Kagamia From that diff checker, I added your code from 2e3af70 (with the exception of GearTooltipRender2.cs commit because that changes my font not to correspond with GMS) to my Unstable Version.
I get the following result:

test

Also, with this code when I try to simulate certain items I get many NullReferenceException was unhandled errors.

from wzcomparerr2.

Kagamia avatar Kagamia commented on July 22, 2024

You should append the flag to everywhere you render the potentials, such as ring option, potentials, additional potentials in GearRenderer, potentials in SetItemRenderer.

eg: for Kennysoft's version:
GearTooltipRender2.cs line: 629-

foreach (Potential potential in Gear.Options)
{
    if (potential != null)
    {
        TextRenderer.DrawText(g, potential.ConvertSummary(), GearGraphics.EquipDetailFont2, new Point(13, picH), Color.White, TextFormatFlags.NoPadding | TextFormatFlags.NoPrefix);
        picH += 15;
        }
    }
}

line: 669-

foreach (Potential potential in Gear.AdditionalOptions)
{
    if (potential != null)
    {
        TextRenderer.DrawText(g, "+ " + potential.ConvertSummary(), GearGraphics.EquipDetailFont2, new Point(13, picH), Color.White, TextFormatFlags.NoPadding | TextFormatFlags.NoPrefix);
        picH += 15;
    }
}

from wzcomparerr2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.