- Timestamp:
- Dec 9, 2024, 3:04:44 PM (5 weeks ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormMain.lfm
r101 r103 1 1 object FormMain: TFormMain 2 2 Left = 534 3 Height = 9593 Height = 1027 4 4 Top = 223 5 5 Width = 1491 … … 42 42 OnClick = MenuItemFullScreenClick 43 43 end 44 object MenuItemColorPalette: TMenuItem 45 Caption = 'Color palette' 46 end 47 object MenuItemTileSkin: TMenuItem 48 Caption = 'Tile skin' 49 end 44 50 end 45 51 object MenuItemTools: TMenuItem -
trunk/Forms/FormMain.lrj
r86 r103 4 4 {"hash":380871,"name":"tformmain.menuitem5.caption","sourcebytes":[86,105,101,119],"value":"View"}, 5 5 {"hash":131549534,"name":"tformmain.menuitemfullscreen.caption","sourcebytes":[70,117,108,108,32,115,99,114,101,101,110],"value":"Full screen"}, 6 {"hash":203534229,"name":"tformmain.menuitemcolorpalette.caption","sourcebytes":[67,111,108,111,114,32,112,97,108,101,116,116,101],"value":"Color palette"}, 7 {"hash":41409278,"name":"tformmain.menuitemtileskin.caption","sourcebytes":[84,105,108,101,32,115,107,105,110],"value":"Tile skin"}, 6 8 {"hash":5989939,"name":"tformmain.menuitemtools.caption","sourcebytes":[84,111,111,108,115],"value":"Tools"}, 7 9 {"hash":322608,"name":"tformmain.menuitemhelp.caption","sourcebytes":[72,101,108,112],"value":"Help"} -
trunk/Forms/FormMain.pas
r102 r103 28 28 MenuItem5: TMenuItem; 29 29 MenuItem6: TMenuItem; 30 MenuItemColorPalette: TMenuItem; 31 MenuItemTileSkin: TMenuItem; 30 32 MenuItemFullScreen: TMenuItem; 31 33 MenuItemMovesHistory: TMenuItem; … … 58 60 MoveBuffer: array of TMoveDirection; 59 61 MoveBufferLock: TCriticalSection; 62 procedure MenuItemTileSkinClick(Sender: TObject); 63 procedure MenuItemColorPaletteClick(Sender: TObject); 60 64 procedure AddToMoveBuffer(Direction: TMoveDirection); 61 65 procedure ProcessMoveBuffer; … … 179 183 180 184 procedure TFormMain.FormCreate(Sender: TObject); 185 var 186 TileSkin: TTileSkin; 187 ColorPalette: TColorPalette; 188 MenuItem: TMenuItem; 181 189 begin 182 190 MoveBufferLock := TCriticalSection.Create; … … 186 194 MoveThread.Start; 187 195 ControlStyle := ControlStyle + [csOpaque]; 196 197 for TileSkin := Low(SkinText) to High(SkinText) do begin 198 MenuItem := TMenuItem.Create(MenuItemTileSkin); 199 MenuItem.RadioItem := True; 200 MenuItem.AutoCheck := True; 201 MenuItem.Tag := Integer(TileSkin); 202 MenuItem.Caption := SkinText[TileSkin]; 203 MenuItem.OnClick := MenuItemTileSkinClick; 204 MenuItemTileSkin.Add(MenuItem); 205 end; 206 207 for ColorPalette := Low(ColorPaletteText) to High(ColorPaletteText) do begin 208 MenuItem := TMenuItem.Create(MenuItemColorPalette); 209 MenuItem.RadioItem := True; 210 MenuItem.AutoCheck := True; 211 MenuItem.Tag := Integer(ColorPalette); 212 MenuItem.Caption := ColorPaletteText[ColorPalette]; 213 MenuItem.OnClick := MenuItemColorPaletteClick; 214 MenuItemColorPalette.Add(MenuItem); 215 end; 188 216 end; 189 217 … … 221 249 begin 222 250 // Do nothing 251 end; 252 253 procedure TFormMain.MenuItemTileSkinClick(Sender: TObject); 254 begin 255 Core.Core.Game.Skin := TTileSkin(TMenuItem(Sender).Tag); 256 end; 257 258 procedure TFormMain.MenuItemColorPaletteClick(Sender: TObject); 259 begin 260 Core.Core.Game.ColorPalette := TColorPalette(TMenuItem(Sender).Tag); 223 261 end; 224 262 … … 277 315 end; 278 316 MenuItemTools.Visible := ToolsVisible; 317 MenuItemTileSkin.Items[Integer(Core.Core.Game.Skin)].Checked := True; 318 MenuItemColorPalette.Items[Integer(Core.Core.Game.ColorPalette)].Checked := True; 279 319 end; 280 320 -
trunk/Forms/FormNew.lfm
r89 r103 8 8 ClientWidth = 514 9 9 DesignTimePPI = 144 10 OnCreate = FormCreate 11 LCLVersion = '3.4.0.0' 10 LCLVersion = '3.6.0.0' 12 11 object ButtonCancel: TButton 13 12 Left = 255 … … 36 35 Width = 497 37 36 HorzScrollBar.Page = 435 38 VertScrollBar.Page = 21437 VertScrollBar.Page = 118 39 38 Anchors = [akTop, akLeft, akRight, akBottom] 40 39 ClientHeight = 245 … … 87 86 TabOrder = 2 88 87 end 89 object Label2: TLabel90 Left = 1691 Height = 2692 Top = 13393 Width = 7594 Caption = 'Tile skin:'95 ParentColor = False96 end97 object ComboBoxSkin: TComboBox98 Left = 17399 Height = 38100 Top = 128101 Width = 262102 ItemHeight = 0103 Items.Strings = (104 ''105 )106 Style = csDropDownList107 TabOrder = 3108 end109 object Label3: TLabel110 Left = 16111 Height = 26112 Top = 181113 Width = 113114 Caption = 'Color palette:'115 ParentColor = False116 end117 object ComboBoxColorPalette: TComboBox118 Left = 173119 Height = 38120 Top = 176121 Width = 262122 ItemHeight = 0123 Items.Strings = (124 'RGB'125 'RBG'126 'GRB'127 'GBR'128 'BGR'129 'BRG'130 )131 Style = csDropDownList132 TabOrder = 4133 end134 88 end 135 89 end -
trunk/Forms/FormNew.lrj
r89 r103 5 5 {"hash":103901194,"name":"tformnew.label1.caption","sourcebytes":[66,111,97,114,100,32,115,105,122,101,58],"value":"Board size:"}, 6 6 {"hash":260260820,"name":"tformnew.checkboxundoenabled.caption","sourcebytes":[85,110,100,111,32,101,110,97,98,108,101,100],"value":"Undo enabled"}, 7 {"hash":146862089,"name":"tformnew.checkboxrecordhistory.caption","sourcebytes":[82,101,99,111,114,100,32,109,111,118,101,115,32,104,105,115,116,111,114,121],"value":"Record moves history"}, 8 {"hash":125677626,"name":"tformnew.label2.caption","sourcebytes":[84,105,108,101,32,115,107,105,110,58],"value":"Tile skin:"}, 9 {"hash":35322186,"name":"tformnew.label3.caption","sourcebytes":[67,111,108,111,114,32,112,97,108,101,116,116,101,58],"value":"Color palette:"} 7 {"hash":146862089,"name":"tformnew.checkboxrecordhistory.caption","sourcebytes":[82,101,99,111,114,100,32,109,111,118,101,115,32,104,105,115,116,111,114,121],"value":"Record moves history"} 10 8 ]} -
trunk/Forms/FormNew.pas
r89 r103 16 16 CheckBoxRecordHistory: TCheckBox; 17 17 CheckBoxUndoEnabled: TCheckBox; 18 ComboBoxColorPalette: TComboBox;19 18 ComboBoxSize: TComboBox; 20 ComboBoxSkin: TComboBox;21 19 Label1: TLabel; 22 Label2: TLabel;23 Label3: TLabel;24 20 ScrollBox1: TScrollBox; 25 procedure FormCreate(Sender: TObject);26 21 public 27 22 procedure Load(Game: TGame); … … 35 30 36 31 { TFormNew } 37 38 procedure TFormNew.FormCreate(Sender: TObject);39 var40 TileSkin: TTileSkin;41 ColorPalette: TColorPalette;42 begin43 ComboBoxSkin.Items.BeginUpdate;44 try45 ComboBoxSkin.Items.Clear;46 for TileSkin := Low(SkinText) to High(SkinText) do47 ComboBoxSkin.Items.Add(SkinText[TileSkin]);48 finally49 ComboBoxSkin.Items.EndUpdate;50 end;51 52 ComboBoxColorPalette.Items.BeginUpdate;53 try54 ComboBoxColorPalette.Items.Clear;55 for ColorPalette := Low(ColorPaletteText) to High(ColorPaletteText) do56 ComboBoxColorPalette.Items.Add(ColorPaletteText[ColorPalette]);57 finally58 ComboBoxColorPalette.Items.EndUpdate;59 end;60 end;61 62 32 procedure TFormNew.Load(Game: TGame); 63 33 begin … … 65 35 CheckBoxUndoEnabled.Checked := Game.UndoEnabled; 66 36 CheckBoxRecordHistory.Checked := Game.RecordHistory; 67 ComboBoxSkin.ItemIndex := Integer(Game.Skin);68 ComboBoxColorPalette.ItemIndex := Integer(Game.ColorPalette);69 37 end; 70 38 … … 74 42 Game.UndoEnabled := CheckBoxUndoEnabled.Checked; 75 43 Game.RecordHistory := CheckBoxRecordHistory.Checked; 76 Game.Skin := TTileSkin(ComboBoxSkin.ItemIndex);77 Game.ColorPalette := TColorPalette(ComboBoxColorPalette.ItemIndex);78 44 end; 79 45 -
trunk/Install/flatpak/net.zdechov.app.x2048.yml
r98 r103 1 1 app-id: net.zdechov.app.x2048 2 2 runtime: org.kde.Platform 3 runtime-version: '5.15-2 3.08'3 runtime-version: '5.15-24.08' 4 4 sdk: org.kde.Sdk 5 5 sdk-extensions: … … 10 10 - --socket=fallback-x11 11 11 - --socket=wayland 12 - --socket=pulseaudio13 12 - --device=dri 14 13 modules: … … 38 37 - install -Dm644 "Images/Logo 256x256.png" $FLATPAK_DEST/share/icons/hicolor/256x256/apps/${FLATPAK_ID}.png 39 38 - install -Dm644 Languages/*.po -t $FLATPAK_DEST/share/Game2048/Languages 39 - install -Dm644 Packages/Common/Languages/*.po -t $FLATPAK_DEST/share/Game2048/Languages 40 40 - install -Dm644 Install/flatpak/${FLATPAK_ID}.appdata.xml $FLATPAK_DEST/share/metainfo/${FLATPAK_ID}.metainfo.xml -
trunk/Languages/Game2048.cs.po
r102 r103 228 228 msgstr "Zobrazení" 229 229 230 #: tformmain.menuitemcolorpalette.caption 231 msgid "Color palette" 232 msgstr "Paleta barev" 233 230 234 #: tformmain.menuitemfullscreen.caption 231 235 msgid "Full screen" … … 241 245 msgstr "Nápověda" 242 246 247 #: tformmain.menuitemtileskin.caption 248 msgid "Tile skin" 249 msgstr "Povrch dlaždic" 250 243 251 #: tformmain.menuitemtools.caption 244 252 msgid "Tools" … … 272 280 msgstr "Velikost desky:" 273 281 274 #: tformnew.label2.caption275 msgid "Tile skin:"276 msgstr "Povrch dlaždic:"277 278 #: tformnew.label3.caption279 msgid "Color palette:"280 msgstr "Barevná paleta:"281 282 282 #: tformsettings.buttoncancel.caption 283 283 msgctxt "tformsettings.buttoncancel.caption"
Note:
See TracChangeset
for help on using the changeset viewer.