small tech screen change

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Post Reply
Message
Author
User avatar
The Silent One
Graphics
Posts: 1129
Joined: Tue Jul 01, 2003 8:27 pm

small tech screen change

#1 Post by The Silent One »

Currently when zooming far out, the tech name will be hidden. I'd like to commit a patch that instead of hiding the text will remove the text's shadow, which makes it easier to read.

Ok to commit, formatting ok?

Code: Select all

    // small text: remove shadow
    if (font_pts < 10)
        m_name_label->SetText(m_name_text);
    else
        m_name_label->SetText("<s>" + m_name_text + "</s>");

    GG::Pt text_ul(text_left + 4, text_top);
    GG::Pt text_size(text_width + PAD, text_height);
    m_name_label->SizeMove(text_ul, text_ul + text_size);
    /// Need to render children too
    GG::GUI::GetGUI()->RenderWindow(m_name_label);
If I provided any images, code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: small tech screen change

#2 Post by Geoff the Medio »

Post a diff, if you don't want to / can't make a pull request...

User avatar
The Silent One
Graphics
Posts: 1129
Joined: Tue Jul 01, 2003 8:27 pm

Re: small tech screen change

#3 Post by The Silent One »

Sure, I can make a pull request. What I meant: are you ok with the change? If yes, is the formatting ok? And, would you mind if I directly commit (in the future) if I have changed just a few lines of code?

Anyway, PR is here:
https://github.com/freeorion/freeorion/pull/369
If I provided any images, code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: small tech screen change

#4 Post by Geoff the Medio »

The Silent One wrote:Sure, I can make a pull request. What I meant: are you ok with the change?
I can't tell from a code snippet what was changed... pull requests or diff make this clear.

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: small tech screen change

#5 Post by Vezzra »

The Silent One wrote:And, would you mind if I directly commit (in the future) if I have changed just a few lines of code?
That's not so much a matter of the quantity of changes, than what kind of changes you want to introduce. If you want/need feedback/input, like in this case, make a PR.

User avatar
The Silent One
Graphics
Posts: 1129
Joined: Tue Jul 01, 2003 8:27 pm

Re: small tech screen change

#6 Post by The Silent One »

Since the text of the tech panels is illegible if the tech screen is zoomed far out, I suggest to remove the text panel altogether in that case; see below. Opinions?
Attachments
techtree zoomed out.jpg
techtree zoomed out.jpg (61.25 KiB) Viewed 2354 times
If I provided any images, code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0.

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: small tech screen change

#7 Post by MatGB »

Looks like a good plan to me, if we (well, you and the other art people) can get a unique icon for all the extant tech then it'll work even better, and we're getting there now.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
The Silent One
Graphics
Posts: 1129
Joined: Tue Jul 01, 2003 8:27 pm

Re: small tech screen change

#8 Post by The Silent One »

Here's an overview of the zoom levels of the tech screen as I have implemented them now. Looking good I think?
Attachments
comparison zoom levels.jpg
comparison zoom levels.jpg (130.38 KiB) Viewed 2333 times
If I provided any images, code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0.

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: small tech screen change

#9 Post by Vezzra »

The Silent One wrote:Looking good I think?
Yep, that looks quite good. As far as I'm concerned, go ahead and implement it.

User avatar
The Silent One
Graphics
Posts: 1129
Joined: Tue Jul 01, 2003 8:27 pm

Re: small tech screen change

#10 Post by The Silent One »

The images are already from ingame, pull request is here: https://github.com/freeorion/freeorion/pull/369
If I provided any images, code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0.

Post Reply