Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyjor committed Sep 24, 2024
1 parent 5004444 commit 92948d1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/editor/JulGameEditor/Components/ScreenButtonFields.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
function show_screenbutton_fields(selectedScreenButton, screenButtonField)
fieldName = getFieldName1(screenButtonField)
unusedFields = ["alpha","clickEvents", "currentTexture", "buttonDownSprite", "buttonDownSpritePath", "buttonDownTexture", "buttonUpSprite", "buttonUpSpritePath", "buttonUpTexture", "fontPath", "isInitialized", "mouseOverSprite", "textTexture"]
# TODO:
push!(unusedFields, "text")
if fieldName in unusedFields
return
Expand Down
2 changes: 1 addition & 1 deletion src/editor/JulGameEditor/Editor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module Editor
using Dates
using JulGame: Component, MainLoop, Math, SceneLoaderModule, SDL2, UI
using NativeFileDialog

global sdlVersion = "2.0.0"
global sdlRenderer = C_NULL
global const BackendPlatformUserData = Ref{Any}(C_NULL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function ImGui_ImplSDLRenderer2_RenderDrawData(draw_data)
color = Ptr{Int}(Ptr{Cvoid}(Ptr{Cchar}(vtx_buffer.Data + unsafe_load(pcmd.VtxOffset)) + col_offset))

tex = Ptr{SDL2.SDL_Texture}(CImGui.ImDrawCmd_GetTexID(pcmd))
offset = unsafe_load(pcmd.IdxOffset)*2 # TODO: understand why this is necessary to multiply by 2
offset = unsafe_load(pcmd.IdxOffset)*2

elem_count = Int(unsafe_load(pcmd.ElemCount))
indices = Ptr{CImGui.ImDrawIdx}(idx_buffer.Data + (offset))
Expand Down

0 comments on commit 92948d1

Please sign in to comment.