Skip to content

Commit

Permalink
+visibility of scroll bars was fixed in TBCustomComboBox and him desc…
Browse files Browse the repository at this point in the history
…endants;

+a early freezing of a window update was fixed;
+Cubic Hermite interpolation adopted for 3d;
+new IBAnimationPath3d for animation with path;
+TBScrollBar - a handle of double click was added;
+for Android loading of local dictionary was fixed;
  • Loading branch information
PVV-BS committed Jun 13, 2022
1 parent a3d5477 commit 34dc339
Show file tree
Hide file tree
Showing 26 changed files with 553 additions and 134 deletions.
8 changes: 2 additions & 6 deletions BlackSharkCfg.inc
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
{.$define DEBUG_BS}

{$ifdef ANDROID}
{$ifdef DEBUG_BS}
{$define DBG_IO}
{$endif}
{$define DBG_IO}
{$define SingleWinOnly}
{$endif}

{$ifdef ultibo}
{$ifdef DEBUG_BS}
{$define DBG_IO}
{$endif}
{$define DBG_IO}
{$define SingleWinOnly}
{$endif}

Expand Down
1 change: 0 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ It's a young, a freely available, project that currently has a vector of develop
for its compilation use this IDE: https://github.com/ultibohub/Core/releases/download/2.5.037/Ultibo-Core-2.5.037-Beetroot.exe;
+ on Raspberry OS it just has been run without special implementation;
+ high DPI support for default GUI sizes;
+ now renderer doesn't draw invisible (with opacity 0) objects;
+ adaptive FPS was improved for the pure Black Shark application;
+ TBTable - some fixes;
+ refactoring of gl-context creation, bs.font, bs.renderer (multiple passes were fixed), bs.config (save and load implementations were added), bs.gui.chat.
Expand Down
23 changes: 23 additions & 0 deletions common/bs.lang.dictionary.pas
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ function GetSentence(const NameSentence: string): string;

// you can add own dictionaries by AddToExisting = true
function LoadLang(const NameDictionary: string; AddToExisting: boolean = true): boolean;
function IsDictionaryEmpty: boolean;

implementation

Expand All @@ -41,11 +42,20 @@ implementation
, bs.collections
, bs.utils
, bs.strings
{$ifdef DEBUG_BS}
, SysUtils
, bs.log
{$endif}
;

var
g_DictSpell: THashTable<string, string>;

function IsDictionaryEmpty: boolean;
begin
Result := g_DictSpell.Count = 0;
end;

function GetSentence(const NameSentence: string): string;
begin
if not g_DictSpell.Find(NameSentence, Result) then
Expand All @@ -64,11 +74,24 @@ function LoadLang(const NameDictionary: string; AddToExisting: boolean = true):
if not AddToExisting then
g_DictSpell.Clear;
path := GetFilePath(NameDictionary, 'Lang');
{$ifdef DEBUG_BS}
bs.log.BSWriteMsg('LoadLang', path);
{$endif}
xml := TheXmlWriter.Create(path, true);
try
node := xml.FindNode('Sentences', true);
if not Assigned(node) then
begin
{$ifdef DEBUG_BS}
bs.log.BSWriteMsg('LoadLang.Sentences', 'not found!');
{$endif}
exit(false);
end;

{$ifdef DEBUG_BS}
bs.log.BSWriteMsg('LoadLang.Sentences.Count', IntToStr(node.CountChilds));
{$endif}

for i := 0 to node.CountChilds - 1 do
begin
ch := node.Childs[i];
Expand Down
Loading

0 comments on commit 34dc339

Please sign in to comment.