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

Framework Cleanup (no more client code in fw) #666

Merged
merged 23 commits into from
Dec 8, 2023
Merged

Conversation

BenDol
Copy link
Collaborator

@BenDol BenDol commented Dec 5, 2023

Description

Reworked some major cross contamination in the framework:

  • Removed <client/...> includes from framework (we should never cross contaminate fw/client)

  • Keep GraphicalApplication abstract using ApplicationDrawEvents & ApplicationContext

  • Moved ShaderManager to the framework

  • Created UIQrCode widget

  • Discord uses update callbacks now

  • Minor additions and clean up

  • Replace image-source-base64 with image-source: base64:path/to/image

  • Added CHANGELOG.md to help with giving visibility to breaking changes

  • Readd FRAMEWORK_GRAPHICS (so we can have no graphics support)

  • Added creatureDiagonalWalkSpeed/playerDiagonalWalkSpeed setup config

  • Added getCountOrSubType to Item lua binding

  • Added startEvent to EventDispatcher (to start stored ScheduledEvent's)

  • Removed g_drawPool from the application.cpp (we use dispatchPoll)

  • Added startTime calculator when logging module starts

  • Allow commenting out otml using #

  • Added some math functions

  • Added some more helper methods to UIWidget

  • Added onHovered for only hovered widget events

  • Make getChildIndex take child as optional parameter, if not provided it returns this widgets child index

  • Added sha1Encrpyt method

  • General clean up

GraphicalApplication was the biggest offender, we need to ensure that this is a base graphical application class and not a client specific class.

Breaking API Changes

  • UIWidget property qr-code & qr-code-border replaced with UIQrCode properties code & code-border
  • image-source-base64 replaced with image-source: base64:/path/to/image
  • #include "shadermanager.h" moved to #include <framework/graphics/shadermanager.h>

…taminate fw/client)

GraphicalApplication was the biggest offender, we need to ensure that this is a base graphical application class and not a client specific class.
Created UIQrCode widget
Minor additions and clean up
# Conflicts:
#	src/client/tile.cpp
#	src/framework/core/graphicalapplication.cpp
#	src/framework/core/graphicalapplication.h
#	src/main.cpp
@BenDol BenDol requested a review from mehah December 5, 2023 04:27
src/framework/core/application.h Outdated Show resolved Hide resolved
src/framework/ui/uiwidgetimage.cpp Outdated Show resolved Hide resolved
src/framework/core/graphicalapplication.h Outdated Show resolved Hide resolved
src/framework/luafunctions.cpp Outdated Show resolved Hide resolved
@conde2 conde2 self-requested a review December 6, 2023 00:09
@BenDol
Copy link
Collaborator Author

BenDol commented Dec 6, 2023

I have some more changes coming that are necessary in this PR, @conde2 I'll need another review when ever you get the chance, once I've committed my changes.

- Readd FRAMEWORK_GRAPHICS (so we can have no graphics support)
- Added creatureDiagonalWalkSpeed/playerDiagonalWalkSpeed upgrade_classification
- Added getCountOrSubType to Item lua binding
- Added startEvent to EventDispatcher (to start stored ScheduledEvent's)
- Removed g_drawPool from the application.cpp (we use dispatchPoll)
- Added startTime calculator when logging module starts
- Allow commenting out otml using #
- Added some math functions
- Added onAdopted/onAbandoned to UIWidget for when they are added to/from parent UIWidget's
- Added some more helper methods to UIWidget
- Added visibleOnly to UIWidget getChildBefore/getChildAfter methods
- Added onHovered for only hovered widget events
- Make getChildIndex take child as optional parameter, if not provided it returns this widgets child index
- Added sha1Encrpyt method
- General clean up
@BenDol BenDol requested a review from conde2 December 6, 2023 20:02
src/framework/stdext/math.cpp Outdated Show resolved Hide resolved
src/framework/ui/uiwidget.cpp Outdated Show resolved Hide resolved
src/framework/ui/uiwidget.cpp Outdated Show resolved Hide resolved
src/framework/ui/uiwidget.cpp Outdated Show resolved Hide resolved
src/framework/ui/uiwidget.cpp Outdated Show resolved Hide resolved
src/framework/ui/uiwidget.cpp Outdated Show resolved Hide resolved
src/framework/core/config.cpp Outdated Show resolved Hide resolved
src/framework/ui/uiwidget.h Outdated Show resolved Hide resolved
@conde2 conde2 self-requested a review December 8, 2023 00:25
@conde2 conde2 merged commit c8ae6c1 into mehah:main Dec 8, 2023
10 checks passed
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.

3 participants