00:43.44 | seebs | Well, offensive name or not, I'm gonna try to get it into a beta-like state tonight. |
00:43.54 | seebs | Stupid day job being too interesting to stop working on. |
01:42.10 | Torhal | Hehe |
01:42.38 | Torhal | I know how that is. Ever since I started working on CurseForge, my will to write hobby code has withered considerably. |
02:01.55 | *** join/#riftuidev dolby (~dolby-wow@MMOI/Administrator/pdpc.silver.dolby) |
02:01.55 | *** mode/#riftuidev [+o dolby] by ChanServ |
02:58.00 | seebs | Silly question: |
02:58.41 | seebs | I just realized that Inspect.Time.Frame() is from-login. So what should I be using for real timestamps? |
02:59.43 | seebs | ahh, os.time(0 |
02:59.45 | seebs | () |
03:43.14 | starlon | heh |
04:48.17 | seebs | ooooh |
04:48.37 | seebs | what if I used pcall for user-provided callbacks instead of randomly being exceptioned out of my code in ways that result in horrible loops? |
04:48.39 | seebs | I COULD DO THAT. |
04:51.09 | Imhothar | or even xpcall |
04:54.38 | seebs | Hmm, could do. For now I'm just ignoring failures. I care not. |
04:54.43 | seebs | If you give me a bad callback, OWN FAULT |
04:57.48 | seebs | What are the smallest dimensions the Rift UI will ever report? I seem to recall being told it always says at least some number vertical and horizontal, and below that it scales without changing pixel counts. |
04:58.19 | Imhothar | 1024x768 |
04:59.03 | seebs | hmm |
04:59.17 | seebs | So, xpcall is (f, handler). pcall is (f, ...). |
04:59.27 | seebs | Does xpcall actually mean (f, handler, ...), or does it not let you pass in args? |
05:00.40 | seebs | Ahh, it does not. |
05:00.51 | seebs | So that means it wants wrappers. Which makes it fancy and annoying. But I guess I can do it. |
05:01.25 | Imhothar | well pcall might do the job just as well |
05:02.20 | seebs | Well, pcall requires me to do more work to catch/report errors. |
05:02.32 | seebs | xpcall(function() foo(bar, baz) end, handler) |
05:02.33 | seebs | isn't so bad. |
05:07.04 | Imhothar | it's a new GC object per call |
06:01.14 | *** join/#riftuidev Imhothar (bcaebc83@gateway/web/freenode/ip.188.174.188.131) |
06:30.36 | seebs | Nooooo |
06:30.42 | seebs | RiftTextfield doesn't do wordwrap. |
06:30.55 | Imhothar | aye |
06:31.00 | seebs | And I really, really, don't want to try to fake that one up. |
06:31.10 | Imhothar | nope |
06:31.23 | seebs | So I may be stalled on RP addon dev, because I cannot think of a sane way to approach this. |
06:31.52 | Imhothar | and it doesn't auto-resize so you can't add a scrollbar to it |
06:32.03 | seebs | Hmm. |
06:32.12 | seebs | Well. I could, because I figured out a workaround for the vertical part. |
06:32.38 | seebs | It's just that... if I try to fake it, I have no clean way to distinguish between line breaks I introduced and line breaks the player really typed. |
06:32.54 | Imhothar | you can't get the width of the longest line |
06:32.54 | seebs | nooooo |
06:32.59 | seebs | Well, I can. |
06:33.01 | Imhothar | so you can't find out how much to scroll |
06:33.02 | seebs | I have that one beaten. |
06:33.06 | Imhothar | reliably |
06:33.08 | seebs | It is horrible, but it works. |
06:33.18 | seebs | I just keep a hidden Text frame and settext it and get its bounds. |
06:33.31 | seebs | Seems to work well enough for vertical scrollling. |
06:33.57 | seebs | But I cannot think of a way to fake this up well enough for word wrap. Hmm. |
06:34.13 | seebs | And we know the UI has word wrap, because the mail client does it. |
06:55.38 | *** join/#riftuidev starlon (~starlon@tx-184-6-179-33.dhcp.embarqhsd.net) |
07:56.20 | *** join/#riftuidev NerfedWar (~NerfedWar@ACaen-652-1-394-103.w81-48.abo.wanadoo.fr) |
08:03.19 | seebs | Huh. That was about 8 1/2 hours AFTER most of a day's work. |
08:03.23 | seebs | No wonder I'm tired. |
08:23.25 | ZorbaTHut | honestly a lot of the widgets are in pretty bad shape right now. most of that development was done by someone else, and he's been busy on another project. Still trying to get him back. If I end up having to do it myself I will, I just have many other things that would be better served |
09:34.21 | *** join/#riftuidev Mere (~Mere@buzzbee.plus.com) |
11:57.31 | Mere | hmm, an event bug of some kind... |
13:16.24 | Mere | yep, it appears that if a player leaves the group, the addon system spams event.unit.detail.blocked events for that player... |
14:16.27 | ZorbaTHut | I'll check that out :) shouldn't be hard to fix |
15:20.38 | *** join/#riftuidev Vexx (~email@ip70-185-100-140.ga.at.cox.net) |
17:09.40 | seebs | Okay, so, idle thoughts: I am thinking it may be POSSIBLE to fake up wordwrap in a RiftTextfield. It'd be horrendously expensive for large fields, but perhaps possible! |
17:10.30 | seebs | The only real loss I see is that I'll destroy single words larger than the textfield's width, or just not wrap them. |
17:10.40 | seebs | Hmm. Destroy them. |
17:11.34 | *** join/#riftuidev ZorbaBeta (tocohl@maximilian.pavlovian.net) |
17:11.54 | Mere | couldn't you just make Zorba fix it? :) |
17:11.56 | seebs | Oohh, wait. No, that may still be too hard. |
17:12.05 | seebs | I don't know that Zorba will have time between now and 1.8. |
17:12.12 | seebs | But this one is looking really, really, hard. |
17:12.38 | seebs | I feel that any time a reasaonably well-defined text manipulation task takes me over half an hour of thought and I still don't know whether I can do it, this constitutes being "hard". |
17:13.17 | seebs | Okay, phase one. Imagine that we redefine our concept of the field, such that a newline translates to a space, and a double-newline to a newline. |
17:13.59 | seebs | We can implement this through a two-step process in which we translate all newlines to \1, then translate \1\1 to \n and \1 to ' '. |
17:14.11 | seebs | So, we have a field which is currently in this state. What we do: |
17:14.21 | seebs | 1. Do the newlines to spaces-and-newlines transformation. |
17:14.27 | seebs | 2. Set a Text frame to this text. |
17:14.40 | seebs | 3. Check its width. If it is larger than the width of the frame, we then have to wrap it. |
17:15.57 | seebs | To wrap it, we look at each line, and see whether it is too long. If it is too long, we try to find the first subline that's not too long, change that space into a newline, and try again on the rest of this line. |
17:16.17 | seebs | After each line, we insert a newline. |
17:16.35 | seebs | At the end of this, we have a thing which has width suitable for the field, at which point we can :SetText() the field with it. |
17:17.49 | seebs | The only special case is that any time we encounter a line with no spaces which is too wide, and have to insert a newline (which then permanently breaks that word at that point), we have to increase the cursor position by one if and only if the cursor was after that point. |
17:31.56 | *** join/#riftuidev Imhothar (bcaebc83@gateway/web/freenode/ip.188.174.188.131) |
17:44.46 | seebs | I may just ignore this in the hopes that Zorba magically gets an extra week to work on 1.8 and RiftTextfield ends up acquiring word wrap. |
17:51.26 | Imhothar | Praying to your favorite deity might help, too |
17:51.37 | seebs | Hmm. |
17:51.46 | seebs | I dunno, I seem to recall there's rather a backlog at the moment. |
17:52.07 | seebs | But at this point, people who were in imminent danger in 1260-1270 or so are about to get answers. |
17:52.13 | Imhothar | There's always a backlog killing all the fun |
17:52.25 | seebs | Most of which will be "you've been dead for nearly 800 years, so I guess that's not really relevant anymore, so why exactly did you stay on hold?" |
17:53.06 | seebs | So, I see basically three options. I can ignore it and hope it goes away, I can try to fix it in a sort of half-baked way which is easily broken, or I can try to fix it properly. |
17:53.15 | seebs | Pretty sure a proper fix is an order of magnitude or so too much work. |
17:55.07 | seebs | I just sorta worry that if I ignore it, it'll create too large a barrier for the non-coders trying to figure out how to use RP addons. |
17:59.12 | Imhothar | Oh well, as every addon is gonna use the RiftTextfield people will get used to it over time |
17:59.34 | Imhothar | better leave it as it is and keep up consistency |
17:59.39 | seebs | My assumption would be that it will eventually aquire :SetFont, :SetFontSize, :SetFontColor, and :SetWordwrap. |
18:00.02 | Imhothar | and auto-detect enter, tabs etc without a custom event hook |
18:02.46 | seebs | Yeah. I'm assuming the rationale of that is that it's assuming it's a single-line field and you want to tab. |
18:02.50 | seebs | Huh. |
18:03.13 | seebs | Come to think of it, a general flaw of UI item event hooks: No indication for "and I have handled it, don't do your usual thing". |
18:03.18 | Imhothar | And still you got to implement tabbing yourself |
18:03.36 | seebs | Because part of the hassle is needing to insert extra text and select it so the typing hook will delete it. |
18:07.31 | seebs | So for text field events, it might be nice to have a way to do hooks which optionally prevent the operation. |
18:08.19 | Imhothar | I'm really curious how thick the sheet between the Addon UI and the Native frames is |
18:08.41 | Imhothar | And whether some day in the distant future the "native" UI will be built with the Addon system |
18:09.28 | Imhothar | with open Lua code so we could hook an manipulate it to our desire |
18:18.49 | Imhothar | Hmm I didn't encounter the tab insert behavior you describe |
18:19.32 | Imhothar | Works fine with GetCursor and SetCursor |
18:21.36 | seebs | Huh, maybe I'm confused. Part of this is based on studying luapad. |
18:21.42 | Imhothar | from the storage viewer: pos = self:GetCursor() self:SetText(string.insert(txt, pos + 1, "\t")) self:SetCursor(pos + 1) |
18:22.08 | seebs | Anyway, my guess is that rebuilding the native UI in addon API is a long way out, partially because some of the functionality you want to make that is only safe to have if you retain control over how it's used. |
18:22.15 | Imhothar | yes, luapad does the space insertion thing, I never understood why |
18:22.36 | seebs | Huh, wonder if it's a leftover from a previous implementation. It works, anyway. I could take it out and try something else. |
18:22.49 | seebs | But consider that you can change what buttons do in combat with the base API. |
18:22.57 | seebs | If you allow code to change what buttons do... huh. |
18:23.00 | seebs | I just had a wacky idea. |
18:23.12 | seebs | No, not wacky enough. |
18:23.13 | Imhothar | that's what the secure environment is for |
18:23.22 | seebs | Well, that's the thing. |
18:23.34 | seebs | The base UI can do stuff that we can't. Like change the binding of a button while in combat. |
18:23.41 | Imhothar | ya |
18:23.49 | seebs | Because they *know* that that functionality is used only by things like ability-dragging which are safe to allow. |
18:24.19 | Imhothar | they could always keep some API calls that are restricted to Trion "addons" |
18:24.30 | seebs | Could be, but that sounds risky to me. |
18:24.32 | Imhothar | and simply fail if called from a third party Addon |
18:24.46 | seebs | It's my one real regret about the UI design -- I wish they'd started on addons about a year earlier and done the UI that way. :) |
18:25.51 | Imhothar | and dragging is technically hardware-triggered, i.e. user-triggered (ignoring fancy HIDs for now), and that could make certain features possible even in restricted lockdown |
18:27.48 | Imhothar | I find the way they did it in WoW very elegant: you got "secure" UI elements and tell them what to do on certain events like change target, cast something, drag something onto etc, but you have to specify this behavior before entering combat |
18:28.29 | seebs | Well, right now, you can drop an ability on the mouse from code. But yeah. |
18:28.44 | seebs | I wouldn't mind seeing a migration in that direction. |
18:28.50 | Imhothar | I'm very keen on what the Trion team comes up with |
18:29.00 | seebs | I've been busy on other stuff, so I haven't looked to see whether I can do my own action bars yet. |
18:29.08 | seebs | I very much want the ability to make action bars. |
18:29.16 | seebs | But what I *really* want is for someone else to do it for me. |
18:29.22 | Imhothar | autobar |
18:29.30 | Imhothar | should be the default in every damn game |
18:30.38 | seebs | Not familiar with it. |
18:30.39 | Imhothar | it's just so logical to have the action bar do basic decisions like "oh, this button had a healing potion, but the player ran out of healing potions. But there are other healing consumables in the ivnentory, so why not offer one of those instead" |
18:30.55 | seebs | Ahh, neat. |
18:31.10 | seebs | The big thing I want is to be able to change shape or # of buttons. |
18:32.32 | Imhothar | or imagine you have 10 kinds of food in your ivnentory and the action bar automatically places the enxt available on the button, from strongest to weakest so you don't have to open the bags to find the right cake |
18:32.44 | seebs | That makes sense, yeah. |
18:33.15 | Imhothar | That's basically what autobar does in WoW, place similar items on the same action button |
18:33.31 | Imhothar | that button can be "opened" to show all items queued for that button |
18:33.40 | Imhothar | for selective use |
18:34.36 | Imhothar | You still have to klick the button, but you can rely on button X to have "something that heals me" and not have buttons 5-9 wasted on healing items |
18:35.23 | Imhothar | It's a sort of automation though, so I can see some people rage about it |
18:36.08 | seebs | I got /ignored once for running Chatterbox. |
18:36.15 | seebs | The nerve of me, RPing on an RP server. |
18:36.27 | Imhothar | haha fun |
18:40.11 | seebs | Chatterbox is up nextish on my addon list, but I want to get the RP addons in place for 1.8. |
18:42.16 | seebs | meh |
18:42.36 | seebs | I want headphones, but headphones I would actually want are 30+ miles away. |
18:42.41 | seebs | I don't really feel like Out. |
18:42.50 | seebs | I think I'll just live without headphones for a bit. |
18:44.07 | Imhothar | Is your spouse shouting around random Addon names? |
18:44.23 | seebs | Not right this minute. |
18:44.29 | seebs | Although I think that was where I got Chatterbox. |
18:45.18 | Imhothar | if it had two x's it were even a reference to a music album |
18:47.12 | Imhothar | got any feature reuqests for storage viewer, in case you're using it for debugging? |
18:49.22 | Imhothar | was thinking about making a message viewer for comms testing/sniffing |
18:49.51 | Imhothar | Make it a "Rift Developer Tools Stuite" something |
18:50.03 | seebs | Maybe it'll show up in Trion Dev Tools. |
18:50.21 | seebs | I wonder if ZorbaBeta would accept patches and enhancements to TDT. |
18:50.39 | Imhothar | Together with Luapad and your remote executing code that would make quite a useful devkit |
18:50.55 | Imhothar | ya, I changed /dump to dump the argument instead of _G |
18:50.55 | seebs | I dunno, but I think RiftRC may now be a better editor than luapad. |
18:50.58 | Imhothar | found that more useful |
18:51.09 | seebs | Oh, you might wanna look at SlashPrint, which does that too. |
18:51.15 | seebs | Prints arbitrary expressions, etc. |
18:51.26 | seebs | But also much more legible output than dump() |
18:51.30 | Imhothar | oh well, changing /dump to do that was a one-liner |
18:51.47 | seebs | As I recall, luapad didn't have snippet-saving working. |
18:51.56 | Imhothar | I fixed that myself |
18:52.01 | seebs | RiftRC's gimmick includes not just saving snippets, but marking some snippets to be run automatically at login. |
18:52.57 | seebs | Oh, and constant syntax checks. :) |
18:53.16 | Imhothar | you run loadstring() on every character chang? |
18:53.45 | seebs | Ayup. It turns out that luajit is several orders of magnitude faster than typing. |
18:54.25 | Imhothar | I originally had in mind to allow StirageViewer to compress/uncompress only selected parts of the text, but unfortunately RiftTextfield is not binary-safe |
18:54.58 | Imhothar | And I believe it cuts off at \0, which is kinda unfortunate for displaying binary data |
18:55.05 | seebs | heh |
18:55.33 | seebs | Yeah, I've sort of come to think that, on modern hardware, there's no reason not to do a lot of stuff on any user change. |
18:55.48 | Imhothar | indeed |
18:56.27 | Imhothar | i run pattern searches in my search window thourhg all item types the user owns on any character and it's not noticeable |
18:57.02 | Imhothar | considering how slowly humans type... |
18:57.54 | seebs | Yeah. Same deal for my items-owned tooltips. |
18:58.09 | seebs | I'm pretty sure I'm actually duping the entire table of everything the player owns before filtering it. |
18:59.42 | seebs | I suppose I could hack around the RiftTextField thing a bit by splitting the editor into two parts, a small editor and a larger text field below it showing what it actually looks like. |
19:00.24 | Imhothar | certainly not a bad idea |
19:00.38 | seebs | I dislike it, but I may dislike it less than the currently non-functional state. |
19:01.05 | Imhothar | but... you can guarantee other players to perceive it exactly as the author types it in |
19:01.06 | seebs | I'd just show it in a Player Viewer window, except I think small screens won't have the screen real estate to have them both up at once. |
19:01.29 | seebs | I suppose I should fix the flags first. |
19:01.41 | Imhothar | Even if RiftTextfield had proper wrapping etc. it might not be guaranteed to look exactly the same in a simple Text frame |
19:01.48 | seebs | I'm fine with that, honestly. |
19:02.05 | seebs | I just want to be able to tell whether I have paragraph breaks in roughly the right places, or see the text I'm editing. |
19:02.14 | Imhothar | wysiwyg |
19:02.55 | seebs | Yeah. So having the textfield work would be awesome. Hmm. What if I had a single editor frame which displayed the contents of whichever textfield you were in? |
19:03.11 | Imhothar | how about adding text markups for building a über bio page with pictures and sparkles and stuff |
19:03.20 | seebs | Oh, hey. Idle question: Have you found any way to filter textfield contents other than retroactively editing them in the TextfieldChange handler? |
19:03.30 | seebs | Like, say, a way to reject a key-typed event? |
19:03.55 | seebs | 'cuz that would be awesome. |
19:04.06 | Imhothar | not yet |
19:04.55 | Imhothar | oh btw, in your online docs when showing the methods of a Frame type it lists only the Events |
19:05.49 | seebs | Yeah, it's... dodgy. |
19:05.54 | seebs | Hey, I could spend some time fixing that up. |
19:06.14 | seebs | Right now, it has a really naive set of rules for guessing what category to put things in. |
19:06.16 | Imhothar | <PROTECTED> |
19:06.34 | Imhothar | has=had |
19:06.55 | seebs | Yeah. Eww. |
19:07.09 | Imhothar | flagging a bool if the next TextfieldChagnge should be accepted or not |
19:07.20 | Imhothar | Eww. Exactly. |
19:07.42 | Imhothar | Now that assumes the order of events is a) consistent and b) meaningful |
19:08.17 | Imhothar | i.e. TextfieldChange -> KeyDown -> TextfieldChange and not some fancy out-of-order thingie |
19:10.23 | seebs | I have had some events demonstrably out of order, though not on a single widget. |
19:10.31 | seebs | But I can get a mousein(new) before I get mouseout(old). |
19:10.40 | Imhothar | i get that all the time |
19:10.54 | seebs | Okay, I have abstracted my rules for identifying the keyword for a thing. |
19:10.57 | Imhothar | need to "fix" those frames by doing the same stuff in MouseMove as in MouseIn |
19:12.05 | seebs | Ah-hah! Trickery. |
19:12.17 | seebs | I now have a category "UNMATCHED" for all the things that were not identified by something else. |
19:17.38 | Imhothar | Interesting, RiftButton has LeftPress, but not RightPress, MiddlePress, ... |
19:22.50 | seebs | I think I am buying Zorba's theory that the widgets are not fully finished tasks. |
19:23.00 | Imhothar | aye |
19:23.16 | Imhothar | Is Trion US or Europe? |
19:23.49 | seebs | US |
19:27.05 | seebs | Okay, BEHOLD! |
19:27.10 | seebs | http://www.seebs.net/rift/pts |
19:27.14 | seebs | MUCH more usable. |
19:27.20 | Imhothar | BEHOLDING |
19:27.41 | Imhothar | weee magic! |
19:28.15 | Imhothar | where is http://www.seebs.net/rift/live ? |
19:28.38 | seebs | Doesn't exist, because I am too lazy. |
19:28.53 | seebs | I will probably make it and update it when 1.8 goes live and I suddenly care. |
19:28.53 | Imhothar | where are the unified diffs between pts and live docs? |
19:29.03 | seebs | I haven't gotten the patch to make those yet. :P |
19:29.11 | seebs | Actually a sorta cool idea, though. |
19:29.43 | seebs | .... argh |
19:29.49 | seebs | I have totally lost whatever I was doing. |
19:30.01 | seebs | I think... uhm. |
19:30.08 | seebs | I was... There was a thing. |
19:30.14 | Imhothar | RiftTextfield? |
19:30.17 | Imhothar | again? |
19:30.28 | seebs | Ohh, I remember. |
19:30.35 | seebs | You pointed out that a frame showed only the events. |
19:30.54 | seebs | And I fixed that! |
19:31.02 | Imhothar | And I salute you |
19:31.12 | seebs | The funny thing is, by the time I was looking at it I had forgotten why I was looking at it. So I just fixed everything in sight. |
19:31.25 | seebs | There is now a category UNMATCHED for any items that don't fit one of the rules. |
19:31.26 | Imhothar | very noble |
19:31.35 | Imhothar | you mentioned that |
19:31.38 | seebs | Nobility's just another word for forgot what I am doing. |
19:31.52 | seebs | Basically, I'm stateless. |
19:31.58 | seebs | I have no memory of what I've recently said or done. |
19:32.10 | seebs | So I will tell people the same stories many times because I don't know that I've told them. |
19:32.16 | seebs | On the other hand, I'm really fast. |
19:32.35 | Imhothar | It's like a goldfish, seeing something new every 3 seconds |
19:32.38 | seebs | Yeah. |
19:32.59 | seebs | It's... basically, if everyone were like me, it would suck. But having a few people like me around is really useful. |
19:33.45 | seebs | I think I may move UI.* to their own category. |
19:35.26 | seebs | Yeah, that's better than having CreateContext and CreateFrame be their own categories. |
19:39.21 | seebs | oooh food |
19:39.26 | seebs | I'm gonna go obtain food. |
19:39.31 | Imhothar | enjoy |
20:44.18 | seebs | noooo |
20:44.29 | seebs | :GetHeight() is wrong on a text field with :SetWordwrap(true) |
20:45.52 | seebs | I think I am now truly defeated. I can't make text frames with wordwrap work even if they're not textfields. |
20:49.00 | seebs | Wait. |
20:49.16 | seebs | They... huh, that's interesting. They work when they've actually been rendered, or something. |
20:49.27 | seebs | Because the textfields in my tooltips are getting the right values. |
20:50.35 | seebs | weeeird |
20:50.44 | seebs | Okay, now I'm stumped. |
20:52.55 | seebs | I have a frame which is not showing height as expected, and another which is. And I can't figure out why. |
20:57.23 | seebs | oh |
20:57.31 | seebs | because I am not setting wordwrap on it |
22:27.57 | seebs | Okay, there are still a lot of nuisances. Like textfields not having :SetEnabled. Or :SetWordwrap. Or :LoveUsForOurselves. |
22:28.09 | seebs | But as proof of concept go, it's pretty concepty. |
22:28.19 | seebs | Next pass will be making flags work. |
22:29.44 | *** join/#riftuidev Leoon5k (Leoon5k@247.162.9.46.customer.cdi.no) |
23:41.30 | starlon | What are you working on, seebs? |
23:41.45 | starlon | can't keep his mind on reading stuff atm.lol |
23:42.25 | starlon | oh he's not here |
23:44.24 | starlon | wb Cairenn |
23:44.27 | Cairenn | hi hi |
23:47.28 | starlon | Another good argument in favor of using LibStub in Rift is shear portability. I didn't have to edit so much of LibScriptable to port it. |