--- Log opened Sun Jul 10 00:00:28 2016 20160710 00:06:33-!- Gejoba [~gejoba@unaffiliated/gejoba] has quit [Ping timeout: 276 seconds] 20160710 00:16:09-!- Gejoba [~gejoba@host-45-78-224-55.dyn.295.ca] has joined #wesnoth 20160710 00:16:09-!- Gejoba [~gejoba@host-45-78-224-55.dyn.295.ca] has quit [Changing host] 20160710 00:16:09-!- Gejoba [~gejoba@unaffiliated/gejoba] has joined #wesnoth 20160710 00:51:00-!- gfgtdf [~chatzilla@x4e36a4e9.dyn.telefonica.de] has quit [Quit: ChatZilla 0.9.92 [Firefox 47.0/20160604131506]] 20160710 01:06:52-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has joined #wesnoth 20160710 01:19:57-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20160710 01:20:03-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth 20160710 01:41:36-!- RatArmy [~RatArmy@om126237125092.9.openmobile.ne.jp] has quit [Ping timeout: 246 seconds] 20160710 01:43:26-!- Appleman1234 [~Appleman1@KD036012042157.au-net.ne.jp] has joined #wesnoth 20160710 02:04:02-!- celticminstrel [~celmin@unaffiliated/celticminstrel] has quit [Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] 20160710 02:13:17-!- ArneBab [~quassel@55d45bcb.access.ecotel.net] has joined #wesnoth 20160710 02:17:42-!- ArneBab_ [~quassel@55d46dca.access.ecotel.net] has quit [Ping timeout: 258 seconds] 20160710 02:21:15-!- wario [~wario_@unaffiliated/wario] has quit [Quit: Leaving] 20160710 02:41:08-!- trewe [~trewe@bl20-21-193.dsl.telepac.pt] has quit [Quit: quit] 20160710 02:56:41-!- RatArmy [~RatArmy@om126237125092.9.openmobile.ne.jp] has joined #wesnoth 20160710 03:01:33-!- ancestral [~ancestral@75-168-183-92.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20160710 03:24:34-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has quit [Quit: Connection closed for inactivity] 20160710 03:51:12-!- RatArmy [~RatArmy@om126237125092.9.openmobile.ne.jp] has quit [Ping timeout: 272 seconds] 20160710 03:57:36-!- hk238 [~kvirc@t224.ip7.netikka.fi] has joined #wesnoth 20160710 04:20:26-!- HeyCitiz` is now known as HeyCitizen 20160710 04:26:17-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has quit [Read error: Connection reset by peer] 20160710 04:30:50-!- hk238 [~kvirc@t224.ip7.netikka.fi] has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria] 20160710 04:42:08-!- hk238 [~kvirc@t224.ip7.netikka.fi] has joined #wesnoth 20160710 04:44:02-!- RatArmy [~RatArmy@om126237125092.9.openmobile.ne.jp] has joined #wesnoth 20160710 04:44:40-!- ancestral [~ancestral@75-168-183-92.mpls.qwest.net] has joined #wesnoth 20160710 04:46:34-!- Vuex [~A@80-42-132-243.dynamic.dsl.as9105.com] has quit [Ping timeout: 252 seconds] 20160710 04:59:59-!- Netsplit *.net <-> *.split quits: hk238, Ivanovic, _iwc, bool_, Vadatajs, speak, jgw, enchi, DeFender1031, EliDupree, (+6 more, use /NETSPLIT to show all of them) 20160710 05:02:56-!- Kwandulin [~Miranda@p200300760F2D81D32D3308D33C548964.dip0.t-ipconnect.de] has joined #wesnoth 20160710 05:12:56-!- iatyr [~iatyr@71-87-82-91.dhcp.krny.ne.charter.com] has quit [Quit: Leaving] 20160710 05:28:52-!- Netsplit over, joins: hk238 20160710 06:48:32-!- RatArmy [~RatArmy@om126237125092.9.openmobile.ne.jp] has quit [Ping timeout: 272 seconds] 20160710 07:35:59-!- RatArmy [~RatArmy@om126237125092.9.openmobile.ne.jp] has joined #wesnoth 20160710 07:53:01-!- RatArmy [~RatArmy@om126237125092.9.openmobile.ne.jp] has quit [Quit: Konversation terminated!] 20160710 07:58:28-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth 20160710 08:34:47-!- speak [~speak@grumpyhedgehog.me] has joined #wesnoth 20160710 08:53:44-!- DeFender1031 [~DeFender1@93-173-38-76.bb.netvision.net.il] has joined #wesnoth 20160710 08:53:44-!- Vorpal [~Vorpal@unaffiliated/vorpal] has joined #wesnoth 20160710 08:53:57-!- bool_ [~bool_@unaffiliated/bool-/x-1030778] has joined #wesnoth 20160710 08:53:57-!- jgw [~jake@unaffiliated/jgw] has joined #wesnoth 20160710 08:53:57-!- Vadatajs [~Vadatajs@63-152-112-35.cdrr.qwest.net] has joined #wesnoth 20160710 08:53:57-!- Jetrel [~Jetrel@c-73-228-139-39.hsd1.mn.comcast.net] has joined #wesnoth 20160710 08:53:57-!- _iwc [~iwc@static.184.80.201.138.clients.your-server.de] has joined #wesnoth 20160710 08:54:07-!- ChipmunkV [~vova@d0017-2-88-172-31-68.fbx.proxad.net] has joined #wesnoth 20160710 08:54:07-!- Samual [~Samual@xonotic/core-team/Samual] has joined #wesnoth 20160710 08:54:07-!- enchi [enchilado@defocus/yummy/enchilado] has joined #wesnoth 20160710 08:54:07-!- Ivanovic [~ivanovic@wesnoth/developer/ivanovic] has joined #wesnoth 20160710 08:54:07-!- EliDupree [~quassel@idupree.com] has joined #wesnoth 20160710 08:54:07-!- vincent_c [~bip@vcheng.org] has joined #wesnoth 20160710 08:54:07-!- dobson [~dobson@68.ip-149-56-14.net] has joined #wesnoth 20160710 09:24:06-!- ChipmunkV [~vova@d0017-2-88-172-31-68.fbx.proxad.net] has quit [Quit: ChipmunkV] 20160710 09:46:54-!- RatArmy [~RatArmy@om126212092126.11.openmobile.ne.jp] has joined #wesnoth 20160710 09:54:17-!- ArneBab [~quassel@55d45bcb.access.ecotel.net] has quit [Ping timeout: 260 seconds] 20160710 09:55:36-!- ArneBab [~quassel@55d46c46.access.ecotel.net] has joined #wesnoth 20160710 10:12:58-!- wario [~wario_@unaffiliated/wario] has joined #wesnoth 20160710 10:16:51-!- bool_ [~bool_@unaffiliated/bool-/x-1030778] has quit [Ping timeout: 240 seconds] 20160710 10:25:44-!- ChipmunkV [~vova@d0017-2-88-172-31-68.fbx.proxad.net] has joined #wesnoth 20160710 11:28:24-!- RatArmy [~RatArmy@om126212092126.11.openmobile.ne.jp] has quit [Ping timeout: 276 seconds] 20160710 12:28:24-!- Kwandulin [~Miranda@p200300760F2D81D32D3308D33C548964.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20160710 12:43:03-!- RatArmy [~RatArmy@om126212092126.11.openmobile.ne.jp] has joined #wesnoth 20160710 12:53:55-!- RatArmy [~RatArmy@om126212092126.11.openmobile.ne.jp] has quit [Quit: Konversation terminated!] 20160710 13:09:38-!- Vuex [~A@80-42-132-243.dynamic.dsl.as9105.com] has joined #wesnoth 20160710 13:35:45-!- Vadatajs [~Vadatajs@63-152-112-35.cdrr.qwest.net] has quit [Quit: Leaving] 20160710 13:37:09-!- Vadatajs [~Vadatajs@63-152-112-35.cdrr.qwest.net] has joined #wesnoth 20160710 13:43:14-!- celticminstrel [~celmin@unaffiliated/celticminstrel] has joined #wesnoth 20160710 13:46:30-!- Kwandulin [~Miranda@p200300760F2D81D3D55FFB51ED174BCF.dip0.t-ipconnect.de] has joined #wesnoth 20160710 13:59:54-!- lipkab [~the_new_l@apn-94-44-255-33.vodafone.hu] has joined #wesnoth 20160710 14:24:35-!- hk238 [~kvirc@t224.ip7.netikka.fi] has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria] 20160710 14:40:26-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth 20160710 14:40:31-!- noy [~Noy@wesnoth/developer/noy] has quit [Client Quit] 20160710 14:55:38-!- ancestral [~ancestral@75-168-183-92.mpls.qwest.net] has joined #wesnoth 20160710 15:06:18-!- Kwandulin [~Miranda@p200300760F2D81D3D55FFB51ED174BCF.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20160710 15:06:22-!- lipkab [~the_new_l@apn-94-44-255-33.vodafone.hu] has quit [Remote host closed the connection] 20160710 15:40:43-!- hk238 [~kvirc@t224.ip7.netikka.fi] has joined #wesnoth 20160710 16:03:40-!- Kwandulin [~Miranda@p200300760F2D81D37573B34518F3762E.dip0.t-ipconnect.de] has joined #wesnoth 20160710 16:48:18-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has joined #wesnoth 20160710 16:48:23-!- iatyr [~iatyr@71-87-82-91.dhcp.krny.ne.charter.com] has joined #wesnoth 20160710 17:05:06-!- ancestral [~ancestral@75-168-183-92.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20160710 17:16:16-!- ancestral [~ancestral@75-168-183-92.mpls.qwest.net] has joined #wesnoth 20160710 17:28:39-!- ancestral [~ancestral@75-168-183-92.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20160710 18:22:12-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has quit [Ping timeout: 250 seconds] 20160710 18:27:39-!- edaq [~edaq3@h184-60-40-94.cytnin.broadband.dynamic.tds.net] has quit [Ping timeout: 276 seconds] 20160710 18:35:03-!- hk238 [~kvirc@t224.ip7.netikka.fi] has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria] 20160710 18:47:38< DeFender1031> vultraz, I know it's not thursday yet, but I had some free time today. I think I get the gist of how dialog stuff works, though some parts of the dialog stuff aren't well documented (for example, it's unclear what the mandatory "helptip" and "tooltip" are, and https://wiki.wesnoth.org/GUIVariable#section is just placeholder text). It seems to be somewhat similar to html in the sense that there are elements (widgets), and that 20160710 18:47:39< DeFender1031> those elements have IDs and can be updated dynamically from the callbacks via their IDs. Knowing that, it seems to be simply a matter of making or duplicating whatever layout I want by combining grids, rows, and columns with other widgets. My questions therefore are mostly about what's possible here, and how to tell what the exact layout of an existing dialog is. For example, would there be a way for me to either add custom 20160710 18:47:41< DeFender1031> widgets to the bottom of the existing objectives dialog or somehow replace it with my own dialog which mimics the existing one? I found lua/wml/objectives.lua, but the extent of the layout code that I see there seems to just be defining a single formatted string which it then sets on some seemingly internal variable. 20160710 18:48:01-!- Kwandulin [~Miranda@p200300760F2D81D37573B34518F3762E.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20160710 18:48:36< vultraz> ahah 20160710 18:48:40< vultraz> you are delving into deep waters 20160710 18:48:49< vultraz> deep, dark waters 20160710 18:49:01< DeFender1031> that's me. If i'm going to learn something, i want to learn it to its fullest. 20160710 18:49:13< vultraz> Well, where do I start 20160710 18:49:21< vultraz> Helptip/tooltip 20160710 18:49:43< vultraz> These are mandatory tags in every dialog because they tell the dialog what definition to use for the tooltip or helptips 20160710 18:49:54< vultraz> helptips are basically unused and I should just get rid of them 20160710 18:50:00< vultraz> (are you on 1.12 or 1.13?) 20160710 18:50:16< DeFender1031> 1.12 20160710 18:50:28< vultraz> Ok 20160710 18:50:46< vultraz> Well, you know that tooltip you see on the bottom of the screen when you mouseover certain thing? 20160710 18:50:48< DeFender1031> i'm not sure what definitions do either, actually. 20160710 18:50:52< DeFender1031> yeah 20160710 18:51:04< vultraz> In 1.13 I have that changed to floating tooltips at mouse location 20160710 18:51:27< vultraz> Simply by changing the key in [tooltip] 20160710 18:51:36< vultraz> Now, what is a definition you ask? 20160710 18:51:46< vultraz> Every widget has a definition 20160710 18:51:56< vultraz> Every window has a layout 20160710 18:52:38< vultraz> Widgets are placed in a grid system within a window, 1 widget per block. 20160710 18:52:46< vultraz> you can have subgrids 20160710 18:53:02< DeFender1031> right, that part makes sense to me 20160710 18:53:20< DeFender1031> it's basically layout with tables. 20160710 18:53:47< vultraz> widget definitions are selected with the definition= key 20160710 18:53:55< vultraz> most of the time it can be omitted, and you'll get Default 20160710 18:54:03< vultraz> Windows are *also* widgets. 20160710 18:54:14< DeFender1031> hmm 20160710 18:54:15< vultraz> Well 20160710 18:54:25< vultraz> Windows, or dialogs, use a window widget 20160710 18:54:43< vultraz> That window widget is set in the definition key of the [resolution] tag 20160710 18:54:57< vultraz> Window widgets are basically the dialog backgrounds 20160710 18:54:59< vultraz> for example 20160710 18:55:03< DeFender1031> you lost me. 20160710 18:55:10< DeFender1031> what's the [resolution] tag? 20160710 18:55:11< vultraz> the tooltips use their own definition of the window widget 20160710 18:55:37< vultraz> DeFender1031: look in data/core/gui/default/windows 20160710 18:55:39< vultraz> open a file 20160710 18:56:13< vultraz> that resolution tag is basically a mandatory part of GUI WML... 20160710 18:56:15< vultraz> *BUT* 20160710 18:56:30< vultraz> when constructing a dialog from *lua*, one works with that tag as the base 20160710 18:56:30< DeFender1031> i don't have such a file 20160710 18:56:44< vultraz> DeFender1031: sorry, data/gui/default 20160710 18:57:02< DeFender1031> oh 20160710 18:57:07< DeFender1031> i get it 20160710 18:57:12< vultraz> In lua, you write dialog tables as if you're under the resolution tag 20160710 18:57:17< DeFender1031> there's wml here for all the in-game dialogs 20160710 18:57:20< vultraz> so say you start 20160710 18:57:22< vultraz> local main_window = { 20160710 18:57:24< vultraz> maximum_height = 500, 20160710 18:57:25< vultraz> maximum_width = 700, 20160710 18:57:36< vultraz> in WML, there would be a [resolution] tag wrapping these 20160710 18:57:41< vultraz> but in Lua that's not necessary 20160710 18:57:47< DeFender1031> right 20160710 18:59:07< vultraz> Now 20160710 18:59:28< vultraz> game objectives are displayed in a transient_message dialog 20160710 18:59:35< vultraz> you should see the file there 20160710 18:59:45< vultraz> it uses the 'message' window widget defintion 20160710 18:59:52< vultraz> which makes it transparent 20160710 19:00:33< DeFender1031> so a definition is some pre-defined behavior? 20160710 19:00:39< vultraz> Layout 20160710 19:00:54< vultraz> WML doesn't control behavior at all 20160710 19:01:06< DeFender1031> i meant window behavior, but fine 20160710 19:01:11< DeFender1031> let me ask a different way 20160710 19:01:28< DeFender1031> if i were to change the definition here from "message" to "blahblah", what changes would occur? 20160710 19:01:40< vultraz> the window would look different 20160710 19:01:52< vultraz> try changing it from message to 'default' and load up a game 20160710 19:02:01< DeFender1031> so a definition defines what? the background? anything else? 20160710 19:02:23< DeFender1031> also, where are the definitions themselves defined? can i create custom definitions? 20160710 19:03:52< vultraz> a definition defines a widget's states 20160710 19:03:59< vultraz> ie, focuses, clicked, etc... 20160710 19:04:06< vultraz> but a state depends on the TYPE of widget 20160710 19:04:19< vultraz> ie, buttons would have different states than lists 20160710 19:04:25< vultraz> this is handled on the C++ side 20160710 19:04:40< vultraz> DeFender1031: you can look at the wml for definitions in data/gui/default/widgets 20160710 19:04:58< vultraz> You cannot define custom definitions in UMC, no 20160710 19:05:22< vultraz> either definitions of existing widgets, or custom widgets 20160710 19:06:21< DeFender1031> so where's the list of existing definitions? 20160710 19:06:35< DeFender1031> and i guess, how each applies to a given widget type? 20160710 19:07:36< vultraz> you'll have to look in each widget's file or set of files 20160710 19:07:43< vultraz> there's no "list" 20160710 19:07:53< vultraz> you have to figure it out yourself 20160710 19:08:03< DeFender1031> oh, i think i follow. each type of widget has ITS OWN set of potential definitions 20160710 19:08:27< DeFender1031> is that correct? 20160710 19:08:29< vultraz> yes 20160710 19:08:38< DeFender1031> and i'm currently in button_25x25 20160710 19:08:56< vultraz> there's one more fact that will make your head to hurt 20160710 19:09:09< vultraz> widgets can use other widgets in their definitions :P 20160710 19:09:27< DeFender1031> and i see {_GUI_DEFINITION "down_arrow" "Down arrow button for a scrollbar." "buttons/button_square/button_square_25" "icons/arrows/arrows_ornate_down_25" ()} so i guess this means that a 25x25 button has a definition named "down_arrow"? 20160710 19:09:37< vultraz> yes 20160710 19:09:47< DeFender1031> okay, i'm making progress. 20160710 19:09:49< DeFender1031> erm... 20160710 19:09:55< vultraz> so say you're writing a button and you want a 25x25 button with a down arrow 20160710 19:10:00< DeFender1031> actually, that makes sense 20160710 19:10:00< vultraz> you'd do 20160710 19:10:18< vultraz> [button] id = "foo" definition = "down_arrow" [/button] 20160710 19:10:41< DeFender1031> a button would have a definition that, say, contained a label that was the button's text, no? 20160710 19:11:09< vultraz> ehh 20160710 19:11:14< vultraz> not... exactly 20160710 19:11:27< DeFender1031> okay, then what did you mean about definitions containing widgets? 20160710 19:11:59< vultraz> https://github.com/wesnoth/wesnoth/blob/master/data/gui/widget/unit_preview_pane.cfg 20160710 19:12:06< vultraz> here's an example from 1.13 that I wrote 20160710 19:12:27< DeFender1031> because without that little tidbit, my internal "translate this widget stuff to html" was telling me that a definition was like a css class that i can't actually create myself 20160710 19:12:51< vultraz> what you said is just slightly wrong 20160710 19:13:01< vultraz> widgets also have a *canvas* 20160710 19:13:14< vultraz> that is, their area on the screen 20160710 19:13:23< DeFender1031> okay 20160710 19:13:25< vultraz> and certain things can be drawn there without widgets 20160710 19:13:29< vultraz> including text 20160710 19:13:53< vultraz> so you see like 20160710 19:13:56< vultraz> [background] 20160710 19:13:57< vultraz> [draw] 20160710 19:13:59< vultraz> [/draw] 20160710 19:14:00< vultraz> [/background] 20160710 19:14:02< vultraz> ? 20160710 19:14:08< DeFender1031> so it's like you can create a background image for a widget out of other widgets? 20160710 19:14:26< vultraz> no 20160710 19:14:40 * DeFender1031 falls on face in an anime sort of way. 20160710 19:14:49< vultraz> a background is something that would be set in [draw] 20160710 19:15:43< vultraz> when I said backgrounds earlier I meant the window *widget* does party handle what *backgrounds* you see in a *window/dialog*, depending on what *definition* the window *widget* is using, 20160710 19:16:28< vultraz> the whole thing about subwidgets in widgets is the same as with dialogs 20160710 19:16:30-!- Vuex [~A@80-42-132-243.dynamic.dsl.as9105.com] has left #wesnoth [] 20160710 19:16:42< vultraz> ie, a set of widgets laid out in a certain way 20160710 19:17:47< DeFender1031> wait, are you saying that for widgets which you can't directly control their contents, the definition is a predefined set of what that widget does and is? 20160710 19:18:10< vultraz> DeFender1031: take a look at this 20160710 19:18:11< vultraz> https://drive.google.com/file/d/0B-mR9s8FduLLNDJkeUF5aG9GbHM/view?usp=sharing 20160710 19:18:26< vultraz> it's not exactly how it looks in master now since things have changed, but it illustrates my point 20160710 19:18:54< DeFender1031> okay, i see this, what specifically should i be seeing? 20160710 19:18:59< vultraz> everything on the left of the dialog under the title and above the three buttons is *one widget* 20160710 19:19:03< vultraz> the Unit Preview Pane 20160710 19:19:31< DeFender1031> from the profile button to "ranged-pierce" is one widget? 20160710 19:19:40< vultraz> correct 20160710 19:19:51< DeFender1031> and the definition tells it what it's displaying? 20160710 19:20:11< vultraz> no, that's handled in C++ 20160710 19:20:23< vultraz> the definition just says 'put a label here' 20160710 19:20:28< vultraz> or 'but a button above it' 20160710 19:20:34< DeFender1031> okay 20160710 19:21:01< DeFender1031> i'm sorry, i know explaining to someone who doesn't get it immediately can be frustrating. 20160710 19:21:07< vultraz> here's what fills in the UPP widget and its sub widgets: https://github.com/wesnoth/wesnoth/blob/master/src/gui/widgets/unit_preview_pane.cpp 20160710 19:21:54< vultraz> as you can see, it's very similar to what happens with a dialog 20160710 19:21:59< DeFender1031> right 20160710 19:22:01< vultraz> with a few important differences 20160710 19:22:07< vultraz> I;ll get to that in a sec 20160710 19:22:52< vultraz> to summarize, you have windows/dialogs made up of a grid layout of widgets, each set to a specific definition, and each widget's definition may, internally, have sub-widgets 20160710 19:23:08< DeFender1031> okay 20160710 19:23:15< vultraz> because of the way gui2 is, however, you need not worry about sub-widgets at the dialog level 20160710 19:23:25< DeFender1031> and different definitions for the same widget may have different subwidgets? 20160710 19:23:37< vultraz> in fact, a more common example of sub-widgets is the scrollbars you see in a listbox 20160710 19:23:54< vultraz> yes 20160710 19:23:57< vultraz> exactly right 20160710 19:24:28< DeFender1031> though i'd imagine that the ones which are defined from the outside would remain consistent, or else there'd be no way to define them? 20160710 19:24:44< vultraz> now, what do you mean? 20160710 19:24:46< vultraz> er 20160710 19:24:52< vultraz> that was supposed to be two sentences 20160710 19:25:06< DeFender1031> like the UPP, a different definition of UPP would still have some place where it would be displaying the specific unit information? 20160710 19:25:06< vultraz> what do you mean? 20160710 19:25:22< vultraz> yes 20160710 19:25:56< DeFender1031> but it might, for example, be in a smaller space and have a scrollbar, or be arranged horizontally, or whatever? 20160710 19:25:57< vultraz> technically there's nothing that prevents you from having a definition that just displays a sprite of a unicorn, though :P 20160710 19:26:17< vultraz> yup 20160710 19:26:25< DeFender1031> well, definitions for scroll buttons just display a sprite of an arrow, no? 20160710 19:26:35< DeFender1031> okay, i think i'm getting it now. 20160710 19:27:01< vultraz> the buttons attached to scrollbars are widgets unto themselves 20160710 19:27:14< DeFender1031> and in the case of the widgets that you define your own content, definitions tend to (but are not required to) limit themselves to more mundane things like background color and the like? 20160710 19:27:15< vultraz> special definitions of the repeating_button widget 20160710 19:27:43< vultraz> yes 20160710 19:27:50< vultraz> like listboxes 20160710 19:28:16< vultraz> now, as I said before, UMC authors cannot add their own definitions or widgets 20160710 19:28:27< DeFender1031> right. 20160710 19:28:29< vultraz> since the former needs to be done in the WML in data/gui and the latter needs C++ stuff 20160710 19:28:36< vultraz> but you can create your own dialogs 20160710 19:28:38< vultraz> which is fun! 20160710 19:28:41< DeFender1031> :) 20160710 19:28:49< vultraz> so let us again look at my code: 20160710 19:28:50< DeFender1031> it IS fun 20160710 19:28:51< vultraz> https://github.com/Vultraz/Shadows_of_Deception/blob/master/lua/gui/inventory.lua 20160710 19:29:08< vultraz> down on line 236 you see 20160710 19:29:10< vultraz> wesnoth.show_dialog(dialogs.normal, inventory_preshow, inventory_postshow) 20160710 19:29:28< vultraz> dialogs.normal is just the variable with the table layout of the dialog 20160710 19:29:42< vultraz> the second two arguments are function arguments 20160710 19:29:53< vultraz> the first, what happens before the dialog shows 20160710 19:29:56< DeFender1031> well, I would imagin that UMC authors can fudge creating their own widgets by creating predefined sets of widget collections out of existing widgets. 20160710 19:30:00< vultraz> the second, what after but before it's destroyed 20160710 19:30:11< DeFender1031> (Not nearly as much control, but whatever) 20160710 19:30:23< vultraz> DeFender1031: ehh... perhaps.. 20160710 19:30:27< vultraz> but as you say, not as much control 20160710 19:30:33< vultraz> anyway 20160710 19:31:12< DeFender1031> right. 20160710 19:31:35< vultraz> preshow is used to set widget values and callbacks 20160710 19:31:51< vultraz> you should try to keep it free of extraneous function definitions, for example. 20160710 19:31:54< vultraz> as you can see 20160710 19:32:04< vultraz> I define functions outside of preshow 20160710 19:32:09< vultraz> inventory_preshow, I mean 20160710 19:32:29< vultraz> some are called inside that function, or used as callback arguments 20160710 19:32:36< DeFender1031> well that's just a scoping and efficiency thing, no? 20160710 19:32:44< vultraz> yes 20160710 19:32:54< DeFender1031> no reason to recreate the same functions every time if they're going to stay the same 20160710 19:33:33< DeFender1031> lua's scoping rules are pretty similar to javascript's, which is the main language i work in these days, so you don't have to worry about that with me 20160710 19:33:44< vultraz> great :) 20160710 19:34:11< DeFender1031> there ARE cases where you need to define a new function inside a closure though, and i'm well versed in the whys and why nots. 20160710 19:34:13< vultraz> here's what the dialog in question looks like https://dl.dropboxusercontent.com/u/95558676/current_inventory.png 20160710 19:34:26< vultraz> and here is the layout table: https://github.com/Vultraz/Shadows_of_Deception/blob/master/lua/gui/dialogs/inv.lua 20160710 19:34:41< DeFender1031> okay 20160710 19:35:36< vultraz> so for your own dialog, you need the table, a preshow function, and (usually not necessary and its argument may be omitted), a postshow function 20160710 19:35:44< vultraz> those are the three arguments to wesnoth.show_dialog 20160710 19:36:02< vultraz> in my case, I put the call to that inside a custom WML tag 20160710 19:36:17< DeFender1031> right. postshow is if you want to get information about what closed the dialog... used mostly when you have "okay" vs. "cancel"? 20160710 19:36:25< vultraz> so I can just say [show_inventory][/show_inventory] in my scenario fiel and it appears 20160710 19:36:29< DeFender1031> right, that i see 20160710 19:36:37< vultraz> file 20160710 19:36:57< vultraz> well 20160710 19:37:12< vultraz> return vs cancel is a little different 20160710 19:38:19< vultraz> you don't technically need a postshow event to handle that 20160710 19:38:25< DeFender1031> hmm 20160710 19:38:29< vultraz> wesnoth.show_dialog returns the dialog's return value 20160710 19:38:34< DeFender1031> oh right 20160710 19:38:40< DeFender1031> yeah, i got confused 20160710 19:38:41< vultraz> the [button] widget has a return_value key 20160710 19:38:49< DeFender1031> then what's postshow useful for? 20160710 19:38:50< vultraz> so if you set that, then you can just check like 20160710 19:38:55< DeFender1031> right right 20160710 19:38:57< vultraz> if wesnoth.show_dialog == 0 or something 20160710 19:39:09< DeFender1031> well, you'd need a function call there, but sure 20160710 19:39:14< vultraz> postshow is honestly not that useful in most cass 20160710 19:39:15< vultraz> cases 20160710 19:39:32< DeFender1031> okay 20160710 19:39:55< vultraz> the most common use case is getting a list selection before the dialog is destroyed 20160710 19:39:59< vultraz> so say, you have a list 20160710 19:40:05< vultraz> you select an option 20160710 19:40:11< vultraz> then you get that option in postshow 20160710 19:40:24< DeFender1031> ah... right 20160710 19:40:28< DeFender1031> that makes sense 20160710 19:41:46< vultraz> I think technically postshow happens after the dialog disappears from the screen but before it's destroyed 20160710 19:41:52< vultraz> meaning you can still access the layout 20160710 19:41:59< vultraz> but that's a technical implementation detail 20160710 19:42:19< DeFender1031> so back to tooltip, that's mandatory because by setting the definition on it, it wil change how tooltips show up? (meaning I can set which definition tooltips will use)? 20160710 19:42:39< DeFender1031> yeah, when it happens hardly matters so long as the data is available. 20160710 19:42:48< vultraz> the simple rule of thumb is preshow = setup, postshow = info fetch 20160710 19:42:57< DeFender1031> right 20160710 19:43:05< vultraz> DeFender1031: you can make different tooltips display *for that dialog* 20160710 19:43:17< DeFender1031> of course. 20160710 19:43:26< vultraz> any widgets inside it that support tooltips (like buttons), will use that definition 20160710 19:43:39< DeFender1031> i wouldn't expect that setting a tooltip definition on my custom dialog would change it for some random other dialog elsewhere 20160710 19:43:39< vultraz> sadly, the floating tooltip definition sucks in 1.12 20160710 19:43:42< vultraz> I improved it in 1.13 20160710 19:43:46< DeFender1031> ah 20160710 19:43:53< vultraz> so you should just stick with the existing value 20160710 19:43:59< vultraz> default_large or whatever it is 20160710 19:44:23< vultraz> so, any questions? 20160710 19:44:55< DeFender1031> i also noticed that if you set things like labels directly on the widgets you pass the table definition for the first parameter, that works too (though obviously, if you're trying to create re-usable table definitions, it makes sense to not explicitly set details that will vary from load to load) 20160710 19:45:24< vultraz> yes, you can do that 20160710 19:45:31< vultraz> or you can set it in preshow 20160710 19:45:35< vultraz> or you can do both :D 20160710 19:45:45< DeFender1031> or mix and match 20160710 19:45:47< vultraz> or you can set it in the definition, or preshow, and change it in some other callback 20160710 19:45:53< DeFender1031> indeed. 20160710 19:46:49< DeFender1031> okay, so then i'll probably have questions about how specific widgets or definitions work. I'll have to go figure out what definitions exist for various things (probably by just trying them out and seeing how they look, I assume) 20160710 19:47:26< DeFender1031> and to see what layouts built-in dialogs use, it's all in that window directory? 20160710 19:47:42< vultraz> yes 20160710 19:48:09< vultraz> there's a lot to learn about tweaking layouts 20160710 19:48:12< vultraz> but I'll explain that later 20160710 19:48:12< DeFender1031> then i'll probably end up having to ask which files specific dialogs appear in, as some of them are not so easily named. 20160710 19:48:39< DeFender1031> so then my question is, can i replace existing dialogs with my own? 20160710 19:48:51< DeFender1031> (or modify them) 20160710 19:48:55< vultraz> how to use grow_factor correctly, about horizontal/vertical_alignment, use of subgrid, etc 20160710 19:49:04< vultraz> you cannot 20160710 19:49:08< DeFender1031> hmm 20160710 19:49:28< DeFender1031> so no way i could add special instructions with icons and fun stuff to the scenario objectives screen? 20160710 19:49:49< vultraz> that is correct 20160710 19:49:54< DeFender1031> :/ 20160710 19:50:51< vultraz> honestly, this whole system is complicated and truthfully, never finished 20160710 19:51:09< vultraz> the person who started it 8 years ago left before completing it 20160710 19:51:14< DeFender1031> ouch. 20160710 19:51:18< vultraz> so we're left with a system that works... but not very well 20160710 19:51:26< vultraz> you should see the c++ side 20160710 19:51:29< vultraz> templates for days 20160710 19:51:41< vultraz> anyway 20160710 19:51:46< vultraz> good luck with the dialog 20160710 19:51:52< DeFender1031> thanks. 20160710 19:51:59< vultraz> i'm going to try to grab some more sleep before i need to get up for real 20160710 19:52:06< DeFender1031> ah 20160710 19:52:17< DeFender1031> then we can continue this another day 20160710 19:52:21< DeFender1031> thanks for all the help 20160710 19:52:25< DeFender1031> and sleep well 20160710 19:52:31< vultraz> leave a message if you have more questions :_ 20160710 19:52:31< DeFender1031> i should be going myself soon. 20160710 19:52:32< vultraz> :) * 20160710 19:52:35< vultraz> thanks 20160710 19:52:42-!- claymore2 [~hexchat@host86-166-93-91.range86-166.btcentralplus.com] has joined #wesnoth 20160710 20:42:59-!- claymore2 [~hexchat@host86-166-93-91.range86-166.btcentralplus.com] has quit [Quit: Leaving] 20160710 21:33:58-!- bool_ [~bool_@unaffiliated/bool-/x-1030778] has joined #wesnoth 20160710 21:36:07-!- trewe [~trewe@bl20-10-161.dsl.telepac.pt] has joined #wesnoth 20160710 21:44:04-!- Appleman1234 [~Appleman1@KD036012042157.au-net.ne.jp] has quit [Ping timeout: 252 seconds] 20160710 22:13:06-!- Appleman1234 [~Appleman1@KD036012048158.au-net.ne.jp] has joined #wesnoth 20160710 22:17:58-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has joined #wesnoth 20160710 22:25:07-!- trewe [~trewe@bl20-10-161.dsl.telepac.pt] has quit [Ping timeout: 244 seconds] 20160710 22:45:08-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth 20160710 22:54:43-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [] 20160710 23:00:59< celticminstrel> DeFender1031: It's layout with tables but without colspan and rowspan. :/ 20160710 23:01:15< celticminstrel> Also, I'm pretty sure vultraz explained a whole lot of stuff that's irrelevant for Lua-based dialogs. 20160710 23:04:44< vultraz> celticminstrel: I explained the general gui2 theory 20160710 23:05:00< celticminstrel> My point exactly. 20160710 23:26:05-!- ancestral [~ancestral@75-168-183-92.mpls.qwest.net] has joined #wesnoth 20160710 23:32:49< vultraz> celticminstrel: one should understand the mechanism 20160710 23:32:59< celticminstrel> I dunno. 20160710 23:44:50-!- ChipmunkV [~vova@d0017-2-88-172-31-68.fbx.proxad.net] has quit [Quit: ChipmunkV] 20160710 23:52:26-!- wario [~wario_@unaffiliated/wario] has quit [Quit: Leaving] --- Log closed Mon Jul 11 00:00:42 2016