这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@MaanooAk
Copy link
Contributor

@MaanooAk MaanooAk commented Sep 20, 2019

Some small gui improvements. There always have been those small gui things that make the first glance of the game little bit... so:

  • Moved the unit info to the qml
  • Cleaned the player name and abilty info
  • Default debug overlay to invisible
  • Slower fps updates so they are readable

Screenshot from 2019-09-20 18-07-55

(Health bar is placeholder (next pr))

Edit (simonsan): Closes #611

@MaanooAk MaanooAk force-pushed the guiimp branch 2 times, most recently from 2c844fd to dbd1c06 Compare September 20, 2019 15:20
@simonsan simonsan added improvement Enhancement of an existing component area: ui Related to the graphical user interface (Qt) labels Sep 20, 2019
@heinezen
Copy link
Member

Nice!

@MaanooAk
Copy link
Contributor Author

MaanooAk commented Sep 20, 2019

Ok, so added an image placeholder (and formated better the info), but I am not sure from where to fetch the icons (is this even in?), anyone knows? In any case, we can leave the placeholder until nyan.

Screenshot from 2019-09-21 00-16-00

@simonsan
Copy link
Contributor

@MaanooAk Really cool stuff! Just asking: Is there any issue with the ui-label that could be referenced here or is maybe even already fixed by this PR/ or in general outdated?

@MaanooAk
Copy link
Contributor Author

MaanooAk commented Sep 20, 2019

@simonsan I fixed the #611, the others are mostly suggestions and not bugs.

@simonsan
Copy link
Contributor

simonsan commented Sep 20, 2019

@simonsan I fixed the #611, the others are mostly suggestions and not bugs.

Nice, thank you for taking a look into that. 👍

heinezen
heinezen previously approved these changes Sep 21, 2019
Copy link
Member

@heinezen heinezen left a comment

Choose a reason for hiding this comment

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

Looks good to me. Nice work!

@heinezen
Copy link
Member

heinezen commented Sep 21, 2019

@MaanooAk The icons are in assets/converted/interface/50730.slp.png, but not cut out. I wouldn't worry about that until #1151 is ready.

@MaanooAk
Copy link
Contributor Author

@heinezen Ok, at the moment a have the placeholder with image://by-filename/converted/interface/50730.slp.png.2, so they are somehow cut but the mapping of sprite location to unit type is probably missing. However #1151 should keep in mind that icons are needed

@sandsmark
Copy link
Contributor

sandsmark commented Sep 21, 2019

There are two slp/shp files you probably want to reference there eventually. btnunit.shp (50730) is for units, and ico_bld2.shp (50706, but there's 4 identical ones, iirc) is for buildings.

Eventually you probably want itemicon.shp (50731) as well, those are the icons for the amount of wood carried, armor, attack range etc.

The progress bar is in sundial.shp (50764), and if you want to make it really identical you should get unithalo.shp (53003) as well, to display behind the unit icon.

The correct icon you get from the dat file, in genieutils it is Unit::IconID, which is the frame number in the SLP/SHP file.

References, in case I missed something (it's some time since I implemented it); https://github.com/sandsmark/freeaoe/blob/master/src/ui/UnitInfoPanel.cpp is the info panel itself, and here I collected all the filenames with IDs I've found; https://github.com/sandsmark/freeaoe/blob/master/src/resource/AssetManager.cpp#L400-L620 (and excuse the messy code it isn't really meant to be read by others, but you can see the files I load for what I hope)

@MaanooAk MaanooAk changed the title Gui improvements [WIP] Gui improvements Sep 21, 2019
@MaanooAk
Copy link
Contributor Author

@sandsmark HUGE help, thanks mate

Made the icon to be exported to the unit type and then made the gui actually showing the correct icon (and added the border from 53003.slp). And also added the team tag (Enemy, Ally or nothing) bellow the name and civ)

Screenshot from 2019-09-21 23-34-20

I think this is a good point for merge (progress and health bars next month...)

@MaanooAk MaanooAk changed the title [WIP] Gui improvements Gui improvements Sep 21, 2019
@MaanooAk MaanooAk requested a review from heinezen September 21, 2019 20:47
@heinezen
Copy link
Member

@MaanooAk Looks fine :)

Keep in mind that a lot of the changes could become obsolete with the new nyan gamestate, so you might want to look out for that.

@heinezen heinezen merged commit d179979 into SFTtech:master Sep 21, 2019
simonsan pushed a commit to simonsan-contrib/openage that referenced this pull request Sep 22, 2019
@MaanooAk MaanooAk deleted the guiimp branch October 5, 2019 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui Related to the graphical user interface (Qt) improvement Enhancement of an existing component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Units can be selected through the UI

4 participants