Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

GUI #7

Closed
8 tasks done
Cydhra opened this issue Jul 19, 2019 · 20 comments
Closed
8 tasks done

GUI #7

Cydhra opened this issue Jul 19, 2019 · 20 comments
Labels
help wanted Extra attention is needed tracking A tracking issue for features currently worked on.
Milestone

Comments

@Cydhra
Copy link
Member

Cydhra commented Jul 19, 2019

This is a tracking issue for all mod GUI. Proposals, discussion and progress are documented here. The GUI has been worked on in the past, but it requires a lot more work.

  • Currently all GUIs are generated automatically for machines. While this is favorable for basic machines, complex ones may require manual gui setup. A simple builder interface (maybe using a Kotlin DSL) to create a gui with the components available, should be implemented.

  • The GUI does need bidirectional synchronization with the server. Changes made in GUI need to be sent to the server, machine contents and progress needs to be sent to the client. Further discussion and details required

  • For user experience a more detailed and fancy GUI should be considered. Currently all compoents look very basic and serve their purpose, but additional textures should be considered. This is especially the case for fill-meters like for energy and fluids. Fluids should be rendered using the respective fluid texture (sync required). Progress bars could be individualized for different machines.

  • Display side configs in a convenient and intuitive way. Discussion about details is required.

  • Shift clicking is to be implemented

  • Render additive components differently

  • Add a component to display text and stats of a (multiblock-) machine. A normal label could be used, but a more sophisticated solution with better formatting options is preferable

  • Heat storage component

@Cydhra Cydhra added help wanted Extra attention is needed tracking A tracking issue for features currently worked on. labels Jul 19, 2019
@Cydhra Cydhra mentioned this issue Jul 19, 2019
4 tasks
@Cydhra Cydhra added this to the Beta Release milestone Jul 19, 2019
@deftk
Copy link
Contributor

deftk commented Jul 19, 2019

Fluid textures and colors are now rendered (currently with placeholder fluid), texture for RedstoneModeControl was added, ToolTips appear now and show more details (f.e. stored Energy; not tested for slots because of missing sync).

Cydhra added a commit that referenced this issue Jul 19, 2019
minor gui improvements. This relates to #7
Cydhra added a commit that referenced this issue Jul 20, 2019
Improved gui design (still not considered final), automatic guis for multiblocks, bugfixes. Relates to #7
@deftk
Copy link
Contributor

deftk commented Jul 20, 2019

Textures for EnergyMeter and FluidMeter were added (might be replaced later). GUIs for MultiBlocks were added (can only be shown by clicking at the controller block)

@deftk
Copy link
Contributor

deftk commented Jul 20, 2019

Torch Textures for the RedstoneMode Control were added. A critical bug affecting the EnergyMeter was fixed (didn't render if current energy was 0).

@deftk deftk mentioned this issue Jul 20, 2019
Merged
@deftk
Copy link
Contributor

deftk commented Jul 22, 2019

Component for progress was added. Several bugs affecting the item slots were fixed.
Gui Slots should be fully functional now.

A strange bug appeared (not solved yet): Sometimes progress is already synced with the server, even if there is no sync system for components yet. After you restart the client, the bug appears usually 2 to 3 times and disappears.

@deftk
Copy link
Contributor

deftk commented Jul 23, 2019

Components are synced with the server.

@Cydhra
Copy link
Member Author

Cydhra commented Jul 23, 2019

I added a bullet point for shift clicking as it isn't done yet.
Syncing requires more testing, but the server->client seems to work properly. Client->Server must still be done, afaik?

@Cydhra
Copy link
Member Author

Cydhra commented Jul 23, 2019

For machines that is, multiblocks do not sync, yet.

@deftk
Copy link
Contributor

deftk commented Jul 23, 2019

Multiblock sync already finished (new commit), will be in a later pull request.

@deftk
Copy link
Contributor

deftk commented Aug 6, 2019

Current state (including #33 ):
Bidirectional sync is hopefully finished
A simple builder interface for machines to create & add its own custom tabs is available
More advanced textures were added (for EnergyMeter, FluidMeter and RedstoneModeControl)
FluidMeter draws fluids with their color & animated fluid texture

@Cydhra
Copy link
Member Author

Cydhra commented Aug 16, 2019

How is the creation of custom GUI tabs working? Can you explain in a quick example?

@deftk
Copy link
Contributor

deftk commented Aug 16, 2019

In TileEntityAlloySmeltery and TileEntityRefineryController is already an example

@Cydhra
Copy link
Member Author

Cydhra commented Aug 17, 2019

This might require some more work, but I guess not now, otherwise Beta is never gonna happen.

@Cydhra
Copy link
Member Author

Cydhra commented Aug 17, 2019

About the side configs: This cannot be resolved until conduits are ready, so dont worry about that for now. However this means that there is just the shift-issue and iteration on graphics remaining (we should move the latter into QA).
If you could fix the shift-issue that would be awesome, and then I think until conduits are ready, only JEI integration is the GUI related stuff remaining.

@Cydhra
Copy link
Member Author

Cydhra commented Aug 18, 2019

I added #36 so GUI refinement is no longer a goal of this issue

Cydhra added a commit that referenced this issue Aug 24, 2019
fixed shift click in gui. This regards #7 . However some GUIs are not accepting the correct items at all (e.g.: Pulverizer). This must be checked.
@Cydhra
Copy link
Member Author

Cydhra commented Oct 9, 2019

We need a way to chose different rendering methods for the same component. Example:

A machine with 2 fluid-components and one inventory-component. There is 1 input fluid and 1 output slot. Those shall be rendered normally. However, the third fluid input is marked (in some way) as an "additive" and thus shall be rendered differently to inform the player about the different requirement.
A simple example in-game is the polymerization chamber, that has an "additive input" for silica. It shall be rendered with a thinner component either left of the energy component, a tiny bar at the progress component or maybe a horizontal bar beneath everything else.

Edit: this was replaced through the system of attaching sub-guis to the left side of the main gui (for upgrades). This got rid of the need for other render modes (for now). If a specific one is desired at some point, just make an additional component for it and override autogeneration of the gui

@Cydhra
Copy link
Member Author

Cydhra commented Nov 18, 2019

Updating redstone mode from GUI is not always (in my tests only the first time) synced with the server. I was not able to cycle to "LOW"
However, sometimes the correct mode is shown on client, which is confusing.
I think the correct mode is not shown on client if the block receives a sync packet from the server anyway, e.g. when it is processing items thus updating progress.
This begs the question, why does updating progress also updates redstone mode. Isn't this unecessary network traffic?

Edit: fixed by 6138cb6

@Cydhra
Copy link
Member Author

Cydhra commented Nov 27, 2019

Another issue is with the energy bar: WAILA and TOP integration correctly sync energy to the client, however the GUI itself does not. Energy is only updated when another update happens (like switching items, progress bar etc).
I think that this may be related to an attempt to reduce traffic by joining progress and energy into a single package, however if no progress happens, no packet is sent at all. Bulk-updates are fine and the number of packets sent should be reduced in favor of few large packets. However, if only a single datum changes, it must be sent anyway.

Edit: done

@Cydhra
Copy link
Member Author

Cydhra commented Dec 13, 2019

Another bug:
If a gui has more than one tab with inventory slots, it will add all slots of all tabs initially to the first tab and you have to switch tabs to clear them out.
Check Alloy Smeltery of current master branch to see issue happening.

Edit: fixed by cf869a6

@Cydhra
Copy link
Member Author

Cydhra commented Dec 13, 2019

Feature Request:

To conveniently display stats and information about machines or multiblocks, a component should be added that supports auto-text-formatting. Formatting refers to auto-line-wrapping or tabular listing (for example to display speed-up multipliers in the machine upgrade tab)

Edit: done

Cydhra added a commit that referenced this issue Dec 27, 2019
…he active slots at registration, fixing one of the issues in #7
@Cydhra
Copy link
Member Author

Cydhra commented Mar 28, 2020

The GUIs are functional, components are implemented, and side configs are implemented.
Most GUIs are still autogenerated which will be changed in the future probably. However, this is not necessary for the beta release.
There is still some stuff to do, but it is not strongly related to this issue. Side configs have still bugs (though they are WIP currently), some components could use some more work, etc.
Overall, the gui works and can be released into beta. Therefore I'll close this issue.

@Cydhra Cydhra closed this as completed Mar 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed tracking A tracking issue for features currently worked on.
Projects
None yet
Development

No branches or pull requests

2 participants