Changeset 63 for trunk/UMenu.pas
- Timestamp:
- Nov 26, 2020, 1:18:19 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UMenu.pas
r62 r63 85 85 SEnglish = 'English'; 86 86 SBack = 'Back'; 87 SAutomatic = 'Automatic'; 88 SFullScreen = 'Full screen'; 87 89 88 90 … … 133 135 134 136 procedure TMenuItemComboBox.Paint(Canvas: TCanvas; P: TPoint); 137 var 138 OutputText: string; 135 139 begin 136 140 if Selected then Canvas.Brush.Color := $e78C31 137 141 else Canvas.Brush.Color := $f7bC61; 138 Bounds := Classes.Bounds(P.X, P.Y, Canvas.TextWidth(States[Index]), Canvas.TextHeight(States[Index])); 139 Canvas.TextOut(P.X, P.Y, States[Index]); 142 OutputText := Text + ': ' + States[Index]; 143 Bounds := Classes.Bounds(P.X, P.Y, Canvas.TextWidth(OutputText), Canvas.TextHeight(OutputText)); 144 Canvas.TextOut(P.X, P.Y, OutputText); 140 145 end; 141 146 … … 159 164 if (Items[I] is TMenuItemButton) then begin 160 165 if Assigned(TMenuItemButton(Items[I]).FOnClick) then 161 TMenuItemButton(Items[I]).FOnClick( nil)166 TMenuItemButton(Items[I]).FOnClick(Items[I]); 162 167 end else 163 168 if (Items[I] is TMenuItemCheckBox) then begin 164 169 (Items[I] as TMenuItemCheckBox).Checked := not (Items[I] as TMenuItemCheckBox).Checked; 165 170 if Assigned((Items[I] as TMenuItemCheckBox).FOnChanged) then 166 (Items[I] as TMenuItemCheckBox).FOnChanged( nil);171 (Items[I] as TMenuItemCheckBox).FOnChanged(Items[I]); 167 172 end else 168 173 if (Items[I] is TMenuItemComboBox) then begin … … 170 175 (Items[I] as TMenuItemComboBox).States.Count; 171 176 if Assigned((Items[I] as TMenuItemComboBox).FOnChanged) then 172 (Items[I] as TMenuItemComboBox).FOnChanged( nil);177 (Items[I] as TMenuItemComboBox).FOnChanged(Items[I]); 173 178 end; 174 179 end;
Note:
See TracChangeset
for help on using the changeset viewer.