https://linen.dev logo
Join Discord
Powered by
# haxe-ui
  • b

    bright-gpu-74537

    06/19/2020, 7:34 AM
    just to see if it is that
  • f

    fast-rain-20339

    06/19/2020, 7:38 AM
    That partially fixed it. It's hard to explain what changed - before, this poorly set up scroll view's scrollbar was under those textfields, now it's above, but the text at the top is still the wrong z (as shown)
  • b

    bright-gpu-74537

    06/19/2020, 7:39 AM
    ok, the clipping looks off too... any chance you could create a minimal sample?
  • f

    fast-rain-20339

    06/19/2020, 7:39 AM
    Sure, but going to quickly try to add cut copy paste first 🙂
  • b

    bright-gpu-74537

    06/19/2020, 7:40 AM
    Not sure ill be able to do much about the batching issue though, the problem is that if you do "drawBox, drawText, drawImage" in kha it breaks the batching, so what when batching is enabled (which is it by default) it groups similar commands
  • b

    bright-gpu-74537

    06/19/2020, 7:41 AM
    apparently Rob is going to fix all that at some point and noBatch can be default, but at the moment if you dont use batching you get a SERIOUS perf hit on android
  • f

    fast-rain-20339

    06/19/2020, 7:41 AM
    That's alright, I may be able to hack around it (maybe using different UI views for that top bar, and compositing them with Kha?)
  • f

    fast-rain-20339

    06/19/2020, 7:41 AM
    Yeah, I imagine there would be a massive hit, draw calls would shoot up
  • b

    bright-gpu-74537

    06/19/2020, 7:41 AM
    no on html5 though apparently even on an android phone
  • b

    bright-gpu-74537

    06/19/2020, 7:42 AM
    so webgl must be doing something clever
  • f

    fast-rain-20339

    06/19/2020, 7:42 AM
    Mmh
  • f

    fast-rain-20339

    06/19/2020, 7:44 AM
    Hm, is there an easy way to get the selected text as a string (for cutting/copying?)
  • b

    bright-gpu-74537

    06/19/2020, 7:45 AM
    in that custom textfield class? Not sure... lemme take a look
  • b

    bright-gpu-74537

    06/19/2020, 7:45 AM
    (i would assuming there must be a sel start/end)
  • f

    fast-rain-20339

    06/19/2020, 7:45 AM
    There is a selection start/end position (row/col) property
  • b

    bright-gpu-74537

    06/19/2020, 7:45 AM
    private var _selectionInfo:SelectionInfo = {start: {row: -1, column: -1}, end: {row: -1, column: -1}};
  • b

    bright-gpu-74537

    06/19/2020, 7:46 AM
    and i think there is a util, two secs
  • f

    fast-rain-20339

    06/19/2020, 7:46 AM
    Ah, convert to indicies, splice _text?
  • b

    bright-gpu-74537

    06/19/2020, 7:46 AM
    private function posToIndex(pos:CharPosition)
  • f

    fast-rain-20339

    06/19/2020, 7:46 AM
    Perfect
  • b

    bright-gpu-74537

    06/19/2020, 7:47 AM
    thanks for giving the textfield some love :) I wrote it ages ago (over xmas... ... on a mac!) and havent really looked at it that much since
  • f

    fast-rain-20339

    06/19/2020, 7:48 AM
    No worries, it's kind of fun trying to emulate native behaviour haha 😛 First time contributing to an open source project too, so I've had to look into forking and stuff 🙂
  • b

    bright-gpu-74537

    06/19/2020, 7:48 AM
    :) Yeah, it was pretty cool writing it to be honest... but then once it was "done" i was like... pfftt... never again
  • f

    fast-rain-20339

    06/19/2020, 7:49 AM
    Ahh yeah. Emulating native behaviour isn't the nicest, but the satisfaction of it not feeling good and now feeling good is great
  • b

    bright-gpu-74537

    06/19/2020, 7:50 AM
    gave me a whole new respect for all the text input implementations out there and how easy it is to shit on them... the problem is they are just so fundamental that they really need to be priotised (imo) for any "not just a game" ui/app
  • f

    fast-rain-20339

    06/19/2020, 7:50 AM
    Yeah, for sure. There's a lot of edge cases that we know about subconciously, but don't recognise
  • b

    bright-gpu-74537

    06/19/2020, 7:51 AM
    defo
  • b

    bright-gpu-74537

    06/19/2020, 7:53 AM
    and from a user perspective, so simple and "basic"
  • b

    bright-gpu-74537

    06/19/2020, 7:54 AM
    still, the kha one (for the most part) i think works well, and will feel even more natural i think after you've made these updates 🙂 👍
  • f

    fast-rain-20339

    06/19/2020, 7:54 AM
    Yep 🙂
1...281282283...1687Latest