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

Added support for monospacing alignment modes to HUDFont / BaseStatusBar.DrawString #810

Merged
merged 3 commits into from Apr 13, 2019

Conversation

Player701
Copy link
Contributor

This PR adds support for monospacing alignment modes to HUDFont (and therefore to BaseStatusBar.DrawString). See here for details. Updated test WAD / screenshot can be found in the thread.

Copy link
Collaborator

@alexey-lysiuk alexey-lysiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather give the underlying type like int to EMonospacing enumeration, and replace #include "v_video.h" with just a declaration.

@Player701
Copy link
Contributor Author

Sorry, I'm not particularly familiar with these C++ quirks, so I'm not quite sure what kind of declaration you're talking about... I think you are allowed to push changes to my PR branch, so I'd be happy if you could fix it for me.

@coelckers
Copy link
Member

The problem is that the size of EMonospacing is not well defined. Such types shouldn't be used in a script export because they can cause undefined behavior.. So either make the member variable an int or make the enum an int by declaring it as enum EMonospacing : int

@coelckers coelckers closed this Apr 13, 2019
@coelckers coelckers reopened this Apr 13, 2019
@Player701
Copy link
Contributor Author

OK, I've added an underlying type declaration to EMonospacing, but I'm still not sure what I should replace #include "v_video.h" with.

@alexey-lysiuk
Copy link
Collaborator

With enum EMonospacing : int;

@Player701
Copy link
Contributor Author

OK, done.

@alexey-lysiuk
Copy link
Collaborator

Now I would say "squash everything to one commit", but it's better to wait for Graf's final word on this topic.

@coelckers coelckers merged commit 7479067 into ZDoom:master Apr 13, 2019
@Player701 Player701 deleted the HudFontMonospacingAlignment branch April 13, 2019 16:47
@Player701
Copy link
Contributor Author

Thanks. Now I can finally get rid of that lousy hack in my mod code...

drfrag666 pushed a commit to drfrag666/gzdoom that referenced this pull request Apr 20, 2019
…Bar.DrawString (ZDoom#810)

* - Added support for monospacing alignment modes to HUDFont / BaseStatusBar.DrawString

* - added underlying type declaration for EMonospacing

* - replaced "#include v_video.h" with a declaration of EMonospacing
drfrag666 pushed a commit to drfrag666/gzdoom that referenced this pull request May 14, 2019
…Bar.DrawString (ZDoom#810)

* - Added support for monospacing alignment modes to HUDFont / BaseStatusBar.DrawString

* - added underlying type declaration for EMonospacing

* - replaced "#include v_video.h" with a declaration of EMonospacing
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.

None yet

3 participants