Maintaining alpha-value in editor.
Moderator: Moderators
- jph_wacheski
- Posts: 1005
- Joined: Sat Feb 16, 2008 8:10 pm
- Location: Canada
- Contact:
Maintaining alpha-value in editor.
I have noticed that when using the editors right-click-to-set-alpha-value on a colour,. that it works great, till you change the color. Then the alpha-value is reset to 1. Could this be changed so that the alpha value is maintained when tweeking the colour? I do realise I could just type the alpha in an expresion and be done with it,. however it is much more convienent simply using the editor interface.
iterationGAMES.com
Implemented.
DesignerGui, near line 540
should be:
Maybe Ville will include it
DesignerGui, near line 540
Code: Select all
var
ColorDialog : TColorDialog;
procedure TZPropertyColorEdit.OnClick(Sender: TObject);
begin
if ColorDialog=nil then
ColorDialog := TColorDialog.Create(Application);
ColorDialog.Color := ZColorToColor( Value.ColorfValue );
ColorDialog.Options := [cdFullOpen];
if ColorDialog.Execute then
begin
Value.ColorfValue := ColorToZColor(ColorDialog.Color);
UpdateProp;
ValuePanel.Color := ColorDialog.Color;
end;
end;
Code: Select all
var
ColorDialog : TColorDialog;
AlphaTemp : single;
procedure TZPropertyColorEdit.OnClick(Sender: TObject);
begin
if ColorDialog=nil then
ColorDialog := TColorDialog.Create(Application);
ColorDialog.Color := ZColorToColor( Value.ColorfValue );
ColorDialog.Options := [cdFullOpen];
if ColorDialog.Execute then
begin
AlphaTemp := Value.ColorfValue.V[3];
Value.ColorfValue := ColorToZColor(ColorDialog.Color);
Value.ColorfValue.V[3] := AlphaTemp;
UpdateProp;
ValuePanel.Color := ColorDialog.Color;
end;
end;
In the fall of 1972 President Nixon announced that the rate of increase of inflation was decreasing. This was the first time a sitting president used the third derivative to advance his case for reelection.
-=Hugo Rossi=-
-=Hugo Rossi=-
- jph_wacheski
- Posts: 1005
- Joined: Sat Feb 16, 2008 8:10 pm
- Location: Canada
- Contact:
Hay thats cool you found and remided it! I'm sure if it works and creates no additional problems that it will get included..,
Ok, here is another small thing that has been bugging me with the editor;
When editing a ZExpression,. if I navigate away from the expression, by first clicking on and expanding or collapsing a sepaerate part of the component tree, the changes to the expression are lost. This does not happen if I simply navigate to a seperate component, in that case the changes are saved properly. I am not sure if any other 'moves' cause this but I have nerrowed this annoiyng little querk down to that,. any ideas? I loose a lot of time retyping stuff currently,. as I often forget to hit TAB or click OK.
Ok, here is another small thing that has been bugging me with the editor;
When editing a ZExpression,. if I navigate away from the expression, by first clicking on and expanding or collapsing a sepaerate part of the component tree, the changes to the expression are lost. This does not happen if I simply navigate to a seperate component, in that case the changes are saved properly. I am not sure if any other 'moves' cause this but I have nerrowed this annoiyng little querk down to that,. any ideas? I loose a lot of time retyping stuff currently,. as I often forget to hit TAB or click OK.
iterationGAMES.com
mmm I don't like the idea of a window like "save changes?" but I think we can add something like a global option: "Auto-save modifications to ZExpressions". If you agree doing something like that, yes I think we can make it working, maybe using a the loss of the focus as a trigger.
In the fall of 1972 President Nixon announced that the rate of increase of inflation was decreasing. This was the first time a sitting president used the third derivative to advance his case for reelection.
-=Hugo Rossi=-
-=Hugo Rossi=-
- jph_wacheski
- Posts: 1005
- Joined: Sat Feb 16, 2008 8:10 pm
- Location: Canada
- Contact:
I am not sure what you are saying here kattle? The editor already saves the changes to the window when you leave it,. only it forgets to do so if you first open any other part of the component tree,. by pressing on any of the small + [plus signs] or clicking on the heading. I think it is just an oversight,. . not sure.
iterationGAMES.com
Actually, it seems to me that changes to the ZExpressions are saved _only_ if the OK button is pressed, and they are discarded when you leave the ZExpression... And it should be so for "design" reasons. Just tell me again what you mean, I might understand better
In the fall of 1972 President Nixon announced that the rate of increase of inflation was decreasing. This was the first time a sitting president used the third derivative to advance his case for reelection.
-=Hugo Rossi=-
-=Hugo Rossi=-
- jph_wacheski
- Posts: 1005
- Joined: Sat Feb 16, 2008 8:10 pm
- Location: Canada
- Contact:
Well just try it! If'n you type in an expression and then click on any other currenly displayed component in the tree, the change is saved,. even if you never pressed Tab or the Ok button. If however you click on one of the + or - icons or the names of other tree elements then click on one of those componenets the info you changed is lost,. . this is a frustration to me as often I change some code then move on,. and the changes are lost,. There is no editor design that I can think of that mandates the lost of the change,. why would that be a good idea,. if I chaged the data, I intend it to be changed, no?
iterationGAMES.com
Yesterday it worked in a different way for me!!! Today I understood what you meant.
There are some "random" bugs still hidden in the editor I think
We must shoot 'em all
There are some "random" bugs still hidden in the editor I think
We must shoot 'em all
In the fall of 1972 President Nixon announced that the rate of increase of inflation was decreasing. This was the first time a sitting president used the third derivative to advance his case for reelection.
-=Hugo Rossi=-
-=Hugo Rossi=-