andlabs / andlabs/libui

Adding a uiOrientation enum.

Open
#312 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
10.9k
Forks
612
PR merge metrics
No merged PRs in 30d

Description

This enum would represent the orientation of control or other object, and could look like this:

```c
_UI_ENUM(uiOrientation) {
uiOrientationHorizontal,
uiOrientationVertical,
};
```

This would remove the need of separate methods for creation of these controls. For example, in `ui.h`, both sets of creation methods for `uiSeparator` and `uiBox` could be turned into one method for each, both looking something like:

```c
_UI_EXTERN uiBox uiNewBox(uiOrientation o);
_UI_EXTERN uiSeparator uiNewSeparator(uiOrientation o);
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.