diff options
| author | jussi | 2024-02-22 01:10:22 +0200 |
|---|---|---|
| committer | jussi | 2024-02-22 01:10:22 +0200 |
| commit | 04d2a7df47210f7ac4b9a44ade49af3d92375ee0 (patch) | |
| tree | 84ea1c136f91822506f24b7f6ffb1bd076077392 /examples | |
| parent | 178196b0ffb8e2358ce9b0be5e1570a10136eb45 (diff) | |
| download | reilua-enhanced-04d2a7df47210f7ac4b9a44ade49af3d92375ee0.tar.gz reilua-enhanced-04d2a7df47210f7ac4b9a44ade49af3d92375ee0.tar.bz2 reilua-enhanced-04d2a7df47210f7ac4b9a44ade49af3d92375ee0.zip | |
GuiGetFont fix.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/raygui_extensions/main.lua | 8 | ||||
| -rw-r--r-- | examples/resources/lib/raygui.lua | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/examples/raygui_extensions/main.lua b/examples/raygui_extensions/main.lua index e3f559d..a7dfa15 100644 --- a/examples/raygui_extensions/main.lua +++ b/examples/raygui_extensions/main.lua @@ -248,10 +248,10 @@ function RL.init() RL.SetWindowSize( winSize ) RL.SetWindowPosition( { mPos.x + mSize.x / 2 - winSize.x / 2, mPos.y + mSize.y / 2 - winSize.y / 2 } ) - RL.GuiSetStyle( RL.DEFAULT, RL.TEXT_SIZE, 20 ) - RL.GuiSetStyle( RL.DEFAULT, RL.TEXT_SPACING, 4 ) - RL.GuiSetStyle( RL.SPINNER, RL.TEXT_ALIGNMENT, RL.TEXT_ALIGN_RIGHT ) - RL.GuiSetStyle( RL.SPINNER, RL.TEXT_PADDING, 2 ) + -- RL.GuiSetStyle( RL.DEFAULT, RL.TEXT_SIZE, 20 ) + -- RL.GuiSetStyle( RL.DEFAULT, RL.TEXT_SPACING, 4 ) + -- RL.GuiSetStyle( RL.SPINNER, RL.TEXT_ALIGNMENT, RL.TEXT_ALIGN_RIGHT ) + -- RL.GuiSetStyle( RL.SPINNER, RL.TEXT_PADDING, 2 ) cat.texture = RL.LoadTexture( RL.GetBasePath().."../resources/images/cat.png" ) local texSize = Vec2:new( RL.GetTextureSize( cat.texture ) ) diff --git a/examples/resources/lib/raygui.lua b/examples/resources/lib/raygui.lua index 63bbf2f..cd02c78 100644 --- a/examples/resources/lib/raygui.lua +++ b/examples/resources/lib/raygui.lua @@ -1733,7 +1733,7 @@ function Raygui:new() object.textEdit = false object.defaultTexture = RL.GetTextureDefault() object.defaultRect = Rect:new( 0, 0, 1, 1 ) -- For texture. - object.defaultFont = RL.GetFontDefault() + object.defaultFont = RL.GuiGetFont() object.mouseOffset = Vec2:new() object.view = Rect:new() -- Active if larger than 0. Then only controls in view will be updated and drawn. object.tooltip = { @@ -1788,7 +1788,7 @@ function Raygui:update() if control.tooltip ~= nil then self.tooltip.focused = i - + if self.tooltip.timer < self.tooltip.delay then self.tooltip.timer = self.tooltip.timer + RL.GetFrameTime() else @@ -1866,7 +1866,7 @@ function Raygui:drawTooltip() view.width = screenSize.x view.height = screenSize.y end - + RL.GuiDummyRec( tooltipRect:clampInside( view ), self.tooltip.text ) end |
