From d34495a23fefaf6630c3e8a7603853a9ee96e46f Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Mon, 15 Jul 2013 18:03:34 +0200 Subject: [PATCH] Cleanup --- data/compression.h | 4 ++-- ui/view.cpp | 9 --------- ui/view.h | 15 --------------- 3 files changed, 2 insertions(+), 26 deletions(-) diff --git a/data/compression.h b/data/compression.h index 2199c5591e..e37ff85794 100644 --- a/data/compression.h +++ b/data/compression.h @@ -1,8 +1,8 @@ #pragma once -#include +#include -bool compress_string(const std::string& str, std::string *dest, int compressionlevel = Z_BEST_COMPRESSION); +bool compress_string(const std::string& str, std::string *dest, int compressionlevel = 9); bool decompress_string(const std::string& str, std::string *dest); diff --git a/ui/view.cpp b/ui/view.cpp index 5fa3969662..b63a544e63 100644 --- a/ui/view.cpp +++ b/ui/view.cpp @@ -190,7 +190,6 @@ void Clickable::Update(const InputState &input_state) { OnClick.Trigger(e); } } - OnClick.Update(); } Item::Item(LayoutParams *layoutParams) : InertView(layoutParams) { @@ -262,14 +261,6 @@ void CheckBox::Draw(UIContext &dc) { dc.Draw()->DrawImage(image, bounds_.x2() - 4, bounds_.centerY(), 1.0f, 0xFFFFFFFF, ALIGN_RIGHT | ALIGN_VCENTER); } -void Slider::Draw(UIContext &dc) { - // TODO -} - -void Slider::Touch(UIContext &dc) { - // TODO -} - void Button::GetContentDimensions(const UIContext &dc, float &w, float &h) const { dc.Draw()->MeasureText(dc.theme->uiFont, text_.c_str(), &w, &h); } diff --git a/ui/view.h b/ui/view.h index 76f8156494..9117e93689 100644 --- a/ui/view.h +++ b/ui/view.h @@ -453,21 +453,6 @@ private: std::string rightText_; }; -// Not really using the click action, but the background lightup works well. -class Slider : public ClickableItem { -public: - Slider(const std::string &text, int min, int max, int *value, LayoutParams *layoutParams = 0) - : ClickableItem(layoutParams), text_(text), min_(min), max_(max), value_(value) {} - - virtual void Draw(UIContext &dc); - virtual void Touch(UIContext &dc); - -private: - std::string text_; - int min_, max_; - int *value_; -}; - class ItemHeader : public Item { public: ItemHeader(const std::string &text, LayoutParams *layoutParams = 0)