Jump to content

hizenxyz

Creator
  • Posts

    12
  • Joined

  • Last visited

Everything posted by hizenxyz

  1. hizenxyz

    General issues log

    I sent a DM, but the text alignment looks fixed now in 1.1.1! Thanks for the update! I'll switch back to my main implementation and see if everything is still lining up and let you know if I find anything else. For now, this can be marked resolved!
  2. hizenxyz

    General issues log

    The scroll positioning Raul helped me figure out -- it looks like it's more to do with the way I was drawing it. The text anchoring seemed to not work though.
  3. hizenxyz

    General issues log

    LUI
  4. hizenxyz

    General issues log

    So far I've been using LowerLeft alignment. This makes some of my item list generation kind of awkward (ScrollView especially), but I'm managing to workaround it so far. The only thing that's "major" is the scroll positioning which I can't seem to set.
    Fantastic extension. Has some quirks that need to be ironed out still, but bringing Carbon functionality directly into oxide as an extension so that I don't have to worry about writing #if CARBON 4 million times, it is fantastic. The author has really brought an invaluable tool to the community!
  5. hizenxyz

    General issues log

    Hi, I'm having some weird issues when using panel alignment. It seems like the TopLeft/MiddleLeft positioning doesn't work with some nested panels/texts. No matter what offset coords I place in, I can't get them to show up as they normally would using Carbon. I think I'm running 1.1.0 but there's a bug in the current download making it show 1.0.3 on startup (on the git I see this is fixed). Scrollbar is always scrolling to the bottom on creation. Is there a way to fix this or specify the scroll position? You can reach me on disc if you want sample files to see the behavior.
  6. This is really neat! I like the icons/animations. I would suggest adding some ability to toggle them and configure their placement or even frequency, opacity, etc; as some people might find them a bit distracting. Maybe an option to put them as "notifications" in one of the corners? Nice work!
  7. Version 25.6.4137

    41 downloads

    Automatically create backups for your base that you can then rollback to later. Menu command defaults to "abs.menu", but this can be modified in the settings. Most of the navigation is meant to be self-explanatory. All of the phrases should be registered and able to be updated for localization as well. Donations A big ol' thank you if you decide you wanna donate- Ko-fi: https://ko-fi.com/hizenxyz Configuration Explanations General Settings Update Check Interval (seconds): The interval that the plugin will check for updates across all bases and process any changes made to the base. By default this is every hour, but could be shortened if you feel that it should check more often or if you lower the delay between snapshots significantly. Note: This is reset on server restart. Delay Between Snapshot (seconds): The backup interval for individual bases. This is the maximum timespan between saves. Note: This is reset on server restart. Snapshot Retention Period (hours): The number of hours to keep a backup data file for before removing it from the system. Defaults to 30 days. This can be shortened if you don't want to keep backups that long. Not recommended to go longer unless you're running a server that can somehow span multiple wipes. Note: Persisting saves between wipes is not officially supported. Include Ground Resources: Whether to include resources in the backup. Include Non-Authorized Deployables: Disabled. Not currently implmented. Default behavior will include everything. Commands and Permissions Admin Permission: Gives permission to all other permissions. Toggle Menu Command: The command to toggle the main menu. Toggle Menu Permission: The required permission to toggle the main menu (admin permission will default grant). Backup Permission: The required permission to run manual backups from the interface (backups can only run from interface, so toggle menu or admin permissions are required). Rollback Permission: The required permission to run rollbacks from the interface (rollbacks can only run from interface, so toggle menu or admin permissions are required). Advanced Foundation Zone Radius: Read-only, this is just the radius used to scan foundations. Currently cannot be changed. Max Retry Attempts on Failure: How many attempts to try making a backup before giving up on the base.
    Free
  8. I'm working on something at the moment, but this is a neat idea. I'll tack it on my board of things to consider this weekend if it hasn't already been done. I generally only make plugins compatible with Carbon -- do you require Oxide compatibility?
  9. If you just want a reference using LUI, I open-sourced a plugin, AutoBuildSnapshot, that's using my (free) extension, UserPreference. You can find the source for AutoBuildSnapshot here- https://github.com/HizenLabs/Plugins.Free/tree/main/src/Carbon.Plugins/Active/AutoBuildSnapshot or, more specifically- https://github.com/HizenLabs/Plugins.Free/blob/main/src/Carbon.Plugins/Active/AutoBuildSnapshot/AutoBuildSnapshot.UserInterface.cs I'm using a lot of different types of UI components in this one, so it might be useful in seeing how it all operates. Also, UserPreference is open-source and in the same repo- https://github.com/HizenLabs/Plugins.Free/tree/main/src/Carbon.Extensions/UserPreference
  10. Version 25.6.1968

    75 downloads

    User Preference is an extension that enables plugin developers to provide a way for their users to customize their interface. Plugins can use this extension by placing a button in their application that calls the API to show the user interface options modal. Donations You won't get any extra colors, but if it makes you feel better!- Ko-fi: https://ko-fi.com/hizenxyz Note: If you want this to be optional, plugins should use the EXTENSION_USER_PREFERENCE region directive. See usage example below. Example 1 (optional dependency, recommended, using region directives): #if EXTENSION_USER_PREFERENCE using HizenLabs.Extensions.UserPreference.Data; #endif ... void Init() { #if EXTENSION_USER_PREFERENCE UserPreferenceData.SetDefaultTheme(this, MaterialTheme.CreateFromRgbHex("#FFFFFF", isDarkMode: true)); #endif } ... void ShowMenu(BasePlayer player) { #if EXTENSION_USER_PREFERENCE var userPreference = UserPreferenceData.Load(_instance, player); var theme = userPreference.Theme; string primary = theme.Primary; string onPrimary = theme.OnPrimary; var userPreferenceButton = CreateButton(cui, player, userPreference, container: headerButtons, position: new(optionsButtonX - .005f, 0, closeButtonX - .005f, 1), offset: LuiOffset.None, color: primary, textColor: primary, textKey: LangKeys.StringEmpty, commandName: nameof(CommandMenuSettings), fontSize: 14 ); #else string primary = "0.2 0.2 0.1 1"; string onPrimary = "0.9 0.9 0.9 1"; #endif // do ui stuff, using the defined color variables ... } #if EXTENSION_USER_PREFERENCE [ProtectedCommand(CommandPrefix + nameof(CommandMenuSettings))] private void CommandMenuSettings(BasePlayer player, string command, string[] args) { UserPreferenceUI.Show(this, player, onConfirm: () => UserInterface.ShowMenu(player)); } #endif For a complete example of how far you can take this, see the AutoBuildSnapshot implementation: https://github.com/HizenLabs/Plugins.Free/blob/main/src/Carbon.Plugins/Active/AutoBuildSnapshot/AutoBuildSnapshot.UserInterface.cs Example 2 (optional dependency, using PluginReference): [Info("Plugin Test", "hizenxyz", "1.0.0")] [Description("A plugin to test things.")] public class PluginTest : CarbonPlugin { [PluginReference("UserPreferencePlugin")] private CarbonPlugin userPreference; [ChatCommand("test")] private void TestCommand(BasePlayer player, string command, string[] args) { if (userPreference == null) { // Show the selection UI. userPreference.Call("Show", this, player, () => ShowConfirm(player)); } } private void ShowConfirm(BasePlayer player) { // Use the resulting values in the UI var primary = userPreference.Call<string>("GetPrimary", this, player); player.ChatMessage($"Primary: {primary}"); var secondary45Percent = userPreference.Call<string>("GetSecondary", this, player, 0.45f); player.ChatMessage($"Secondary (45% Opacity): {secondary45Percent}"); } } Example 3 (hard dependency): UserPreferenceUI.Show(this, player, onConfirm: () => Puts("Player clicked confirm!"); Example 3 continued in theme: var userPreference = UserPreferenceData.Load(this, player); var theme = userPreference.Theme; cui.v2.CreatePanel( container: parent, position: LuiPosition.MiddleCenter, offset: new(-450, -275, 450, 275), color: theme.SurfaceContainer ); cui.v2.CreateText( container: parent, position: LuiPosition.Top, offset: LuiOffset.None, color: theme.OnBackground, fontSize: 16, text: "Welcome!", alignment: TextAnchor.UpperCenter ); Themes (color palettes) are based on Material Design 3 (Material You) - https://material-foundation.github.io/material-theme-builder/ The user simply selects a color, a display mode (light/dark), and a contrast level, and a palette will be automatically generated off their selections. The available colors for use in theme are as follows: Primary Colors Primary OnPrimary PrimaryContainer OnPrimaryContainer InversePrimary Secondary Colors Secondary OnSecondary SecondaryContainer OnSecondaryContainer Tertiary Colors Tertiary OnTertiary TertiaryContainer OnTertiaryContainer Error Colors Error OnError ErrorContainer OnErrorContainer Surface & Background Surface SurfaceBright SurfaceContainerLowest SurfaceContainerLow SurfaceContainer SurfaceContainerHigh SurfaceContainerHighest SurfaceVariant OnSurface OnSurfaceVariant Background OnBackground InverseSurface InverseOnSurface Outline & Effects Outline OutlineVariant SurfaceTint Shadow Scrim Transparent (static 0 opacity black) You can either use these directly as properties of MaterialTheme, or all of these can be called from the plugin with userPref.Call<string>("Get[Option]") where [Option] is the color option above. It is recommended to use them directly and just use the #if EXTENSION_USER_PREFERENCE constant to toggle functionality.
    Free
  11. Version 25.5.39951

    47 downloads

    Extremely lightweight and simple wrapper around the server broadcast feature in carbon. This can be ran from any command area as long as you have the permissions or are running from the server console. This is made as an alternative to the "say" command which prepends messages with "SERVER". Usage is very simple: broadcast This is a public announcement! broadcast <color=orange>Server: </color>Hello, world! broadcast.icon hizen I am now just using hizen's icon! broadcast.user hizen This is something hizen would say. Permissions for each of the commands (broadcast, broadcast.icon, and broadcast.user, respectively): broadcast.use broadcast.icon broadcast.user The in-game f1 console doesn't work with html tags (<>), so I would recommend using those through the actual server console or using chat commands (eg: /broadcast <color=red> this text is red</color>)
    Free
1.8m

Downloads

Total number of downloads.

8.3k

Customers

Total customers served.

125.8k

Files Sold

Total number of files sold.

2.6m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.