[Freeciv-Dev] Re: (PR#3700) Recall previous focus unit
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Fri, 21 Mar 2003 17:01:44 -0800
"Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx> wrote:
> [a-l@xxxxxxx - Tue Mar 11 21:20:50 2003]:
>
> > I find it useful with a key that returns focus to the previous
> > focus unit, for many reasons.
> > This patch puts that on the "Keypad 5" key, which
> > previously was focus_to_next_unit(), in the GDK clients.
> > I did not delete the previously used function. Should I?
>
> Yes, please - it has no users and doesn't do anything complicated anyway.
>
> Alternately, it should be moved into control.c and rebound to a
> different key. Perhaps we can just wait to see if someone complains
> about its absence...
I removed the function. All it did was to call advance_unit_focus().
> I think this patch is basically ready (except for the above). But also:
>
> - Should recall_previous_focus() have a key_ prefix? Most of the other
> keyboard-binding functions do.
Fixed.
> - Is there an easy way to make this action recursive? Then you could go
> back several steps in your unit-advancing. Would such a feature be useful?
Could be, although I've never felt the need for it. However, in rare
cases it is useful to swap back and forth between just 2 units. For
example when you're moving a transporter, loading/unloading, and
moving the transporter some more. I left it unchanged.
> - Is it possible for the previous_focus_id unit to die, and its ID to be
> taken by a different unit? This would give buggy, but rather unharmful,
> results. Is there an easy way to prevent this?
Ok, I changed it to use a unit struct pointer instead, checking for
NULL.
Arnstein
recall_focus-2.diff.gz
Description: recall_focus-2.diff.gz
- [Freeciv-Dev] Re: (PR#3700) Recall previous focus unit,
a-l@xxxxxxx <=
|
|