amber

Fryy55

amber

Finally, a repo name that isn't an acronym, waow.

Offers general purpose classes/utilities I made for using in my Geode mods!

Features

  • Actions
    • ContentTo
  • General classes
    • DraggableButton - a draggable button with customizable behavior and no cocos2d::CCMenu requirements
    • LimitedTextArea - a text display node that is similar to a geode::TextInput in appearance, but is not intended for text input; setting its string to a string longer than its maximum configured length will add ellipsis at the end, massively helping render times
    • QuickNotification - a geode::Notification that has no queue, allowing them to quickly fade away without stacking, and has a color tags integration
    • ScrollBorders - an accurately positioned border for lists, similar to level lists
    • ScrollTextArea - a geode::MDTextArea-like display with no Markdown support and a color tags integration
    • Separator - a visual separator; similar to edit_vLine_001.png, but with customizable length, width, fade length, color and dynamic resizing
    • TextboxObject and TextboxChain - classes that extend DialogObject and DialogLayer to have better API and work great with custom portraits
  • Layouts
    • ListLayout - a layout you can quickly apply to, for example, a geode::ScrollLayer::m_contentLayer for a nice, scrollable list
  • Custom settings
    • WideTitleV3 - info titles in settings
  • Utilities
    • geometry.hpp - geometry-related helper functions (mainly related to cocos2d::CCRect)

See amber documentation for full reference and examples

Usage

Add amber as a dependency in your mod.json

"dependencies": {
    "fryy_55.amber": {
        "version": ">=3.0.0",
        "required": true
    }
}

After that simply include headers (e.g. #include ) and use them in your mods!

There is also a general "include everything" header (), as well as grouped headers (e.g. )

[!TIP] If you want to bring all amber entities to the global namespace you can use a using namespace amber::prelude; directive

Migration

To help you migrate between major amber versions (e.g. from v1.x.x to v2.0.0) there is special documentation. All relevant information is contained in files there (e.g. V1_TO_V2.md for v1 to v2 migration)

License

This project is distributed under the Apache-2.0 License.

See LICENSE for permissions, conditions and limitations.

3.0.0

  • Removed ColoredLabel in favor of geode::Label
    • This affects behavior/getter return types of the following classes:
      • QuickNotification
      • LimitedTextArea
      • ScrollBorders
      • TextboxChain/TextboxObject
      • WideTitleV3
  • Added rich text bool parameter to LimitedTextArea
  • Changed include paths from to
  • Updated WideTitleV3 keys

For a more detailed changelog and migration guide see V2_TO_V3.md

2.0.1

  • Improved compatibility with other mods for TextboxChain
  • TextboxChain now uses higher Z-order instead of exactly the highest on the scene
  • Updated [[nodiscard]] attribution in geometry.hpp docs

2.0.0

  • amber is now a dynamic library
  • geode::prelude behavior moved to amber::prelude
  • Removed final from classes
  • Removed random.hpp and Padding due to Geode implementing these utilities
  • Removed amber entities from geode::prelude
  • Moved classes to classes/ instead of raw root at amber/
  • Revamped ScrollBorders
  • Revamped Separator
  • Fixed and revamped ContentTo
  • WideTitleV3 now registers itself and has been improved at handling different keys
  • Changed string parameters in QuickNotification, LimitedTextArea and ScrollTextArea to views
  • Added bool updateLabel parameters to ScrollTextArea setters
  • Added:
    • ColoredLabel
    • DraggableButton
    • TextboxObject
    • TextboxChain
    • geometry.hpp
  • Added amber documentation at docs/

For a more detailed changelog and migration guide see V1_TO_V2.md

1.1.0

  • Added a new class - ListLayout
  • Fixed random.hpp erroring
  • Removed Doxygen comments from ContentTo.hpp

1.0.1

  • [CMakeLists.txt] Renamed INCLUDE to INCLUDE_DIR for clarity
  • Moved prelude.hpp to include/amber for consistency

1.0.0

  • Initial release

Original Site made by HJfod. Geode 2 parody-ish by MeFinity.

Geode-SDK is the property of the Geode Team.


This website (Geode 2, Codename Malachite) is not affiliated with the Geode Team in any way shape or form.