Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/20/2024 in all areas

  1. It doesn't work because you need to call SetDrawList() and the color should be in AARRGGBB format. #include <Windowsconstants.au3> #include <WinAPI.au3> #include "imgui.au3" _ImGui_EnableViewports() Local $hwnd = _ImGui_GUICreate("", 1, 1, -100, -100, 0, $WS_EX_TOOLWINDOW) _WinAPI_ShowWindow($hwnd) _ImGui_StyleColorsDark() Global $bCheckbox1 = 0 Global $ScreenSize[] = [@DesktopWidth, @DesktopHeight] Local $io = _ImGui_GetIO() $io.ConfigWindowsMoveFromTitleBarOnly = True Local $is_first_run = True While 1 If Not _ImGui_PeekMsg() Then Exit _ImGui_BeginFrame() If Not _ImGui_Begin("Test", True, $ImGuiWindowFlags_NoCollapse) Then Exit If $is_first_run Then $is_first_run = False Local $win_size[] = [500, 300] Local $win_pos_x = (@DesktopWidth - $win_size[0]) / 2 Local $win_pos_y = (@DesktopHeight - $win_size[1]) / 2 _ImGui_SetWindowPos($win_pos_x, $win_pos_y) _ImGui_SetWindowSize($win_size[0], $win_size[1]) EndIf _ImGui_CheckBox("Overlay", $bCheckbox1) If $bCheckbox1 Then _ImGui_SetNextWindowSize($ScreenSize[0], $ScreenSize[1]) _ImGui_SetNextWindowPos(0, 0) If _ImGui_Begin("overlay", False, BitOR($ImGuiWindowFlags_NoDecoration, $ImGuiWindowFlags_NoInputs, $ImGuiWindowFlags_NoBringToFrontOnFocus, $ImGuiWindowFlags_NoCollapse, $ImGuiWindowFlags_NoScrollbar, $ImGuiWindowFlags_NoScrollWithMouse, $ImGuiWindowFlags_NoBackground)) Then Local $pDrawListPtr = _ImGui_GetWindowDrawList() _ImDraw_SetDrawList($pDrawListPtr) ; line added _ImDraw_AddCircle(400, 400, 100, 0xFFFFFFFF) ; AARRGGBB color _ImGui_End() EndIf EndIf _ImGui_End() _ImGui_EndFrame() Wend
    1 point
  2. Nine

    Struct Notation

    I am using a lot of the dot notation on structures. It is a bit slower than its function counterpart, but if it not use within a large loop, the difference is insignificant. I do not agree with your suggestion of .ptr and .size cause it will interfere with some structure declaration like this one (making it script breaking) : Local $tStruct = DllStructCreate("int size;long_ptr ptr") However I do think the priority should be to fix the following bug : Local $tStruct = DllStructCreate("byte data[10]") Local $i = 5 $tStruct.data(5) = 1 ; working ConsoleWrite($tStruct.data(5) & @CRLF) $tStruct.data($i) = 2 ; not working == dangerous bug ConsoleWrite($tStruct.data(5) & @CRLF) $tStruct.data(($i)) = 3 ; working ConsoleWrite($tStruct.data(5) & @CRLF)
    1 point
×
×
  • Create New...