-
-
Notifications
You must be signed in to change notification settings - Fork 385
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
Move ShipRepair screen to pigui #4791
Conversation
I think the pigui one would be better. It might be a bit more cluttered, but it is consiszent with the HUD that way. |
@impaktor a couple of tips for you:
I'm not a fan of either of those gauges; neither of them fit the look of the screen or indicate useful information like how many tons of hull you have remaining, the type of hull material (which is moot right now, because we don't have e.g. military composite hulls), or anything beyond the current hull percentage. However, because this screen is on it's way out the door anyways, I don't mind a few rough edges in the styling and presentation, so use whatever gauge is the best in your eyes. Regarding the discounts, I like the idea of a faction-owned shipyard being able to repair their faction's ships cheaper - mostly because they have the required parts easily to hand and are (probably) getting them at a slight discount from the ship manufacturer. In reality, yeah, that's not a thing; dealers and licensed repair shops tend to be more expensive and less honest than a (good!) third party repair shop, but that's neither here nor there. |
7f54b4f
to
e5a0e73
Compare
Note: I'll rebase this to master after #4790 is merged, which adds a |
704fe01
to
48b5452
Compare
OK, I've fixed this up now, there was a bug, due to "get percent hull" function being floating point and applying many small incremental integer repairs got som very small local hullPercent = round(Game.player:GetHullPercent()) which fixed it. beware:I have a Pardon a vague post. |
I haven't looked at the code yet, but just from the screenshot, wouldn't it look better if the hull integrity gauge and the repair slider were to same size? |
@vakhoir that's because the hull integrity gauge is using the |
48b5452
to
fbee198
Compare
Yeah, I know, it looks a bit wonky. If you have suggestions on how to fix, I'm all ears. I plan to do another PR touching this ship repair screen, within a few weeks (ship manufacture specific repair), so maybe I have stronger pigui-fu then. I just removed that hard-coded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I understand it's actually the slider that's counter intuitive to deal with, because it has some automatic width calculation. ui.gauge()
has an optional width parameter you can pass. The slider can be dealt with by calling ui.pushItemWidth()
.
You can try also using ui.getContentRegion
for calculating the widths, but for a basic solution try the following:
d90b5b3
to
dd11ba6
Compare
dd11ba6
to
d682d4a
Compare
@vakhoir thanks! That did the trick! I've squashed and rebased. |
Looks good to me! Merging this in. |
Intro
OK, so I've done the ship repair shop as well. The original had this silly option, to either repair 1 percent-point, or all the damage. I replaced it with a slider.
I'm posting a screenshot with two different styles of hull integrity progress bars, the default ImGUI (yellow), and the pigui gauge (the "pioneery"), please tell me what you think, @nozmajner.
Further future improvements
I'm thinking if it's possible to make certain stations be authorized service shops for ships from certain manufacturers. Would give a discount on repairs. (HA! compare that to real "licensed" repair shops, they charge x2 the price!)
The original Frontier you did both hull and engine maintenance in the ship repair shop, but engine "health" is in the BreakdownService module, so not available to the station screens. Either way, all equipment will have their own health/damage system in the future, so the BreakdownService module will be kicked out/moved at some point, but that's for another day.
NewUI: What it used to look like
PiGUI: What it looks like now
Frontier: What it looked like in the original to our clone
(screenshot from Commodore Amiga version of Frontier)
