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

Primitive tags #2

Open
D-Maxwell opened this issue Sep 30, 2022 · 2 comments
Open

Primitive tags #2

D-Maxwell opened this issue Sep 30, 2022 · 2 comments
Assignees
Labels
planned Features to be added

Comments

@D-Maxwell
Copy link
Owner

No description provided.

@D-Maxwell
Copy link
Owner Author

D-Maxwell commented Sep 30, 2022

Primitive Tags are classes of tags included in the base module.

  • Default
    • Position (pos) {int_x & str : ['a||A' || 'r||R'] ; int_y & str : ['a||A' || 'r||R']}
    • Size (sz) {int_w & int_h}
    • Background (bg) {hx : 0 <> FFFFFFFF || str : path}
    • Layout (lay) {}

F.i : crateA(pos=["48R",16]) || crateB(pos=[12,12]) || crateC(pos=["12a","12r"])

The position type is derived from the matching position type of it's nearest parent that has a defined position type.
The highest parent must have an explicit position type as they have no parent. In such a case, absolute and relative positioning will both have the same effect on that crate's final position.

F.i : a(pos=["12A","32A"]) > b(pos=[8,4]) > c(pos=["R","R"]) > d(pos=[4,4])
Here, B's position types are absolute for both axes as defined by it's nearest parent.
C redefines it's position as relative for both axes, thus D will be placed 4 units relative to C.

  • Text fields
    • Text {str}
    • Font {str : path}
    • Weight {int : 100<>900 || str : ["light", "normal", "bold"]}
    • Modifiable {bool}
    • Selectable {bool}

@D-Maxwell D-Maxwell added the planned Features to be added label Oct 7, 2022
@D-Maxwell D-Maxwell self-assigned this Oct 7, 2022
@D-Maxwell
Copy link
Owner Author

Defining the relation in the attribute value itself turned out not to be that great of an idea ; it has therefore been scrapped in favour of value types. As in, data types.
From now on, and likely forever :

  • int : value in pixels
  • float : relative to parent's corresponding attribute

Position mode does no longer cascade nor propagate to a crate's children.

As a temporary byproduct, this also fixes having to declare attributes as strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
planned Features to be added
Projects
Status: Todo
Development

No branches or pull requests

1 participant