• 1 Post
  • 31 Comments
Joined 1 year ago
cake
Cake day: June 30th, 2025

help-circle

  • Either the UI is defined in some DSL, that’s loaded (or compiled) and then you spend most of the time writing getElement(pathToElement) and wiring it up, or you have to boilerplate create each element and parent.addChild(element).

    Im saying “there are no elements” because of what OP says here, the system i’m using now doesn’t have that.

    You have a panel+border+text “primitive” drawing functions. Nothing is stopping you from creating a single function that calls all 3 of those. You probably should, since it’s probably a common pattern. You could call it DrawBoxedText. There is no difference between a DrawBoxedText function and a BoxedText element with a draw() method.

    yeah i could make a function for that, but i would argue that “here is no difference between a DrawBoxedText function and a BoxedText element with a draw() method.” there is a big difference between these. Personally i find using a function like DrawBoxedText much easier.


  • I had my own library for UI that tried to have a element model, but it was bloated and didn’t scale well. Now im drawing everything via vulkan compute shaders and its fast and looks great.

    I think the philosophy needs to switch from elements back to pixels, atleast that is what worked for me.

    i dare to say its as easy as webdev

    snippet from my game:

    DrawMenuButton(buf, btnExit, "Exit to title", exitHover, exitHover && window.mouseLeftHeld, false, font, topFontPx, exitCol);
    DrawMenuButton(buf, btnSave, "Save changes", saveHover, saveHover && window.mouseLeftHeld, false, font, topFontPx, saveCol);
    PushPanel(buf, titleRect, panelBgColor, 6.0f * s);
    PushBorder(buf, titleRect, borderColor, 6.0f * s, 1.5f * s);
    DrawText(buf, "OPTIONS", titleRect.x + titleRect.w * 0.5f, titleRect.y + titleRect.h * 0.5f + topFontPx * 0.32f, font, topFontPx, textUnfocusedColor, TextAlign::Center);
    

    this is in the draw function, and along with the other code produces this menu:





  • You don’t have to be a tankie or a wankie to recognize the fact that a loss ratio of 0% is very good for an aircraft.

    If it was a Russian or Chinese aircraft doing this then that would also be a fact.

    It’s stupid to say that a single aircraft being damaged makes the entire type worthless like many here are saying when the F-35 is the only aircraft flying these missions and come back with only damage to a single plane.

    That is not a political statement or approval of the strikes. That’s just a statement on the plane.














  • How is this not a “won’t somebody please think of the children” thing?

    Yes it is terrible this has happend, but there is a way to prevent children from accessing AI and its called parenting.

    Kids shouldn’t be using AI if it harms them, kids can’t make this choice so it should be made for them. Same with alcohol, same with porn, same with the other things restricted to children.

    But that doesn’t mean responsible adults shouldn’t be able to use it, but “won’t somebody please think of the children” litigation will make that impossible.