LiliaFramework / Lilia

A Innovative Framework For Garry's Mod
https://liliaframework.github.io/
GNU General Public License v3.0
13 stars 10 forks source link

StormFox GUI Error #18

Closed Bozcx closed 8 months ago

Bozcx commented 9 months ago

When using the StormFox VGUI in the context menu the following error will appear.

[StormFox 2] gamemodes/lilia/modules/frameworkui/hud/derma/cl_darkskin.lua:105: attempt to call method 'SetFont' (a nil value)
  1. SkinHook - gamemodes/lilia/modules/frameworkui/hud/derma/cl_darkskin.lua:105
   2. unknown - lua/stormfox2/lib/cl_vgui.lua:963 (x1588)

This is using the latest version of lilia

Bozcx commented 9 months ago

Looks like in general StormFox is fucked on the framework

bleonheart commented 9 months ago

That error seems like it's tied to an non existing function, mind checking if it is present in SF?

Bozcx commented 9 months ago
function PANEL:Init()
        self.bg = vgui_Create("DPanel",self)
        function self.bg:IsSelected() return false end
        function self.bg:GetToggle() return false end
        local hour = vgui.Create("DTextEntry", self.bg)
        self.hour = hour
        local min = vgui.Create("DTextEntry", self.bg)
        self.min = min
        self.ampm = vgui.Create("DButton", self)
        function self.bg:Paint( w, h )
            local cDis = StormFox2.Setting.Get("12h_display")
            self.Hovered  = hour.Hovered or min.Hovered
            self.Depressed= hour:IsEditing() or min:IsEditing()
            derma.SkinHook( "Paint", "Button", self, w, h )
            surface.SetFont("SF2_TimeSet")
            local tw,th = surface.GetTextSize(":")

            surface.SetTextColor(self.color or color_black)
            surface.SetTextPos(w / 2 - tw / 2,h / 2 - th / 2 - 2)
            surface.DrawText(":")
        end
Line 963 being derma.SkinHook( "Paint", "Button", self, w, h )
bleonheart commented 9 months ago

Double check if SF2_TimeSet exists, please

Bozcx commented 9 months ago
    surface.CreateFont("SF2_TimeSet", {
        font = "Arial", --  Use the font-name which is shown to you by your operating system Font Viewer, not the file name
        extended = false,
        size = 26,
        weight = 50,
        blursize = 0,
        scanlines = 0,
        antialias = true,
        underline = false,
        italic = false,
        strikeout = false,
        symbol = false,
        rotary = false,
        shadow = false,
        additive = false,
        outline = false,
    } )
bleonheart commented 9 months ago

This is so weird. Remove compatibility and double check. If it does, then I am clueless on the issue