Page 1 of 1
add a right-click event for selection-tool in cursor
Posted: Thu Aug 30, 2018 8:50 am
by kyranzor
Right now we have a left click event, and shift+left click (alt selection) event.
I request to add to the mod API a right click event, so that mods may put more interesting functionality into the mouse-based controls and selection logic.
Re: add a right-click event for selection-tool in cursor
Posted: Tue Oct 02, 2018 9:40 pm
by Rseding91
I'm not against the idea but it would need a name and have to show up in the keybindings list. However, in the base game it wouldn't *do* anything so there isn't a name to give it and it doesn't make sense to have in the keybindings list.
Re: add a right-click event for selection-tool in cursor
Posted: Wed Oct 03, 2018 12:17 pm
by eradicator
Rseding91 wrote: Tue Oct 02, 2018 9:40 pm
it would need a name
Some sort of freeform or
diagonal select ?
Re: add a right-click event for selection-tool in cursor
Posted: Wed Oct 03, 2018 6:16 pm
by Rseding91
The game at its core does not support non-rectangular bounding boxes. So it would have no way to say "does this set of entities collide with X" when X isn't a rectangular bounding box.
To change that would mean change the entire collision system in the game - and that is not likely to happen.
Re: add a right-click event for selection-tool in cursor
Posted: Wed Oct 03, 2018 7:39 pm
by eradicator
Hm. Maybe some kind of inverted selection? Or an exception for it to only show up when mods use it :x.
Re: add a right-click event for selection-tool in cursor
Posted: Thu Feb 28, 2019 4:42 am
by SyncViews
Rseding91 wrote: Tue Oct 02, 2018 9:40 pm
I'm not against the idea but it would need a name and have to show up in the keybindings list. However, in the base game it wouldn't *do* anything so there isn't a name to give it and it doesn't make sense to have in the keybindings list.
I just ran into this while thinking of nice ways to control some things without toggle buttons or multiple tools.
Maybe a mod could set a "flag" of sorts if the feature is wanted and the game only shows the control if so? Also it's not the sort of thing I ever considered rebinding, I am sure if I took a look many other games don't allow rebinding something like this even if they do general keyboard controls.
Or even let selection-tools have their own controls list that can be defined individually and potentially listed individually as well (so more like the "Select for cancel deconstruction" being the shift-click-drag option even if other things use it). I also ran into a potential case for single click, but that is easily solved by "not dragging". Maybe like:
Code: Select all
{
type = "selection-tool"
name = "route-tool",
icon = "__base__/graphics/icons/blueprint.png",
icon_size = 32,
flags = {"hidden"},
subgroup = "other",
order = "x",
stack_size = 1,
stackable = false,
selection_modes =
{
{
name="select",
default_control="mouse-button-1",
color = { r = 0, g = 1, b = 0 },
mode= {"same-force", "any-entity"}
},
{
name="add-to-selection",
default_control="SHIFT + mouse-button-1",
color = { r = 0, g = 1, b = 0 },
mode= {"same-force", "any-entity"}
},
{
name="destination",
default_control="mouse-button-2",
color = { r = 0, g = 0, b = 1 }
},
{
name="add_waypoint",
default_control="SHIFT + mouse-button-2",
color = { r = 0, g = 0, b = 1 }
}
}
},
Re: add a right-click event for selection-tool in cursor
Posted: Thu Feb 28, 2019 6:06 am
by darkfrei
Lasso/ free form selection?